This is a patch to update the C ICB client from version 5.0.5 to 5.0.8. It is designed to be applied by Larry Wall's "patch" program; if you don't have patch, you may obtain it from ftp.gnu.ai.mit.edu in the /pub/gnu directory (the latest version as of this writing is 2.1; the file is patch-2.1.tar.gz). To apply: cd to the icb-5.0.5 directory (the directory containing the "icb", "readline", "murgil", etc. subdirectories), and type: patch -s -p1 255 characters) /write messages don't get sent + at all + + ICB-BUG-5.0.5-5: sample.icbrc contains invalid comment syntax + + ICB-BUG-5.0.5-6: outbound personal messages appear twice in log file + + ICB-BUG-5.0.5-9: fails to compile on Linux + + ICB-BUG-5.0.5-10: compiles but generates warning messages under gcc + on SunOS 4.x and Linux + + + Features Added: + + ICB-FEATURE-5.0.5-1: key should provide completion functions + + Description: + + When pressed at the end the second word on the command line, + the key will search your tab history for a nickname + beginning with the characters of that word typed thus far; + it will complete the nickname up to the limit of the uniqueness + of the prefix. In all other contexts, the behavior of the tab + key is unchanged. + + + ICB-FEATURE-5.0.5-2: setup should be more intelligent about directory + locations. + + Description: + setup will change the default "man" and "lib" directories to + match the user-supplied "bin" directory. + + + ICB-FEATURE-5.0.5-3: use of server registration features should not + require entering or logging of visible passwords + + Description: + + /bump and /cp will now prompt you for your password (in the + case of /cp, your old and new passswords) if they + are not specified on the command line. These passwords + are not echoed to the screen nor logged in the replay buffer + or log file. + + A new command, /register, has been added. This will prompt for + your password as above and register your nickname (e.g. /m + server p password). + + A new variable, autoreg, has been added. If this variable is + set to true (it defaults to false), then the receipt of + a "Send password to register nick" message from the server will + cause the client to automatically invoke the /register command + and register your nick. + + + + Known Bugs Remaining: + + ICB-BUG-5.0.5-2: Under Solaris 2.x, /display -n (error) followed by + /display -nick sometimes causes coredump (not reproducible by + author) + + ICB-BUG-5.0.5-7: Under Irix, the pagesize variable is intermittently + reset to 0; eventually, paging fails to operate even with + nonzero value of pagesize. + + ICB-BUG-5.0.5-8: Under Ultrix, output to the log file is only rarely + flushed. diff -c -r icb-5.0.5/RELEASE-5.0.8 icb-5.0.8/RELEASE-5.0.8 *** icb-5.0.5/RELEASE-5.0.8 Wed Apr 6 19:11:43 1994 --- icb-5.0.8/RELEASE-5.0.8 Wed Apr 6 19:09:49 1994 *************** *** 0 **** --- 1,61 ---- + Release Notes - ICB C Client Revision 5.0.8 - 15 Mar 1994 + + 5.0.8 is a bugfix release. Three problems that caused coredumps with varying + frequency on different systems have been corrected. There is one small new + feature: the 'version' command has been modified to show the client version as + well as that of the server; you may also choose to view only one or the other. + + There are two additional features documented below; these were present in + 5.0.7 but omitted from the 5.0.7 release notes. + + Bugs Fixed: + + ICB-BUG-5.0.7-1: /write nick causes core dump + + ICB-BUG-5.0.7-2: parts of split messages end in garbage + + ICB-BUG-5.0.7-3: frequent coredumps under AIX 3.2.5 and Irix + + ICB-BUG-5.0.7-4: s_open has incorrect usage message + + + Features added: + + [The first two features were actually present in 5.0.7, but were not + mentioned in the 5.0.7 release notes] + + ICB-FEATURE-5.0.5-4: key behavior should be extended to commands + other than /m + + Description: + + When pressed at the beginning of a blank line, the behavior of + the tab key is unchanged - m is + inserted, where is the nickname at the top of your + tab history. + + When pressed anywhere else on a line that begins with the + command character, the second word of the line is changed + to the nickname at the top of your tab history; the rest of + the line, including the command, is unchanged; in this + way you my use the tab history on commands other than /m. + + + ICB-FEATURE-5.0.5-5: idle times should not lose resolution after one + hour + + Description + Times in the "idle" column of the /who output are now displayed + to the minute, even when the idle time is over an hour. The + format is "HHh MMm"; the 'HHh' is omitted for idle times under + an hour. + + + ICB-FEATURE-5.0.7-1: the /version command should display the client + version + + Description + The /version command now displays the current client version + as well as the server version. Optionally, the output may + be restricted to just the client or server versions by + specifying -c or -s, respectively. diff -c -r icb-5.0.5/TESTED_UNDER icb-5.0.8/TESTED_UNDER *** icb-5.0.5/TESTED_UNDER Wed Feb 10 15:08:59 1993 --- icb-5.0.8/TESTED_UNDER Wed Apr 6 19:09:49 1994 *************** *** 1,10 **** System Compiler - SunOS 4.1.3 /bin/cc /usr/lang/cc-1.1 - Ultrix 4.2A cc - Dynix 3.1.2 cc AIX 3.2 bsdcc HP-UX 9.0 cc IRIX 3.3.2 cc IRIX 4.0.5 cc NeXTStep 2.0 cc --- 1,11 ---- System Compiler AIX 3.2 bsdcc + Dynix 3.1.2 cc HP-UX 9.0 cc IRIX 3.3.2 cc IRIX 4.0.5 cc + Linux cc (Slackware 1.1.0, kernel 0.13pl13, libc 4.4.4) NeXTStep 2.0 cc + SunOS 4.1.3 /bin/cc /usr/lang/cc-1.1 + Ultrix 4.2A cc Common subdirectories: icb-5.0.5/contrib and icb-5.0.8/contrib Common subdirectories: icb-5.0.5/docs and icb-5.0.8/docs Common subdirectories: icb-5.0.5/glob and icb-5.0.8/glob Common subdirectories: icb-5.0.5/icb and icb-5.0.8/icb Common subdirectories: icb-5.0.5/malloc and icb-5.0.8/malloc Common subdirectories: icb-5.0.5/murgil and icb-5.0.8/murgil Common subdirectories: icb-5.0.5/readline and icb-5.0.8/readline diff -c -r icb-5.0.5/sample.icbrc icb-5.0.8/sample.icbrc *** icb-5.0.5/sample.icbrc Tue Sep 21 13:59:49 1993 --- icb-5.0.8/sample.icbrc Wed Apr 6 19:09:50 1994 *************** *** 42,48 **** c_usage add shuttime c "" "display time until server shutdown" # since /hush is interpreted locally, add a proc to force server-level. - # server-level hush proc s_hush {args} {s_personal server hush $args} c_usage add s_hush c "\[-n nick\]|\[-s pattern\]" "hush someone at the server level" --- 42,47 ---- diff -c -r icb-5.0.5/setup icb-5.0.8/setup *** icb-5.0.5/setup Wed Feb 10 15:09:01 1993 --- icb-5.0.8/setup Wed Apr 6 19:09:50 1994 *************** *** 77,83 **** Please enter your system type. The following systems are recognized: ! bsd Most Berkeley based Unix systems. sysv Some System V based Unix systems. hpux HP-UX Hewlett-Packard Unix. irix Silicon Graphics Irix. --- 77,84 ---- Please enter your system type. The following systems are recognized: ! bsd Most Berkeley based Unix systems ! linux Linux sysv Some System V based Unix systems. hpux HP-UX Hewlett-Packard Unix. irix Silicon Graphics Irix. *************** *** 104,112 **** --- 105,120 ---- case $system in bsd) + system=bsd sysdep="sysdep.bsd" lflags="-u" ;; + linux) + sysdep="sysdep.bsd" + otherlibs="$otherlibs -lbsd" + lflags="-u" + cflags="$cflags -DVOID_SIGHANDLER=1" + ;; sysv) sysdep="sysdep.sysv" cflags="${cflags} -DSYSV -DNOWINSIZE" *************** *** 168,173 **** --- 176,191 ---- read bindir if [ -z "${bindir}" ]; then bindir="${defbindir}" + else + case "$bindir" in + */bin) + defparent="`expr "$bindir" : '\(.*\)/bin'`" + defmandir="$defparent/man" + deflibdir="$defparent/lib" + ;; + *) + :;; + esac fi $ask "Directory for manual page? [${defmandir}] " read mandir *************** *** 179,184 **** --- 197,220 ---- if [ -z "${libdir}" ]; then libdir="${deflibdir}" fi + + case "$bindir" in + \~) bindir="${homedir}";; + \~/*) bindir="${homedir}`expr "$bindir" : '~\(.*\)'`";; + *) :;; + esac + + case "$mandir" in + \~) mandir="${homedir}";; + \~/*) mandir="${homedir}`expr "$mandir" : '~\(.*\)'`";; + *) :;; + esac + + case "$libdir" in + \~) libdir="${homedir}";; + \~/*) libdir="${homedir}`expr "$libdir" : '~\(.*\)'`";; + *) :;; + esac # # Get compiler to use Common subdirectories: icb-5.0.5/support and icb-5.0.8/support Common subdirectories: icb-5.0.5/tcl and icb-5.0.8/tcl diff -c -r icb-5.0.5/docs/tcl.man icb-5.0.8/docs/tcl.man *** icb-5.0.5/docs/tcl.man Wed Feb 10 15:09:07 1993 --- icb-5.0.8/docs/tcl.man Wed Apr 6 19:09:55 1994 *************** *** 6,12 **** '\" the suitability of this material for any purpose. It is '\" provided "as is" without express or implied warranty. '\" ! '\" $Header: /sprite/src/lib/tcl/RCS/Tcl.man,v 1.29 90/04/18 17:19:18 ouster Exp $ SPRITE (Berkeley) ' .so tmac.sprite .de UL --- 6,12 ---- '\" the suitability of this material for any purpose. It is '\" provided "as is" without express or implied warranty. '\" ! '\" $Header: /home/aurora1/mark/tmp/icb/docs/RCS/tcl.man,v 4.5 1993/02/10 04:19:39 mark Exp $ SPRITE (Berkeley) ' .so tmac.sprite .de UL diff -c -r icb-5.0.5/glob/tilde.c icb-5.0.8/glob/tilde.c *** icb-5.0.5/glob/tilde.c Wed Feb 10 15:11:01 1993 --- icb-5.0.8/glob/tilde.c Wed Apr 6 19:11:08 1994 *************** *** 30,36 **** #include #ifndef savestring ! #define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x)) #endif typedef int Function (); --- 30,36 ---- #include #ifndef savestring ! #define savestring(x) (char *)strcpy ((char *)xmalloc (1 + strlen (x)), (x)) #endif typedef int Function (); diff -c -r icb-5.0.5/icb/Make icb-5.0.8/icb/Make *** icb-5.0.5/icb/Make Wed Feb 10 15:10:11 1993 --- icb-5.0.8/icb/Make Wed Apr 6 19:10:36 1994 *************** *** 21,26 **** --- 21,27 ---- c_shell.c \ c_time.c \ c_usage.c \ + c_version.c \ cute.c \ defprocs.c \ dispatch.c \ *************** *** 36,47 **** --- 37,52 ---- parse.c \ print.c \ readlineinit.c \ + register.c \ s_admin.c \ s_beep.c \ + s_bump.c \ + s_chpw.c \ s_group.c \ s_motd.c \ s_open.c \ s_person.c \ + s_register.c \ s_send.c \ s_user.c \ s_version.c \ *************** *** 68,73 **** --- 73,79 ---- c_shell.o \ c_time.o \ c_usage.o \ + c_version.o \ cute.o \ defprocs.o \ dispatch.o \ *************** *** 83,94 **** --- 89,104 ---- parse.o \ print.o \ readlineinit.o \ + register.o \ s_admin.o \ s_beep.o \ + s_bump.o \ + s_chpw.o \ s_group.o \ s_motd.o \ s_open.o \ s_person.o \ + s_register.o \ s_send.o \ s_user.o \ s_version.o \ *************** *** 108,114 **** help/hush \ help/input \ help/intro \ - help/news \ help/options \ help/primitives \ help/rules \ --- 118,123 ---- *************** *** 217,223 **** oset.o: funcs.h externs.h getline.o: icb.h ../protocol.h ../tcl/tcl.h getline.o: funcs.h externs.h ! globals.o: icb.h ../protocol.h ../tcl/tcl.h globals.o: funcs.h ../murgil/ipcf.h history.o: icb.h ../protocol.h ../tcl/tcl.h history.o: funcs.h externs.h --- 226,232 ---- oset.o: funcs.h externs.h getline.o: icb.h ../protocol.h ../tcl/tcl.h getline.o: funcs.h externs.h ! globals.o: icb.h ../protocol.h ../tcl/tcl.h ../version.h globals.o: funcs.h ../murgil/ipcf.h history.o: icb.h ../protocol.h ../tcl/tcl.h history.o: funcs.h externs.h *************** *** 224,230 **** ipcf.o: icb.h ../protocol.h ../tcl/tcl.h ipcf.o: funcs.h externs.h main.o: icb.h ../protocol.h ../tcl/tcl.h ! main.o: funcs.h externs.h ../version.h msgs.o: icb.h ../protocol.h ../tcl/tcl.h msgs.o: funcs.h externs.h ../version.h parse.o: icb.h ../protocol.h ../tcl/tcl.h --- 233,239 ---- ipcf.o: icb.h ../protocol.h ../tcl/tcl.h ipcf.o: funcs.h externs.h main.o: icb.h ../protocol.h ../tcl/tcl.h ! main.o: funcs.h externs.h msgs.o: icb.h ../protocol.h ../tcl/tcl.h msgs.o: funcs.h externs.h ../version.h parse.o: icb.h ../protocol.h ../tcl/tcl.h diff -c -r icb-5.0.5/icb/bindings icb-5.0.8/icb/bindings *** icb-5.0.5/icb/bindings Wed Feb 10 15:10:12 1993 --- icb-5.0.8/icb/bindings Wed Apr 6 19:10:37 1994 *************** *** 65,71 **** proc boot nick {s_group remove $nick} c_usage add bug g "" "send mail to the author" ! proc bug {} {c_shell "mail mark@cc.gatech.edu"} c_usage add cancel m "nick" "cancel an invitation" proc cancel nick {s_group cancel $nick} --- 65,71 ---- proc boot nick {s_group remove $nick} c_usage add bug g "" "send mail to the author" ! proc bug {} {c_shell "mail mark@cad.gatech.edu"} c_usage add cancel m "nick" "cancel an invitation" proc cancel nick {s_group cancel $nick} *************** *** 73,78 **** --- 73,84 ---- c_usage add commands i "" "list commands" proc commands {} {c_usage list} + c_usage add bump nickname "\[password\]" "bump someone who is using your registered nickname" + proc bump {args} {s_bump $args} + + c_usage add cp "\[old\]" "\[new\]" "change your registration password" + proc cp {args} {s_chpw $args} + c_usage add echoback g "on|off" "turn on/off echoback" proc echoback onoff {s_user echoback $onoff} *************** *** 120,125 **** --- 126,134 ---- c_usage add quit g "" "exit icb" proc quit {} {c_quit} + c_usage add register g "\[password\]" "register your nickname" + proc register args {s_register $args} + c_usage add send g "message" "send text to your group" proc send args {s_send $args} *************** *** 132,139 **** c_usage add topic m "topicname" "set your group's topic" proc topic args {s_group topic $args} ! c_usage add version i "" "display server version info" ! proc version {} {s_version} c_usage add who i "\[.\] \[group\]" "list users" proc who {args} {s_who long $args} --- 141,155 ---- c_usage add topic m "topicname" "set your group's topic" proc topic args {s_group topic $args} ! c_usage add version i "\[-s|-c\]" "display server and/or client version info" ! proc version {args} { ! if { [ string compare $args "-c" ] !=0 } { ! s_version ! } ! if { [ string compare $args "-s" ] != 0 } { ! c_version ! } ! } c_usage add who i "\[.\] \[group\]" "list users" proc who {args} {s_who long $args} diff -c -r icb-5.0.5/icb/c_replay.c icb-5.0.8/icb/c_replay.c *** icb-5.0.5/icb/c_replay.c Wed Feb 10 15:10:18 1993 --- icb-5.0.8/icb/c_replay.c Wed Apr 6 19:10:39 1994 *************** *** 20,27 **** c_replay(TARGLIST) TARGDEFS { ! static char *usage = "usage: c_replay [switches] [count]\n switches may be abbreviated. They are:\n -[no]log\t(don't) send output to the logfile\n -[no]screen\t(don't) send output to the screen\n -personal\treplay only personal messages\n -nickname nick\treplay only messages from nick"; ! static char *optv[] = { "log", "nolog", "screen", "noscreen", "nickname:", "personal", NULL }; int lines; char *s; --- 20,27 ---- c_replay(TARGLIST) TARGDEFS { ! static char *usage = "usage: c_replay [switches] [count]\n switches may be abbreviated. They are:\n -[no]log\t(don't) send output to the logfile\n -[no]screen\t(don't) send output to the screen\n -[no]personal\treplay only personal (public) messages\n -nickname nick\treplay only messages from nick"; ! static char *optv[] = { "log", "nolog", "screen", "noscreen", "nickname:", "personal", "nopersonal", NULL }; int lines; char *s; *************** *** 48,53 **** --- 48,59 ---- personalflag = 1; continue; } + + if (!strcmp(s, "nopersonal")) + { + personalflag = -1; + continue; + } if (!strcmp(s, "log")) { *************** *** 134,141 **** lines = bufmessages; sprintf(mbuf, "[=Replaying last %d ", lines); ! if (personalflag) strcat(mbuf, "personal "); strcat(mbuf, "message"); if (lines>1) strcat(mbuf,"s"); --- 140,149 ---- lines = bufmessages; sprintf(mbuf, "[=Replaying last %d ", lines); ! if (personalflag == 1) strcat(mbuf, "personal "); + else if (personalflag == -1) + strcat(mbuf, "public "); strcat(mbuf, "message"); if (lines>1) strcat(mbuf,"s"); *************** *** 168,174 **** bufparse(str); if (nickptr && strcasecmp(bufnick,nickptr)) return 0; ! if (personalflag && buftype != BUF_PERSONAL) return 0; return 1; } --- 176,184 ---- bufparse(str); if (nickptr && strcasecmp(bufnick,nickptr)) return 0; ! if (personalflag == 1 && buftype != BUF_PERSONAL) ! return 0; ! if (personalflag == -1 && buftype == BUF_PERSONAL) return 0; return 1; } diff -c -r icb-5.0.5/icb/c_version.c icb-5.0.8/icb/c_version.c *** icb-5.0.5/icb/c_version.c Wed Apr 6 19:11:43 1994 --- icb-5.0.8/icb/c_version.c Wed Apr 6 19:10:40 1994 *************** *** 0 **** --- 1,20 ---- + /* Copyright 1994 by Mark J. Reed */ + /* For copying and distribution information, see the file COPYING. */ + + /* primitive to display client version info */ + + #include "icb.h" + #include "externs.h" + + c_version(TARGLIST) + TARGDEFS + { + static char *usage = "usage: c_version"; + + /* check the arg count */ + if (argc != 1) + TRETURNERR(usage) + + putl(icb_version, PL_SCR); + return(TCL_OK); + } diff -c -r icb-5.0.5/icb/defprocs.c icb-5.0.8/icb/defprocs.c *** icb-5.0.5/icb/defprocs.c Wed Feb 10 15:10:20 1993 --- icb-5.0.8/icb/defprocs.c Wed Apr 6 19:10:40 1994 *************** *** 52,62 **** "c_usage add boot m \"nick\" \"kick someone out of your group\"", "proc boot nick {s_group remove $nick}", "c_usage add bug g \"\" \"send mail to the author\"", ! "proc bug {} {c_shell \"mail mark@cc.gatech.edu\"}", "c_usage add cancel m \"nick\" \"cancel an invitation\"", "proc cancel nick {s_group cancel $nick}", "c_usage add commands i \"\" \"list commands\"", "proc commands {} {c_usage list}", "c_usage add echoback g \"on|off\" \"turn on/off echoback\"", "proc echoback onoff {s_user echoback $onoff}", "c_usage add group g \"group\" \"change groups\"", --- 52,66 ---- "c_usage add boot m \"nick\" \"kick someone out of your group\"", "proc boot nick {s_group remove $nick}", "c_usage add bug g \"\" \"send mail to the author\"", ! "proc bug {} {c_shell \"mail mark@cad.gatech.edu\"}", "c_usage add cancel m \"nick\" \"cancel an invitation\"", "proc cancel nick {s_group cancel $nick}", "c_usage add commands i \"\" \"list commands\"", "proc commands {} {c_usage list}", + "c_usage add bump nickname \"\\[password\\]\" \"bump someone who is using your registered nickname\"", + "proc bump {args} {s_bump $args}", + "c_usage add cp \"\\[old\\]\" \"\\[new\\]\" \"change your registration password\"", + "proc cp {args} {s_chpw $args}", "c_usage add echoback g \"on|off\" \"turn on/off echoback\"", "proc echoback onoff {s_user echoback $onoff}", "c_usage add group g \"group\" \"change groups\"", *************** *** 88,93 **** --- 92,99 ---- "proc replay {args} {eval c_replay $args}", "c_usage add quit g \"\" \"exit icb\"", "proc quit {} {c_quit}", + "c_usage add register g \"\\[password\\]\" \"register your nickname\"", + "proc register args {s_register $args}", "c_usage add send g \"message\" \"send text to your group\"", "proc send args {s_send $args}", "c_usage add status m \"\" \"change or see the status of a group\"", *************** *** 96,103 **** "proc time {} {c_time}", "c_usage add topic m \"topicname\" \"set your group's topic\"", "proc topic args {s_group topic $args}", ! "c_usage add version i \"\" \"display server version info\"", ! "proc version {} {s_version}", "c_usage add who i \"\\[.\\] \\[group\\]\" \"list users\"", "proc who {args} {s_who long $args}", "proc a_su pass {s_user nick admin $pass}", --- 102,116 ---- "proc time {} {c_time}", "c_usage add topic m \"topicname\" \"set your group's topic\"", "proc topic args {s_group topic $args}", ! "c_usage add version i \"\\[-s|-c\\]\" \"display server and/or client version info\"", ! "proc version {args} {\ ! if { [ string compare $args \"-c\" ] !=0 } {\n\ ! s_version\n\ ! }\n\ ! if { [ string compare $args \"-s\" ] != 0 } {\n\ ! c_version\n\ ! }\n\ ! }", "c_usage add who i \"\\[.\\] \\[group\\]\" \"list users\"", "proc who {args} {s_who long $args}", "proc a_su pass {s_user nick admin $pass}", diff -c -r icb-5.0.5/icb/externs.h icb-5.0.8/icb/externs.h *** icb-5.0.5/icb/externs.h Wed Feb 10 15:10:22 1993 --- icb-5.0.8/icb/externs.h Wed Apr 6 19:10:41 1994 *************** *** 15,20 **** --- 15,22 ---- extern TTYINFO ttyinfo; /* defined in globals.c */ + extern char *what_version; /* ICB client version */ + #define icb_version (what_version+5) /* . . . without leading what(1) key */ extern char *pp; /* packet pointer */ extern char *pbuf; /* packet buffer pointer */ extern char *mynick; /* nickname of user */ *************** *** 34,39 **** --- 36,42 ---- extern time_t curtime; /* current time */ extern int linenumber; extern int echomode; /* whether tty echo is on or off */ + extern int match_exact; /* used by histmatch() */ extern int m_whoheader; /* who header output */ extern int m_groupheader; /* group header output */ *************** *** 42,44 **** --- 45,52 ---- /* defined in ../readline/readline.c */ extern int last_command_was_kill; + #if VOID_SIGHANDLER + #define sighandler void + #else + #define sighandler int + #endif diff -c -r icb-5.0.5/icb/funcs.h icb-5.0.8/icb/funcs.h *** icb-5.0.5/icb/funcs.h Wed Feb 10 15:24:01 1993 --- icb-5.0.8/icb/funcs.h Wed Apr 6 19:10:41 1994 *************** *** 3,9 **** If you edit this file, your changes may be lost later. */ ! STRLIST *strgetnode(); STRLIST *strmakenode(); char *ampm(); --- 3,9 ---- If you edit this file, your changes may be lost later. */ ! #include "externs.h" STRLIST *strgetnode(); STRLIST *strmakenode(); char *ampm(); *************** *** 18,24 **** char *strscat(); char *tildexpand(); int addusage(); ! int askquit(); int beep(); int bufferadd(); int bufferlist(); --- 18,24 ---- char *strscat(); char *tildexpand(); int addusage(); ! sighandler askquit(); int beep(); int bufferadd(); int bufferlist(); *************** *** 64,70 **** --- 64,74 ---- int inserttab(); int ishushed(); int lcaseit(); + #ifdef linux int linebuffer(); + #else + int linebuffer(); + #endif int listusage(); int listvars(); int logging(); *************** *** 113,119 **** int strlinktail(); int strncasecmp(); int strunlink(); ! int suspend(); int tclinit(); int tclreadicbrc(); int tclrestrict(); --- 117,123 ---- int strlinktail(); int strncasecmp(); int strunlink(); ! sighandler suspend(); int tclinit(); int tclreadicbrc(); int tclrestrict(); *************** *** 135,137 **** --- 139,142 ---- struct server *getserver(); struct server *getservbyname(); void listservers(); + sighandler icbexit(); diff -c -r icb-5.0.5/icb/getline.c icb-5.0.8/icb/getline.c *** icb-5.0.5/icb/getline.c Wed Feb 10 15:10:23 1993 --- icb-5.0.8/icb/getline.c Wed Apr 6 19:10:41 1994 *************** *** 27,35 **** } /* Get a line from the user. */ ! echo(); line_read = readline (prompt); ! noecho(); /* If the line has any text in it, save it on the history. */ if (line_read && *line_read) --- 27,35 ---- } /* Get a line from the user. */ ! /* echo(); */ line_read = readline (prompt); ! /* noecho(); */ /* If the line has any text in it, save it on the history. */ if (line_read && *line_read) *************** *** 49,73 **** int count; char c; { ! char mpref[256]; ! ! sprintf(mpref,"%cm",gv.cmdchar); ! ! if (rl_point != 0 && strncmp(rl_line_buffer, mpref,2)) { ! return rl_insert(count, c); } ! if (histcount() == 0) ! return -1; ! ! strcat(mpref, " "); ! strcat(mpref, histget()); ! strcat(mpref, " "); ! if (rl_end) ! rl_unix_line_discard(); ! rl_insert_text(mpref); ! return; ! } --- 49,199 ---- int count; char c; { ! char mpref[256]; ! int ppoint; ! int words; ! int term; ! int i; ! int word2, word2len, diff; ! char find_nick[MAX_NICKLEN]; ! char *found_nick; ! char *histmatch(); ! ! /* make sure the history's not empty - punt if it is */ ! if (histcount()==0) { ! return; } ! /* remember cursor location */ ! ppoint = rl_point; ! ! /* determine case */ ! if (rl_end==0 || rl_line_buffer[0] != gv.cmdchar) ! { ! /* case 1 - no command char */ ! if (found_nick = histget()) ! { ! sprintf(mpref,"%cm",gv.cmdchar); ! strcat(mpref, " "); ! strcat(mpref, found_nick); ! strcat(mpref, " "); ! rl_point = 0; ! rl_insert_text(mpref); ! rl_point = rl_end; ! rl_point = ppoint + strlen(mpref); ! rl_redraw(); ! } ! else ! printf("\007"); ! return; ! } ! ! /* starts with command character */ ! words=0; ! term=0; ! word2len=-1; if (rl_end) ! { ! words++; ! for (i=0; i MAX_NICKLEN) ! { ! printf("\007"); ! return; ! } ! ! if (rl_line_buffer[word2]=='@') ! { ! word2++; ! word2len--; ! } + for (i=word2; i= 2) + { + found_nick = histget(); + if (found_nick) + { + rl_point = word2; + rl_delete(word2len); + rl_insert_text(found_nick); + rl_point = rl_end; + rl_kill_line(); + diff = strlen(found_nick) - word2len; + rl_point = ppoint + diff; + if (diff < 0) /* line shrunk */ + { + rl_point=rl_end; + rl_insert(-diff, ' '); + rl_redraw(); + rl_rubout(-diff); + } + rl_redraw(); + } + else + printf("\007"); + return; + } + + /* anything else */ + printf("\007"); + } diff -c -r icb-5.0.5/icb/globals.c icb-5.0.8/icb/globals.c *** icb-5.0.5/icb/globals.c Wed Feb 10 15:10:25 1993 --- icb-5.0.8/icb/globals.c Wed Apr 6 19:10:42 1994 *************** *** 1,4 **** --- 1,5 ---- /* Copyright (c) 1990 by Carrick Sean Casey. */ + /* Copyright (c) 1990-1993, 1994 Mark J. Reed */ /* For copying and distribution information, see the file COPYING. */ /* icb global variables */ *************** *** 5,10 **** --- 6,12 ---- #include "icb.h" #include "../murgil/ipcf.h" + #include "../version.h" /* non-global definitions */ char packetbuffer[USER_BUF_SIZE]; /* packet buffer */ *************** *** 12,17 **** --- 14,20 ---- char messagebuffer2[256]; /* generic large buffer */ /* global defs */ + char *what_version = WHAT_VERSION; /* ICB Client Version */ char *pp = packetbuffer; /* packet pointer */ char *pbuf = packetbuffer + 1; /* packet buffer pointer */ char *mbuf = messagebuffer; /* message buffer */ *************** *** 30,35 **** --- 33,39 ---- int whoflg = 0; /* just do a who at startup */ time_t curtime; /* current time */ int linenumber = 0; /* current screen line number */ + int match_exact = 0; /* used by histmatch() */ /* flags set in .forumrc */ *************** *** 59,65 **** 0, /* autodel */ "", /* personalto */ 0, /* logreplay */ ! "none" /* alert */ }; int echomode = 1; /* is echo on or off? */ --- 63,70 ---- 0, /* autodel */ "", /* personalto */ 0, /* logreplay */ ! "none", /* alert */ ! 0 /* autoregister */ }; int echomode = 1; /* is echo on or off? */ Common subdirectories: icb-5.0.5/icb/help and icb-5.0.8/icb/help diff -c -r icb-5.0.5/icb/helpdata.c icb-5.0.8/icb/helpdata.c *** icb-5.0.5/icb/helpdata.c Wed Feb 10 15:10:26 1993 --- icb-5.0.8/icb/helpdata.c Wed Apr 6 19:10:42 1994 *************** *** 12,18 **** "hush", "input", "intro", - "news", "options", "primitives", "rules", --- 12,17 ---- *************** *** 26,33 **** "Group concepts and commands.", "Using hush to silence annoying users.", "Input and editing characters", ! "Introduction to ICB.", ! "News regarding release 0.10.", "Runtime options and environment variables", "Primitives for building icb commands.", "Rules for ICB use.", --- 25,31 ---- "Group concepts and commands.", "Using hush to silence annoying users.", "Input and editing characters", ! "Introduction to ICB..", "Runtime options and environment variables", "Primitives for building icb commands.", "Rules for ICB use.", *************** *** 38,73 **** char *ht_groups[] = { ! "All ICB users are divided into groups. A group may be thought of", "as a room, where what you say out loud goes to everyone else in that", ! "group.", "", "Users can jump from group to group, and create their own new groups.", ! "When the last person leaves a group, it dissapears.", "", ! "Moderated groups", "", ! "Creating your own group automatically makes you the moderator. As", ! "moderator, you have special privileges that allow you to control", ! "various things about the group, including it's topic, protection", ! "status, and who is allowed inside.", "", ! "The topic command will set the topic of the group. The status command", ! "will tell you about the group, and let you change its protection", ! "status. Invite may be used to invite users, and boot may be used to", ! "kick people out. Pass can be used to give moderatorship to someone", ! "else, or to relinquish it entirely.", "", ! "Restricted groups", "", ! "A moderator can make a group restricted, which means that you must be", ! "explicitly invited to join. Only the moderator may invite people into a", ! "restricted group.", "", ! "Invisible groups", "", ! "Invisible groups have names that start with \"..\". These groups, and the", ! "people in them, are completely invisible.", NULL }; --- 36,123 ---- char *ht_groups[] = { ! "All ICB users are divided into \"groups\". A group may be thought of", "as a room, where what you say out loud goes to everyone else in that", ! "group. In keeping with the CB analogy, you may think of a group as a", ! "channel.", "", "Users can jump from group to group, and create their own new groups.", ! "When the last person leaves a group, it disappears.", "", ! "Group Attributes", "", ! "Groups have three administrative attributes: moderatorship,", ! "visibility, and volume. The values of these attributes appear as", ! "three letters in parentheses next to the group name.", "", ! "1. Moderatorship", "", ! " A group may be public (p), moderated (m), or restricted (r). A public", ! " group has no moderator; no one person has any more control over", ! " the group than any other. A moderated group has a single ", ! " moderator, whose nickname appears in the group header and", ! " is starred in the group listing. Only the moderator may change", ! " the group attributes, set the group topic, boot people out of the", ! " group, and issue invitations into the group. A restricted group", ! " is a moderated group which no-one may enter without an invitation.", "", ! "2. Visibility", "", ! " A group may be visible (v), secret (s), or invisible (i). A visible", ! " group is one whose name and occupants are visible to everyone on", ! " ICB. A secret group is one whose occupants are visible, but whose", ! " name is not; the group name shows up as '*Secret'. This prevents", ! " anyone who does not know the group name from entering the group.", ! " An invisible group does not show up in the /w listing at all unless", ! " you are in that group. However, it is counted in the summary", ! " statistics at the bottom of the /w listing.", ! " ", ! "3. Volume", "", ! " A group may be quiet (q), normal (n), or loud (l). In a quiet group,", ! " no open messages are permitted. If you wish to receive only personal", ! " messages, a quiet group is a good place to hang out. In a normal", ! " group, open messages are permitted. Loud is the same as normal,", ! " with one exception: if the group is restricted and someone without an", ! " invitation tries to enter the group, the moderator will receive a", ! " message indicating that fact.", ! "", ! "Creating your own group automatically makes you the moderator of that group.", ! "Additionally, the moderator of any group may at any time decide to turn over", ! "moderatorship of that group to you. ", ! "", ! "Numeric groups are initially public, visible, and loud (pvl). Named groups", ! "are initially moderated, visible, and loud (mvl), with two exceptions. If", ! "the group name begins with a single period, the group is initially secret.", ! "If the group names begins with two or more periods, the group is initially", ! "invisible.", ! "", ! "Commands", ! "", ! "The following are the commands for manipulating groups. Commands marked with", ! "(m) may only be issued by the moderator if the group is moderated; otherwise", ! "anyone may issue them. Commands marked with (M) may only be issued by the", ! "moderator; if there is no moderator, no-one may issue them.", ! "", ! " group change to a new group, creating it if it", ! " does not exist.", ! "", ! "(m) topic [] set or display the current topic string", ! "", ! " status display group attributes, topic, and invitation", ! " list", ! "(m) status [pmrqnlvsi] set group attributes", ! "(M) status name change the group's name", ! "", ! " topic display the topic string", ! "(m) topic set the topic string", ! "", ! "(m) invite [] invite someone to the group", ! "", ! "(M) boot kick someone out of the group", ! "", ! "(M) pass [] turn moderation over to someone else, or", ! " give up moderation completely", NULL }; *************** *** 87,92 **** --- 137,147 ---- "you can reenable them by hushing them again. If you give the hush command", "without a nickname, a list of currently hushed people will be printed.", "", + "Hush operates on a nickname; a hushee may get around your hushlist by", + "changing his or her nickname. You may prevent this by using the s_hush", + "(server hush) command; this command lets you define a set of users", + "to ignore based on their sites. ", + "", "Hush is the preferred way of dealing with problem users. Other means", "include using the moderated group facility, and when all else fails,", "complaining to the administration. If a user is persistent enough that", *************** *** 98,130 **** { "EDITING CHARACTERS", "", ! "ICB uses simple line editing just like csh in BSD Unix. If you have", ! "these characters set for your terminal (with the stty command), icb will", ! "use them.", "", - "CHARACTER USUALLY", - "----------------- ----------", - "Delete Character ^H and DEL", - "Delete Word ^W", - "Delete Line ^U", - "Reprint Line ^R", "", "NICKNAME HISTORY", "", ! "ICB remembers to whom you send personal messages, and makes those names", "available by hitting the TAB key at the beginning of a line. This makes", "sending personals very easy. Try it! If you strike the TAB key more", "than once at the beginning of a line, it cycles through the list of", "personals, up to the number specified by the \"history\" variable.", "", ! "You may use the \"hclear\" to clear out this history list and start over.", "", "THE COMMAND CHARACTER", "", "All lines starting with the command character are assumed to be commands.", "If you wish to send a line of text starting with the command character,", ! "type it double at the beginning of the line. ", "", "TCL QUOTING", "", "Tcl has several characters with special meaning. For example, dollar", --- 153,197 ---- { "EDITING CHARACTERS", "", ! "ICB uses the GNU readline library for input lines. This library lets you", ! "edit commands as you type them and retrieve previous commands that you have", ! "typed. Readline will emulate either of the vi or emacs editors; you may control", ! "which by using the 'oset' command to set the 'editmode' variable to either", ! "\"vi\" or \"emacs\". The original default is picked up by the setting of your", ! "EDITOR environment variable; if that variable is not set, vi is used.", "", "", "NICKNAME HISTORY", "", ! "ICB remembers to whom you send messages, and makes those names", "available by hitting the TAB key at the beginning of a line. This makes", "sending personals very easy. Try it! If you strike the TAB key more", "than once at the beginning of a line, it cycles through the list of", "personals, up to the number specified by the \"history\" variable.", "", ! "If you have already typed a command and part of a nickname when you hit", ! "TAB, it will attempt to complete the nickname from the list in your ", ! "history. If you have already typed a command, a nickname, and more text on the", ! "line, then pressing TAB will cause the nickname to cycle through your history", ! "without affecting the rest of your command line.", "", + "You may selectively delete nicknames from your history with the \"hdel\"", + "command, or you may use the \"hclear\" to completely clear out this history list", + "and start over.", + "", + "If you set the value of the \"autodel\" variable to \"true\", then any nickname", + "that generates a \"not signed on\" error message will be automatically removed", + "from your history .", + "", + "", "THE COMMAND CHARACTER", "", "All lines starting with the command character are assumed to be commands.", "If you wish to send a line of text starting with the command character,", ! "type it double at the beginning of the line. The default command character", ! "is '/'; you may change it by changing the value of the 'commandchar' variable.", "", + "", "TCL QUOTING", "", "Tcl has several characters with special meaning. For example, dollar", *************** *** 186,192 **** "", "Still assuming your name was \"x\". You could reply with:", "", ! "/m joe Joe you are being silly.", "", "Which would only go to Joe.", "", --- 253,259 ---- "", "Still assuming your name was \"x\". You could reply with:", "", ! "/m joe Joe, you are being silly.", "", "Which would only go to Joe.", "", *************** *** 193,199 **** "I hope this is enough to get you started talking. In other help files,", "you can learn more about groups, how to change groups, how to make your", "own, etc. I suggest you read--or at least skim--all of the help files.", ! "That way, you'll be able to get the most out of icb and ICB.", "", "As a final note, please read the rules. Not only do they say what is", "tolerated and what is not (ICB is pretty liberal), but they also tell", --- 260,266 ---- "I hope this is enough to get you started talking. In other help files,", "you can learn more about groups, how to change groups, how to make your", "own, etc. I suggest you read--or at least skim--all of the help files.", ! "That way, you'll be able to get the most out of icb.", "", "As a final note, please read the rules. Not only do they say what is", "tolerated and what is not (ICB is pretty liberal), but they also tell", *************** *** 201,286 **** "", "Have fun, and feel free to send me suggestions and bug reports.", "", ! "Sean Casey", ! "", NULL }; ! char *ht_news[] = { ! "TCL has been incorporated into client, making the command set", ! "extendable and programmable. ", "", ! "Hush has been implemented. It only currently works by nickname, but", ! "there are plans to extend it in various ways.", "", ! "A review buffer is now implemented and may be accessed with the \"display\"", ! "command and the \"bufferlines\" variable.", "", ! "Paging is now implemented, usable with the \"paging\" variable.", "", ! "The online help system has been totally redone. It has help encoded", ! "into the client sorted by subject. This makes icb independent of outside", ! "files and easier to correctly install.", "", ! "Murgil now accepts and properly uses numeric addresses. This speeds things", ! "up by bypassing the nameserver. It also makes icb more portable.", "", ! "The shell command \"/!\" works better, faithfully looks at the \"SHELL\"", ! "environment variable, and no longer requires a space between the", ! "exclamation mark and the command.", "", ! "A new status command shows you the information for the current group, and", ! "what groups you have been invited to.", "", ! "Session logging and \"alert\" have been temporarily removed. That", ! "facility will undergo an upgrade next release. It is hoped that output", ! "can be hooked into a Tcl display routine, making message displays user", ! "customizable.", "", ! "The groupname output has been changed yet again in the never ending", ! "search for aesthetically pleasing output.", "", ! "The who command has been extended to allow a groupname to be specified", ! "as an argument, giving the list of users for just that group.", "", ! "ICB variables are now set with the \"fset\" command, which also can be used", ! "to display the value of those variables.", "", ! "The routine to determine your login name should now work under programs", ! "like \"script\" and \"screen\".", "", - "ICB reads the editing characters from the tty struct. This means that users", - "with modified characters will be able to use those.", "", - "Internally, some of the code has been cleaned up and de-linted.", - NULL - }; - - char *ht_options[] = - { - "Runtime options for icb:", - "", - " -c Try to clear the arguments from the command line. This", - " won't work for all systems, and may even crash on some.", - "", - " -g group Enter directly into \"group\" instead of a default group.", - "", - " -n nick Enter using nickname \"nick\".", - "", - " -r Start in restricted mode. See the help on variables.", - "", - " -w Give a who report without signing on.", - "", - "", "ICB environment variables:", "", ! " FNRC Name of file to source instead of \"$HOME/.fnrc\". If this", " path is not an absolute path name, it is considered to be", ! " relative to HOME. If FNRC is specified and the corresponding", " file is not found, and error message will be printed.", "", ! " FORUMNAME Default nickname to use, instead of your login id.", "", " SHELL Shell to use for shellouts. If unspecified then /bin/sh", " is assumed.", --- 268,315 ---- "", "Have fun, and feel free to send me suggestions and bug reports.", "", ! "Mark J. Reed", ! "", NULL }; ! char *ht_options[] = { ! "Runtime options for icb (these may be abbreviated):", "", ! " -nickname nick sign on with nickname nick.", "", ! " -password pass set password to pass (implies -clear).", "", ! " -password - prompt for password.", "", ! " -group group sign on into group group.", "", ! " -server name connect to server named name.", "", ! " -host host connect to server on host host.", "", ! " -port port try to connect to port port.", "", ! " -list list known servers, in order.", "", ! " -clear wipe args from command line.", "", ! " -who see who's on; don't sign on.", "", ! " -restricted restricted mode", "", ! " -help display help message.", "", "", "ICB environment variables:", "", ! " ICBRC Name of file to read instead of \"$HOME/.icbnrc\". If this", " path is not an absolute path name, it is considered to be", ! " relative to HOME. If ICBRC is specified and the corresponding", " file is not found, and error message will be printed.", "", ! " ICBNAME Default nickname to use, instead of your login id.", "", " SHELL Shell to use for shellouts. If unspecified then /bin/sh", " is assumed.", *************** *** 428,434 **** " to see any ICB messages that they would not normally be", " permitted to see. Please don't mess it up for others.", "", ! "What is \"lewd\" or \"offensive\" is up to the ICB administration. If", "you have doubts, don't use it. Harassment is also largely a matter of", "opinion.", "", --- 457,463 ---- " to see any ICB messages that they would not normally be", " permitted to see. Please don't mess it up for others.", "", ! "What is \"lewd\" or \"offensive\" is up to the ICB server administrator. If", "you have doubts, don't use it. Harassment is also largely a matter of", "opinion.", "", *************** *** 435,445 **** "Violations are usually straighted out via friendly email. If that fails", "to work, a lot of things can happen. In some cases in the past, remote", "administrations have been contacted, and even whole sites have been", ! "locked out. I am not above contacting the law if a persistent problem", ! "user simply won't quit.", "", "If you find someone violating the rules, please contact the ICB", ! "administrator. The address is available with the version command.", NULL }; --- 464,473 ---- "Violations are usually straighted out via friendly email. If that fails", "to work, a lot of things can happen. In some cases in the past, remote", "administrations have been contacted, and even whole sites have been", ! "locked out. ", "", "If you find someone violating the rules, please contact the ICB", ! "server administrator. The address is available with the \"version\" command.", NULL }; *************** *** 490,495 **** --- 518,529 ---- " a nickname is not signed on, that nickname will be deleted from your", " \"tab\" history.", "", + "autoreg (boolean) default: false", + "", + " If true, whenever the server sends a message indicating that you must", + " send your password to register your nickname, the client will prompt you", + " for your password and send it to the server.", + "", "beeps (boolean) default: true", "", " If true, a received beep will make your terminal beep (with a ^G).", *************** *** 556,562 **** " group.", " ", " If you specify the -permanent flag on the /message command, this", ! " variable will be set to the target of that /m. The -lear flag of", " /message will unset this variable.", "", "pauseonshell (boolean) default: false", --- 590,596 ---- " group.", " ", " If you specify the -permanent flag on the /message command, this", ! " variable will be set to the target of that /m. The -clear flag of", " /message will unset this variable.", "", "pauseonshell (boolean) default: false", *************** *** 598,604 **** ht_hush, ht_input, ht_intro, - ht_news, ht_options, ht_primitives, ht_rules, --- 632,637 ---- diff -c -r icb-5.0.5/icb/history.c icb-5.0.8/icb/history.c *** icb-5.0.5/icb/history.c Wed Feb 10 15:10:26 1993 --- icb-5.0.8/icb/history.c Wed Apr 6 19:10:43 1994 *************** *** 6,15 **** /* message history routines */ ! STRLIST *histhead, *histtail; /* head and tail of history list */ ! int histnum = 0; /* current number of history entries */ ! STRLIST *hp; /* user current location in history list */ /* add a username to the list */ --- 6,16 ---- /* message history routines */ ! static STRLIST *histhead = (STRLIST *)0; /* head of history list */ ! static STRLIST *histtail = (STRLIST *)0; /* tail of history list */ ! static int histnum = 0; /* current number of history entries */ ! static STRLIST *hp = (STRLIST *) 0; /* user current location in history list */ /* add a username to the list */ *************** *** 67,77 **** char * histget() { ! STRLIST *p = hp; - hp = hp->next; if (hp == 0) hp = histhead; return(p->str); } --- 68,85 ---- char * histget() { ! STRLIST *p; if (hp == 0) hp = histhead; + + p = hp; + if (hp != 0) + { + hp = hp->next; + if (hp == 0) + hp = histhead; + } return(p->str); } *************** *** 115,118 **** --- 123,188 ---- histnum = 0; hp = histhead = histtail = 0; return 0; + } + + /* find a name with a given prefix - case-insensitive + * if unambiguous match is found, return pointer to it, set match_exact to 1, + * and make matched nickname the top of the history + * if ambiguous match is found, return pointer to greatest common substring + * of all matches and set match_exact to 0. + * if no match is found, return NULL + */ + + char * + histmatch(prefix) + char *prefix; + { + STRLIST *p, *fp; + int len; + char *p1, *p2, *found; + static char match[MAX_NICKLEN]; + + len = strlen(prefix); + found = NULL; + match_exact = 0; + + /* printf("\rTrying to match \"%s\"\n", prefix);*/ + + for (p=histhead; p; p=p->next) + { + /* printf("\tTrying \"%s\":", p->str); */ + if (!strncasecmp(prefix,p->str,len)) + { + /*printf("Matches!\n"); */ + if (!found) + { + fp = p; + strcpy(match, p->str); + found = match; + match_exact = 1; + } + else + { + match_exact = 0; + for (p1=found+len, p2=p->str+len; + *p1 && *p2 && ccasecmp(*p1,*p2); + ++p1, ++p2) + { + } + *p1 = '\0'; + } + } + else + { + /* printf("Nope.\n"); */ + } + + } + if (match_exact==1) /* we're returning a full nickname */ + { + hp = fp->next; + if (!hp) + hp = histhead; + } + return found; } diff -c -r icb-5.0.5/icb/icb.h icb-5.0.8/icb/icb.h *** icb-5.0.5/icb/icb.h Wed Feb 10 15:10:27 1993 --- icb-5.0.8/icb/icb.h Wed Apr 6 19:10:43 1994 *************** *** 42,47 **** --- 42,49 ---- char *personalto; /* 'permanent' personal message recipient */ int logreplay; /* should replays go into the log by default? */ char *alert; /* alert mode */ + int autoregister; /* prompt for password when [=Register=] msg + received? */ } GLOBS; /* info on the user's tty */ diff -c -r icb-5.0.5/icb/main.c icb-5.0.8/icb/main.c *** icb-5.0.5/icb/main.c Wed Feb 10 15:10:28 1993 --- icb-5.0.8/icb/main.c Wed Apr 6 19:10:43 1994 *************** *** 1,9 **** ! /* Copyright (c) 1990 by Carrick Sean Casey. */ /* For copying and distribution information, see the file COPYING. */ #include "icb.h" #include "externs.h" - #include "../version.h" #include #include #include "getswitch.h" --- 1,10 ---- ! /* Portions copyright (c) 1990 by Carrick Sean Casey. */ ! /* Portions copyright (c) 1990-1993, 1994 Mark J. Reed */ /* For copying and distribution information, see the file COPYING. */ + #include "icb.h" #include "externs.h" #include #include #include "getswitch.h" *************** *** 217,229 **** /* initialize everybody and say hello. */ if (gv.interactive) { tclinit(); readlineinit(); if (restrictflg && !gv.restricted) restrict(); - sprintf(mbuf, "ICB revision %s.\r\n", VERSION); - write(1, mbuf, strlen(mbuf)); } /* try to connect to port - if it fails, start server if we are on */ --- 218,231 ---- /* initialize everybody and say hello. */ + write(2, icb_version, strlen(icb_version)); + write(2, "\n", 1); + if (gv.interactive) { tclinit(); readlineinit(); if (restrictflg && !gv.restricted) restrict(); } /* try to connect to port - if it fails, start server if we are on */ *************** *** 298,303 **** --- 300,306 ---- exit(0); } + sighandler icbexit() { /* retore term modes */ diff -c -r icb-5.0.5/icb/msgs.c icb-5.0.8/icb/msgs.c *** icb-5.0.5/icb/msgs.c Wed Feb 10 15:10:29 1993 --- icb-5.0.8/icb/msgs.c Wed Apr 6 19:10:44 1994 *************** *** 175,180 **** --- 175,201 ---- putl("[=Error=] got bad status message packet", PL_ALL); return; } + + if (!strcmp(fields[0], "Register") && gv.autoregister) + { + regnick((char *)0); + return; + } + + if (!strcmp(fields[0], "Pass")) + { + if (!strncmp(fields[1], "Password changed to", 19)) + { + putl("[=Pass=] Password successfully changed", PL_ALL); + return; + } + else if (!strncmp(fields[1], "Password set to", 15)) + { + putl("[=Pass=] Password set", PL_ALL); + return; + } + } + if (!strcmp(fields[0], "RSVP")) { char *user; *************** *** 240,246 **** } else if (strcmp(fields[0], "wh") == 0) { if (m_whoheader) /* header for a who listing */ ! putl(" Nickname Idle Sign-On Account", PL_SCR | PL_LOG); } else if (strcmp(fields[0], "wg") == 0) { --- 261,267 ---- } else if (strcmp(fields[0], "wh") == 0) { if (m_whoheader) /* header for a who listing */ ! putl(" Nickname Idle Sign-On Account", PL_SCR | PL_LOG); } else if (strcmp(fields[0], "wg") == 0) { *************** *** 255,261 **** putl(mbuf, PL_SCR | PL_LOG); } else { sprintf(mbuf2, "Group:%s", fields[1]); ! sprintf(mbuf, "%-9s %s", mbuf2, fields[2]); putl(mbuf, PL_SCR | PL_LOG); } /* } else { --- 276,282 ---- putl(mbuf, PL_SCR | PL_LOG); } else { sprintf(mbuf2, "Group:%s", fields[1]); ! sprintf(mbuf, "%-11s %s", mbuf2, fields[2]); putl(mbuf, PL_SCR | PL_LOG); } /* } else { *************** *** 289,295 **** putl(mbuf, PL_ALL); for (index = 0; ! pkt[index] && (!isspace(pkt[index])) && (index < MAX_NICKLEN-1); ++index) { nick[index]=pkt[index]; --- 310,316 ---- putl(mbuf, PL_ALL); for (index = 0; ! pkt[index] && (!isspace(pkt[index])) && (index < MAX_NICKLEN); ++index) { nick[index]=pkt[index]; *************** *** 329,343 **** { int seconds = atoi(num); static char idletime[8]; ! if (seconds >= 60) { ! if (seconds < 3600) ! sprintf(idletime, "%2dm", seconds / 60); ! else ! sprintf(idletime, "%2dh", seconds / 3600); ! return(idletime); ! } else ! return(" -"); } --- 350,368 ---- { int seconds = atoi(num); static char idletime[8]; + int hours, minutes; ! if (seconds < 60) ! sprintf(idletime, "%6s", "-"); ! else if (seconds < 3600) ! sprintf(idletime, "%5dm", seconds / 60 ); ! else ! { ! hours = seconds/3600; ! minutes = (seconds - hours * 3600)/60; ! sprintf(idletime, "%2dh%2dm", hours, minutes); ! } ! return idletime; } diff -c -r icb-5.0.5/icb/oset.c icb-5.0.8/icb/oset.c *** icb-5.0.5/icb/oset.c Wed Feb 10 15:10:30 1993 --- icb-5.0.8/icb/oset.c Wed Apr 6 19:10:44 1994 *************** *** 26,31 **** --- 26,32 ---- VARIABLE vars[] = { { "alert", V_STRING, (char *)&gv.alert }, { "autodel", V_BOOLEAN, (char *)&gv.autodel }, + { "autoreg", V_BOOLEAN, (char *)&gv.autoregister }, { "beeps", V_BOOLEAN, (char *)&gv.beeps }, { "bufferlines", V_NONNEG, (char *)&gv.bufferlines }, { "commandchar", V_CHAR, (char *)&gv.cmdchar }, Common subdirectories: icb-5.0.5/icb/perl and icb-5.0.8/icb/perl diff -c -r icb-5.0.5/icb/protos.h icb-5.0.8/icb/protos.h *** icb-5.0.5/icb/protos.h Wed Feb 10 15:10:31 1993 --- icb-5.0.8/icb/protos.h Wed Apr 6 19:10:45 1994 *************** *** 3,9 **** If you edit this file, your changes may be lost later. */ ! STRLIST *strgetnode(char *str, STRLIST *head, int caseindep); STRLIST *strmakenode(int size); char *ampm(time_t secs, int style); --- 3,9 ---- If you edit this file, your changes may be lost later. */ ! #include "externs.h" STRLIST *strgetnode(char *str, STRLIST *head, int caseindep); STRLIST *strmakenode(int size); char *ampm(time_t secs, int style); *************** *** 18,24 **** char *strscat(int va_alist,...); char *tildexpand(char *s); int addusage(char *name, int type, char *args, char *usage); ! int askquit(void); int beep(char *pkt); int bufferadd(char *text); int bufferlist(int lines); --- 18,24 ---- char *strscat(int va_alist,...); char *tildexpand(char *s); int addusage(char *name, int type, char *args, char *usage); ! sighandler askquit(); int beep(char *pkt); int bufferadd(char *text); int bufferlist(int lines); *************** *** 64,70 **** --- 64,74 ---- int inserttab(void); int ishushed(char *nick); int lcaseit(char *s); + #ifdef linux + int linebuffer(FILE *fp); + #else int linebuffer(struct _iobuf *fp); + #endif int listusage(char *name); int listvars(char *name); int logging(void); *************** *** 113,119 **** int strlinktail(STRLIST *s, STRLIST **head, STRLIST **tail); int strncasecmp(char *s1, char *s2, register int n); int strunlink(STRLIST *s, STRLIST **head, STRLIST **tail); ! int suspend(void); int tclinit(void); int tclreadicbrc(void); int tclrestrict(void); --- 117,123 ---- int strlinktail(STRLIST *s, STRLIST **head, STRLIST **tail); int strncasecmp(char *s1, char *s2, register int n); int strunlink(STRLIST *s, STRLIST **head, STRLIST **tail); ! sighandler suspend(); int tclinit(void); int tclreadicbrc(void); int tclrestrict(void); *************** *** 135,137 **** --- 139,142 ---- struct server *getserver(void); struct server *getservbyname(char *name); void listservers(void); + sighandler icbexit(); diff -c -r icb-5.0.5/icb/readlineinit.c icb-5.0.8/icb/readlineinit.c *** icb-5.0.5/icb/readlineinit.c Wed Feb 10 15:10:32 1993 --- icb-5.0.8/icb/readlineinit.c Wed Apr 6 19:10:46 1994 *************** *** 15,20 **** --- 15,21 ---- * bind the tab key */ rl_bind_key_in_map('\t', handletab, vi_insertion_keymap); + rl_bind_key_in_map('\t', handletab, vi_movement_keymap); rl_bind_key_in_map('\t', handletab, emacs_standard_keymap); rl_vi_editing_mode(); /* default to vi, dammit. */ *************** *** 25,31 **** editor = (char *)getenv("VISUAL"); if (editor != NULL) ! if (strcmp(basename(editor),"emacs")==0) { rl_emacs_editing_mode(); gv.editmode = "emacs"; --- 26,32 ---- editor = (char *)getenv("VISUAL"); if (editor != NULL) ! if (strcmp((char *)basename(editor),"emacs")==0) { rl_emacs_editing_mode(); gv.editmode = "emacs"; diff -c -r icb-5.0.5/icb/register.c icb-5.0.8/icb/register.c *** icb-5.0.5/icb/register.c Wed Apr 6 19:11:43 1994 --- icb-5.0.8/icb/register.c Wed Apr 6 19:10:47 1994 *************** *** 0 **** --- 1,21 ---- + /* Copyright 1993 by Mark J. Reed */ + /* For copying and distribution information, see the file COPYING. */ + + /* primitive to prompt for password and send registration command to server */ + + #include "icb.h" + #include "externs.h" + + void + regnick(password) + char *password; + { + char message[256]; + + if (!password) + password = (char *)getpass("Password:"); + + sprintf(message,"p %s", password); + sendpersonal("server",message,-1); + } + diff -c -r icb-5.0.5/icb/s_bump.c icb-5.0.8/icb/s_bump.c *** icb-5.0.5/icb/s_bump.c Wed Apr 6 19:11:44 1994 --- icb-5.0.8/icb/s_bump.c Wed Apr 6 19:10:48 1994 *************** *** 0 **** --- 1,30 ---- + /* Copyright 1994 by Mark J. Reed */ + /* For copying and distribution information, see the file COPYING. */ + + /* primitive to bump a user with your registered nickname - + will prompt for the password (VMS server) */ + + #include "icb.h" + #include "externs.h" + + s_bump(TARGLIST) + TARGDEFS + { + static char *usage = "usage: s_bump nickname [password]"; + char *nick, *password; + char message[256]; + + if (argc > 3 || argc < 2) + TRETURNERR(usage) + + nick = argv[1]; + + if (argc > 2) + password = argv[2]; + else + password = (char *) getpass ("Enter password:"); + + sprintf(message,"bump %s %s", nick, password); + sendpersonal("server",message,-1); + return(TCL_OK); + } diff -c -r icb-5.0.5/icb/s_chpw.c icb-5.0.8/icb/s_chpw.c *** icb-5.0.5/icb/s_chpw.c Wed Apr 6 19:11:44 1994 --- icb-5.0.8/icb/s_chpw.c Wed Apr 6 19:10:49 1994 *************** *** 0 **** --- 1,42 ---- + /* Copyright 1994 by Mark J. Reed */ + /* For copying and distribution information, see the file COPYING. */ + + /* primitive to prompt for old and new passwords and change them + (VMS server) */ + + #include "icb.h" + #include "externs.h" + + s_chpw(TARGLIST) + TARGDEFS + { + static char *usage = "usage: s_chpw [old] [new]"; + char old[64], new1[64], new2[64]; + int match; + char message[256]; + + if (argc > 3 || argc < 1) + TRETURNERR(usage) + + if (argc > 1 && argv[1][0]) + strcpy(old, argv[1]); + else + strcpy(old, (char *) getpass ("Enter old password:")); + + if (argc > 2) + strcpy(new1, argv[2]); + else + { + match = 1; + while (match) + { + strcpy(new1, (char *) getpass("Enter new password:")); + strcpy(new2, (char *) getpass("Re-enter new password:")); + if (match = strcmp(new1,new2)) + putl("They don't match; try again", PL_SCR); + } + } + sprintf(message,"cp %s %s", old, new1); + sendpersonal("server",message,-1); + return(TCL_OK); + } diff -c -r icb-5.0.5/icb/s_open.c icb-5.0.8/icb/s_open.c *** icb-5.0.5/icb/s_open.c Wed Feb 10 15:10:35 1993 --- icb-5.0.8/icb/s_open.c Wed Apr 6 19:10:50 1994 *************** *** 10,18 **** s_open(TARGLIST) TARGDEFS { ! static char *usage = "usage: s_send text ..."; ! if (argc < 2 || !*argv[1]) TRETURNERR(usage) csendopen(catargs(&argv[1])); --- 10,18 ---- s_open(TARGLIST) TARGDEFS { ! static char *usage = "usage: s_open text ..."; ! if (argc < 2 || !argv[1][0]) TRETURNERR(usage) csendopen(catargs(&argv[1])); diff -c -r icb-5.0.5/icb/s_person.c icb-5.0.8/icb/s_person.c *** icb-5.0.5/icb/s_person.c Wed Feb 10 15:10:36 1993 --- icb-5.0.8/icb/s_person.c Wed Apr 6 19:10:51 1994 *************** *** 1,4 **** --- 1,5 ---- /* Copyright 1990 by Carrick Sean Casey. */ + /* Copyright 1990-1993,1994 by Mark J. Reed */ /* For copying and distribution information, see the file COPYING. */ /* primitive to send a personal message */ *************** *** 81,93 **** char *text; int echoflag; { ! char *p, *findspace(); ! int maxlen, length; ! char ch; int pl_flags; ! pl_flags = PL_BUF | PL_LOG | (echoflag ? PL_SCR : 0) ; if (!nick) return; --- 82,104 ---- char *text; int echoflag; { ! char *buf; int pl_flags; ! switch (echoflag) ! { ! case 0: ! pl_flags = PL_BUF; ! break; + case -1: + pl_flags = 0; + break; + + default: + pl_flags = PL_BUF | PL_SCR; + } + if (!nick) return; *************** *** 109,146 **** histput(nick); ! maxlen = MAX_INPUTSTR-strlen(nick)-4; ! ! while (strlen(text) > maxlen) { ! ch = '\0'; ! ! length = maxlen; ! ! while (!isspace(text[length-1])&&length>1) length--; ! ! if (length<=1) ! { ! length = maxlen; ! ch = text[length-1]; ! text[length-1] = '-'; ! } ! ! sprintf(mbuf, "%s ", nick); ! strncat(mbuf,text,length); ! sendcmd("m", mbuf); ! sprintf(mbuf2,"%cm %s",gv.cmdchar, mbuf); ! putl(mbuf2, pl_flags); ! ! if (ch) ! { ! text[--length] = ch; ! } ! text += length; } ! sprintf(mbuf, "%s %s", nick, text); ! sendcmd("m", mbuf); ! sprintf(mbuf2,"%cm %s",gv.cmdchar, mbuf); ! putl(mbuf2, pl_flags); ! } --- 120,133 ---- histput(nick); ! buf = (char *)malloc(strlen(nick)+strlen(text)+5); ! if (!buf) { ! putl("[=Error=] No memory to build packet",PL_SCR); ! return 0; } ! ! sprintf(buf,"%cm %s %s", gv.cmdchar, nick, text); ! putl(buf, pl_flags); ! sendcmd("m", buf+3); } diff -c -r icb-5.0.5/icb/s_register.c icb-5.0.8/icb/s_register.c *** icb-5.0.5/icb/s_register.c Wed Apr 6 19:11:44 1994 --- icb-5.0.8/icb/s_register.c Wed Apr 6 19:10:51 1994 *************** *** 0 **** --- 1,24 ---- + /* Copyright 1993 by Mark J. Reed */ + /* For copying and distribution information, see the file COPYING. */ + + /* primitive to prompt for password and send registration command to server */ + + #include "icb.h" + #include "externs.h" + + s_register(TARGLIST) + TARGDEFS + { + static char *usage = "usage: s_register [password]"; + char *password; + char message[256]; + + if (argc > 2 || argc < 1) + TRETURNERR(usage) + + if (argc == 2) + regnick((char *)0); + else + regnick(argv[1]); + return(TCL_OK); + } diff -c -r icb-5.0.5/icb/send.c icb-5.0.8/icb/send.c *** icb-5.0.5/icb/send.c Wed Feb 10 15:10:38 1993 --- icb-5.0.8/icb/send.c Wed Apr 6 19:10:53 1994 *************** *** 6,53 **** #include "icb.h" #include "externs.h" /* send normal open group message to the server */ csendopen(txt) char *txt; { ! int length; ! char *p; ! char ch; ! while (strlen(txt) > MAX_INPUTSTR) { ! length = MAX_INPUTSTR; ! while (!isspace(txt[length-1])&&length>1) length--; ! ch='\0'; ! if (length <= 1) ! { ! length=MAX_INPUTSTR; ! ch = txt[length-1]; ! txt[length-1] = '-'; ! } ! sprintf(pbuf,"%c",M_OPEN); ! strncat(pbuf,txt,length); ! bufferadd(pbuf+1); setlen; sendit(pp); ! strncpy(mbuf,txt,length); putl(mbuf, PL_BUF | PL_LOG); - - if (ch) - { - txt[--length]=ch; - } - txt+=length; } ! sprintf(pbuf,"%c",M_OPEN); ! strncat(pbuf,txt,MAX_INPUTSTR); ! setlen; ! sendit(pp); ! putl(txt, PL_BUF | PL_LOG); ! } --- 6,39 ---- #include "icb.h" #include "externs.h" + char **msplit(); + char *findspace(); + /* send normal open group message to the server */ csendopen(txt) char *txt; { ! char **p; ! int i; ! p = msplit(txt, MAX_INPUTSTR); ! if (!p) { ! putl("[=Error=] Out of memory for splitting packet.",PL_SCR); ! return 0; ! } ! for (i=0; p[i]; ++i) ! { sprintf(pbuf,"%c",M_OPEN); ! strcat(pbuf,p[i]); setlen; sendit(pp); ! strcpy(mbuf,p[i]); putl(mbuf, PL_BUF | PL_LOG); } ! } *************** *** 77,83 **** sendcmd(cmd, args) char *cmd, *args; { ! sprintf(pbuf, "%c%s\001%s", M_COMMAND, cmd, args); ! setlen; ! sendit(pp); } --- 63,186 ---- sendcmd(cmd, args) char *cmd, *args; { ! char *nick; ! char **p; ! int i; ! int maxlen; ! ! if (strlen(cmd) > MAX_INPUTSTR - 5 ) ! { ! fprintf(stderr,"[=Error=] Command too long.\n"); ! return 1; ! } ! ! if (!args) ! { ! sprintf(pbuf, "%c%s\001", M_COMMAND, cmd); ! setlen; ! sendit(pp); ! return 0; ! } ! ! maxlen = MAX_INPUTSTR - strlen(cmd) - 1; ! ! /* special case commands that take a nickname */ ! if ((strcasecmp(cmd, "write")==0) || (strcasecmp(cmd, "m")==0)) ! { ! nick=args; ! args=findspace(args); ! maxlen = maxlen - strlen(nick) - 1; ! } ! else ! nick = NULL; ! ! p = msplit(args, maxlen); ! if (!p) ! { ! putl("[=Error=] Out of memory to split packet", PL_SCR); ! return 0; ! } ! ! for (i=0; p[i]; ++i) ! { ! sprintf(pbuf,"%c%s\001",M_COMMAND, cmd); ! if (nick) ! { ! strcat(pbuf, nick); ! strcat(pbuf, " "); ! } ! strcat(pbuf,p[i]); ! setlen; ! sendit(pp); ! } ! } ! ! ! static char **chunks; ! ! ! /* ! * split a message up into smaller chunks ! */ ! char **msplit(s,size) ! char *s; ! int size; ! { ! int nelem; ! int i; ! int length; ! char ch; ! ! if (chunks) ! { ! for (i=0; chunks[i]; ++i) ! free(chunks[i]); ! free(chunks); ! } ! ! if (!s) ! { ! chunks = (char **)calloc(nelem, sizeof(char *)); ! chunks[0] = (char *) 0; ! return chunks; ! } ! ! nelem = strlen(s)/size+2; ! chunks = (char **)calloc(nelem, sizeof(char *)); ! ! for ( i = 0 ; strlen(s) > size ; ++i) ! { ! length = size; ! while (!isspace(s[length-1])&&length>1) ! length--; ! ! ch='\0'; ! if (length <= 1) ! { ! length=size; ! ch = s[length-1]; ! s[length-1] = '-'; ! } ! ! chunks[i] = (char *)malloc(length); ! if (!chunks[i]) ! { ! putl("[=Error=] Out of memory", PL_SCR); ! return (char **) 0; ! } ! strncpy(chunks[i],s,length); ! chunks[i][length]='\0'; ! s+=length; ! if (ch) ! *(--s) = ch; ! } ! chunks[i] = (char *)malloc(strlen(s)+1); ! if (!chunks[i]) ! { ! putl("[=Error=] Out of memory", PL_SCR); ! return (char **) 0; ! } ! strcpy(chunks[i],s); ! chunks[++i] = (char *) 0; ! return chunks; } diff -c -r icb-5.0.5/icb/signals.c icb-5.0.8/icb/signals.c *** icb-5.0.5/icb/signals.c Wed Feb 10 15:10:40 1993 --- icb-5.0.8/icb/signals.c Wed Apr 6 19:10:53 1994 *************** *** 19,25 **** trapsignals() { ! int askquit(), suspend(), icbexit(); /* exit on a hangup or terminate signal */ signal(SIGHUP, icbexit); --- 19,25 ---- trapsignals() { ! /* sighandler askquit(), suspend(), icbexit(); */ /* exit on a hangup or terminate signal */ signal(SIGHUP, icbexit); *************** *** 37,42 **** --- 37,43 ---- /* this technique is something I learned from some other software */ /* someday I need to learn just why it works */ + sighandler suspend() { restoreterm(); *************** *** 52,57 **** --- 53,59 ---- /* verify that the user wants to quit */ + sighandler askquit() { int c; *************** *** 64,70 **** oem = echomode; noecho(); if ((c = getchar()) == EOF) ! icbexit(); out[0] = c; write(1, out, 3); --- 66,72 ---- oem = echomode; noecho(); if ((c = getchar()) == EOF) ! (void)icbexit(); out[0] = c; write(1, out, 3); diff -c -r icb-5.0.5/icb/strccmp.c icb-5.0.8/icb/strccmp.c *** icb-5.0.5/icb/strccmp.c Wed Feb 10 15:10:40 1993 --- icb-5.0.8/icb/strccmp.c Wed Apr 6 19:10:54 1994 *************** *** 87,89 **** --- 87,95 ---- return(0); return(n < 0 ? 0 : cm[*us1] - cm[*--us2]); } + + ccasecmp(c1,c2) + { + register char *cm = charmap; + return (cm[c1]==cm[c2]); + } diff -c -r icb-5.0.5/icb/strings.c icb-5.0.8/icb/strings.c *** icb-5.0.5/icb/strings.c Wed Feb 10 15:10:41 1993 --- icb-5.0.8/icb/strings.c Wed Apr 6 19:10:54 1994 *************** *** 15,22 **** filternickname(txt) char *txt; { - char *index(); - for (; *txt != '\0'; txt++) { if ((*txt >= 'A' && *txt <= 'Z') || (*txt >= 'a' && *txt <= 'z') || --- 15,20 ---- *************** *** 46,53 **** filtergroupname(txt) char *txt; { - char *index(); - for (; *txt != '\0'; txt++) { if ((*txt >= 'A' && *txt <= 'Z') || (*txt >= 'a' && *txt <= 'z') || --- 44,49 ---- diff -c -r icb-5.0.5/icb/tcl.c icb-5.0.8/icb/tcl.c *** icb-5.0.5/icb/tcl.c Wed Feb 10 15:10:41 1993 --- icb-5.0.8/icb/tcl.c Wed Apr 6 19:10:55 1994 *************** *** 3,8 **** --- 3,12 ---- /* TCL interface */ + #ifdef linux + #include + #endif + #include "icb.h" #include "externs.h" #include *************** *** 24,35 **** --- 28,43 ---- int c_shell(); int c_time(); int c_usage(); + int c_version(); int s_admin(); int s_beep(); + int s_bump(); + int s_chpw(); int s_motd(); int s_group(); int s_open(); int s_personal(); + int s_register(); int s_send(); int s_user(); int s_version(); *************** *** 59,70 **** --- 67,82 ---- Tcl_CreateCommand(interp, "c_shell", c_shell, (ClientData) 0); Tcl_CreateCommand(interp, "c_time", c_time, (ClientData) 0); Tcl_CreateCommand(interp, "c_usage", c_usage, (ClientData) 0); + Tcl_CreateCommand(interp, "c_version", c_version, (ClientData) 0); Tcl_CreateCommand(interp, "s_admin", s_admin, (ClientData) 0); Tcl_CreateCommand(interp, "s_beep", s_beep, (ClientData) 0); + Tcl_CreateCommand(interp, "s_bump", s_bump, (ClientData) 0); + Tcl_CreateCommand(interp, "s_chpw", s_chpw, (ClientData) 0); Tcl_CreateCommand(interp, "s_motd", s_motd, (ClientData) 0); Tcl_CreateCommand(interp, "s_group", s_group, (ClientData) 0); Tcl_CreateCommand(interp, "s_open", s_open, (ClientData) 0); Tcl_CreateCommand(interp, "s_personal", s_personal, (ClientData) 0); + Tcl_CreateCommand(interp, "s_register", s_register, (ClientData) 0); Tcl_CreateCommand(interp, "s_send", s_send, (ClientData) 0); Tcl_CreateCommand(interp, "s_user", s_user, (ClientData) 0); Tcl_CreateCommand(interp, "s_version", s_version, (ClientData) 0); *************** *** 93,99 **** if (*interp->result != 0) puts(interp->result); } - free(path); } --- 105,110 ---- diff -c -r icb-5.0.5/icb/unix.c icb-5.0.8/icb/unix.c *** icb-5.0.5/icb/unix.c Wed Feb 10 15:10:42 1993 --- icb-5.0.8/icb/unix.c Wed Apr 6 19:10:55 1994 *************** *** 14,20 **** --- 14,26 ---- #undef gtty #ifndef SYSV + + #ifdef linux + #include + #else #include + #endif + #define TTYSTRUCT sgttyb #define stty(fd,buf) ioctl((fd),TIOCSETN,(buf)) #define gtty(fd,buf) ioctl((fd),TIOCGETP,(buf)) diff -c -r icb-5.0.5/icb/help/groups icb-5.0.8/icb/help/groups *** icb-5.0.5/icb/help/groups Wed Feb 10 15:10:48 1993 --- icb-5.0.8/icb/help/groups Wed Apr 6 19:10:58 1994 *************** *** 1,32 **** groups Group concepts and commands. ! All forumnet users are divided into groups. A group may be thought of as a room, where what you say out loud goes to everyone else in that ! group. Users can jump from group to group, and create their own new groups. ! When the last person leaves a group, it dissapears. ! Moderated groups ! Creating your own group automatically makes you the moderator. As ! moderator, you have special privileges that allow you to control ! various things about the group, including it's topic, protection ! status, and who is allowed inside. ! The topic command will set the topic of the group. The status command ! will tell you about the group, and let you change its protection ! status. Invite may be used to invite users, and boot may be used to ! kick people out. Pass can be used to give moderatorship to someone ! else, or to relinquish it entirely. ! Restricted groups ! A moderator can make a group restricted, which means that you must be ! explicitly invited to join. Only the moderator may invite people into a ! restricted group. ! Invisible groups ! Invisible groups have names that start with "..". These groups, and the ! people in them, are completely invisible. --- 1,84 ---- groups Group concepts and commands. ! All ICB users are divided into "groups". A group may be thought of as a room, where what you say out loud goes to everyone else in that ! group. In keeping with the CB analogy, you may think of a group as a ! channel. Users can jump from group to group, and create their own new groups. ! When the last person leaves a group, it disappears. ! Group Attributes ! Groups have three administrative attributes: moderatorship, ! visibility, and volume. The values of these attributes appear as ! three letters in parentheses next to the group name. ! 1. Moderatorship ! A group may be public (p), moderated (m), or restricted (r). A public ! group has no moderator; no one person has any more control over ! the group than any other. A moderated group has a single ! moderator, whose nickname appears in the group header and ! is starred in the group listing. Only the moderator may change ! the group attributes, set the group topic, boot people out of the ! group, and issue invitations into the group. A restricted group ! is a moderated group which no-one may enter without an invitation. ! 2. Visibility ! A group may be visible (v), secret (s), or invisible (i). A visible ! group is one whose name and occupants are visible to everyone on ! ICB. A secret group is one whose occupants are visible, but whose ! name is not; the group name shows up as '*Secret'. This prevents ! anyone who does not know the group name from entering the group. ! An invisible group does not show up in the /w listing at all unless ! you are in that group. However, it is counted in the summary ! statistics at the bottom of the /w listing. ! ! 3. Volume ! A group may be quiet (q), normal (n), or loud (l). In a quiet group, ! no open messages are permitted. If you wish to receive only personal ! messages, a quiet group is a good place to hang out. In a normal ! group, open messages are permitted. Loud is the same as normal, ! with one exception: if the group is restricted and someone without an ! invitation tries to enter the group, the moderator will receive a ! message indicating that fact. ! ! Creating your own group automatically makes you the moderator of that group. ! Additionally, the moderator of any group may at any time decide to turn over ! moderatorship of that group to you. ! ! Numeric groups are initially public, visible, and loud (pvl). Named groups ! are initially moderated, visible, and loud (mvl), with two exceptions. If ! the group name begins with a single period, the group is initially secret. ! If the group names begins with two or more periods, the group is initially ! invisible. ! ! Commands ! ! The following are the commands for manipulating groups. Commands marked with ! (m) may only be issued by the moderator if the group is moderated; otherwise ! anyone may issue them. Commands marked with (M) may only be issued by the ! moderator; if there is no moderator, no-one may issue them. ! ! group change to a new group, creating it if it ! does not exist. ! ! (m) topic [] set or display the current topic string ! ! status display group attributes, topic, and invitation ! list ! (m) status [pmrqnlvsi] set group attributes ! (M) status name change the group's name ! ! topic display the topic string ! (m) topic set the topic string ! ! (m) invite [] invite someone to the group ! ! (M) boot kick someone out of the group ! ! (M) pass [] turn moderation over to someone else, or ! give up moderation completely diff -c -r icb-5.0.5/icb/help/hush icb-5.0.8/icb/help/hush *** icb-5.0.5/icb/help/hush Wed Feb 10 15:10:48 1993 --- icb-5.0.8/icb/help/hush Wed Apr 6 19:10:58 1994 *************** *** 1,6 **** hush Using hush to silence annoying users. ! Forumnet has a large base of diverse users. It is inevitable that there are going to be people who do not get along. Rather than censoring users, I prefer to give people tools that allow them to reduce or negate the problem. --- 1,6 ---- hush Using hush to silence annoying users. ! ICB has a large base of diverse users. It is inevitable that there are going to be people who do not get along. Rather than censoring users, I prefer to give people tools that allow them to reduce or negate the problem. *************** *** 13,18 **** --- 13,23 ---- Hush acts a toggle, so if you decide that person doesn't bug you anymore, you can reenable them by hushing them again. If you give the hush command without a nickname, a list of currently hushed people will be printed. + + Hush operates on a nickname; a hushee may get around your hushlist by + changing his or her nickname. You may prevent this by using the s_hush + (server hush) command; this command lets you define a set of users + to ignore based on their sites. Hush is the preferred way of dealing with problem users. Other means include using the moderated group facility, and when all else fails, diff -c -r icb-5.0.5/icb/help/input icb-5.0.8/icb/help/input *** icb-5.0.5/icb/help/input Wed Feb 10 15:10:49 1993 --- icb-5.0.8/icb/help/input Wed Apr 6 19:10:59 1994 *************** *** 2,33 **** EDITING CHARACTERS ! ICB uses simple line editing just like csh in BSD Unix. If you have ! these characters set for your terminal (with the stty command), icb will ! use them. - CHARACTER USUALLY - ----------------- ---------- - Delete Character ^H and DEL - Delete Word ^W - Delete Line ^U - Reprint Line ^R NICKNAME HISTORY ! ICB remembers to whom you send personal messages, and makes those names available by hitting the TAB key at the beginning of a line. This makes sending personals very easy. Try it! If you strike the TAB key more than once at the beginning of a line, it cycles through the list of personals, up to the number specified by the "history" variable. ! You may use the "hclear" to clear out this history list and start over. THE COMMAND CHARACTER All lines starting with the command character are assumed to be commands. If you wish to send a line of text starting with the command character, ! type it double at the beginning of the line. TCL QUOTING --- 2,45 ---- EDITING CHARACTERS ! ICB uses the GNU readline library for input lines. This library lets you ! edit commands as you type them and retrieve previous commands that you have ! typed. Readline will emulate either of the vi or emacs editors; you may control ! which by using the 'oset' command to set the 'editmode' variable to either ! "vi" or "emacs". The original default is picked up by the setting of your ! EDITOR environment variable; if that variable is not set, vi is used. NICKNAME HISTORY ! ICB remembers to whom you send messages, and makes those names available by hitting the TAB key at the beginning of a line. This makes sending personals very easy. Try it! If you strike the TAB key more than once at the beginning of a line, it cycles through the list of personals, up to the number specified by the "history" variable. ! If you have already typed a command and part of a nickname when you hit ! TAB, it will attempt to complete the nickname from the list in your ! history. If you have already typed a command, a nickname, and more text on the ! line, then pressing TAB will cause the nickname to cycle through your history ! without affecting the rest of your command line. + You may selectively delete nicknames from your history with the "hdel" + command, or you may use the "hclear" to completely clear out this history list + and start over. + + If you set the value of the "autodel" variable to "true", then any nickname + that generates a "not signed on" error message will be automatically removed + from your history . + + THE COMMAND CHARACTER All lines starting with the command character are assumed to be commands. If you wish to send a line of text starting with the command character, ! type it double at the beginning of the line. The default command character ! is '/'; you may change it by changing the value of the 'commandchar' variable. ! TCL QUOTING diff -c -r icb-5.0.5/icb/help/intro icb-5.0.8/icb/help/intro *** icb-5.0.5/icb/help/intro Wed Feb 10 15:10:49 1993 --- icb-5.0.8/icb/help/intro Wed Apr 6 19:10:59 1994 *************** *** 1,13 **** ! intro Introduction to Forumnet. ! Welcome to Forumnet! ! Forumnet is an ongoing project to connect people together. It provides a forum where people can meet and share information, ideas, or opinions; conduct meetings; play games; or do just about anything made possible with fast electronic communications. ! Getting started using forumnet is easy. You run "icb" and after a few seconds, you will be signed on in one of the default groups. A group is a place where people can talk with one another. Chances are, there will be other people there, and you'll see them talking. It might look --- 1,13 ---- ! intro Introduction to ICB.. ! Welcome to ICB! ! ICB is an ongoing project to connect people together. It provides a forum where people can meet and share information, ideas, or opinions; conduct meetings; play games; or do just about anything made possible with fast electronic communications. ! Getting started using ICB is easy. You run "icb" and after a few seconds, you will be signed on in one of the default groups. A group is a place where people can talk with one another. Chances are, there will be other people there, and you'll see them talking. It might look *************** *** 19,25 **** Usually when you first "sign on", people will say hello to you. Here, Joe and Amelia said hi, assuming your nickname was "x". ! Everyone in forumnet has a "nickname". These are used because many login names are difficult to type, and don't tell you much about the user. Some users have nicknames like "Dr. X". Others use their real life names. --- 19,25 ---- Usually when you first "sign on", people will say hello to you. Here, Joe and Amelia said hi, assuming your nickname was "x". ! Everyone in ICB has a "nickname". These are used because many login names are difficult to type, and don't tell you much about the user. Some users have nicknames like "Dr. X". Others use their real life names. *************** *** 47,53 **** Still assuming your name was "x". You could reply with: ! /m joe Joe you are being silly. Which would only go to Joe. --- 47,53 ---- Still assuming your name was "x". You could reply with: ! /m joe Joe, you are being silly. Which would only go to Joe. *************** *** 54,66 **** I hope this is enough to get you started talking. In other help files, you can learn more about groups, how to change groups, how to make your own, etc. I suggest you read--or at least skim--all of the help files. ! That way, you'll be able to get the most out of icb and forumnet. As a final note, please read the rules. Not only do they say what is ! tolerated and what is not (forumnet is pretty liberal), but they also tell you what to do if you run into trouble. Have fun, and feel free to send me suggestions and bug reports. ! Sean Casey ! --- 54,66 ---- I hope this is enough to get you started talking. In other help files, you can learn more about groups, how to change groups, how to make your own, etc. I suggest you read--or at least skim--all of the help files. ! That way, you'll be able to get the most out of icb. As a final note, please read the rules. Not only do they say what is ! tolerated and what is not (ICB is pretty liberal), but they also tell you what to do if you run into trouble. Have fun, and feel free to send me suggestions and bug reports. ! Mark J. Reed ! diff -c -r icb-5.0.5/icb/help/options icb-5.0.8/icb/help/options *** icb-5.0.5/icb/help/options Wed Feb 10 15:10:50 1993 --- icb-5.0.8/icb/help/options Wed Apr 6 19:10:59 1994 *************** *** 1,27 **** options Runtime options and environment variables ! Runtime options for icb: ! -c Try to clear the arguments from the command line. This ! won't work for all systems, and may even crash on some. ! -g group Enter directly into "group" instead of a default group. ! -n nick Enter using nickname "nick". ! -r Start in restricted mode. See the help on variables. ! -w Give a who report without signing on. ICB environment variables: ! FNRC Name of file to source instead of "$HOME/.fnrc". If this path is not an absolute path name, it is considered to be ! relative to HOME. If FNRC is specified and the corresponding file is not found, and error message will be printed. ! FORUMNAME Default nickname to use, instead of your login id. SHELL Shell to use for shellouts. If unspecified then /bin/sh is assumed. --- 1,40 ---- options Runtime options and environment variables ! Runtime options for icb (these may be abbreviated): ! -nickname nick sign on with nickname nick. ! -password pass set password to pass (implies -clear). ! -password - prompt for password. ! -group group sign on into group group. ! -server name connect to server named name. + -host host connect to server on host host. + -port port try to connect to port port. + + -list list known servers, in order. + + -clear wipe args from command line. + + -who see who's on; don't sign on. + + -restricted restricted mode + + -help display help message. + + ICB environment variables: ! ICBRC Name of file to read instead of "$HOME/.icbnrc". If this path is not an absolute path name, it is considered to be ! relative to HOME. If ICBRC is specified and the corresponding file is not found, and error message will be printed. ! ICBNAME Default nickname to use, instead of your login id. SHELL Shell to use for shellouts. If unspecified then /bin/sh is assumed. diff -c -r icb-5.0.5/icb/help/rules icb-5.0.8/icb/help/rules *** icb-5.0.5/icb/help/rules Wed Feb 10 15:10:51 1993 --- icb-5.0.8/icb/help/rules Wed Apr 6 19:11:00 1994 *************** *** 1,12 **** ! rules Rules for Forumnet use. ! In general, Forumnet is a "free speech" system. Users are encouraged to air their viewpoints and to comment freely on the viewpoints of others. Nonetheless, there are rules designed to "keep the peace" and in general protect people from abuse. ! Forumnet usage may be reduced, suspended, or revoked for: Using lewd or offensive words in nicknames, visible group names, or topics. --- 1,12 ---- ! rules Rules for ICB use. ! In general, ICB is a "free speech" system. Users are encouraged to air their viewpoints and to comment freely on the viewpoints of others. Nonetheless, there are rules designed to "keep the peace" and in general protect people from abuse. ! ICB usage may be reduced, suspended, or revoked for: Using lewd or offensive words in nicknames, visible group names, or topics. *************** *** 14,20 **** Harassing another user. Harassment is defined as behavior towards another with the intent purpose of annoying them. ! Sending files or "pictures" through forumnet to users that don't want to see them. Falsifying your identity to the server. Why is this bad? --- 14,20 ---- Harassing another user. Harassment is defined as behavior towards another with the intent purpose of annoying them. ! Sending files or "pictures" through ICB to users that don't want to see them. Falsifying your identity to the server. Why is this bad? *************** *** 22,32 **** resolve various problems. Any behavior whose purpose is to reduce the functionality of ! forumnet, violate the security thereof, or see or allow others ! to see any forumnet messages that they would not normally be permitted to see. Please don't mess it up for others. ! What is "lewd" or "offensive" is up to the Forumnet administration. If you have doubts, don't use it. Harassment is also largely a matter of opinion. --- 22,32 ---- resolve various problems. Any behavior whose purpose is to reduce the functionality of ! ICB, violate the security thereof, or see or allow others ! to see any ICB messages that they would not normally be permitted to see. Please don't mess it up for others. ! What is "lewd" or "offensive" is up to the ICB server administrator. If you have doubts, don't use it. Harassment is also largely a matter of opinion. *************** *** 33,40 **** Violations are usually straighted out via friendly email. If that fails to work, a lot of things can happen. In some cases in the past, remote administrations have been contacted, and even whole sites have been ! locked out. I am not above contacting the law if a persistent problem ! user simply won't quit. ! If you find someone violating the rules, please contact the forumnet ! administrator. The address is available with the version command. --- 33,39 ---- Violations are usually straighted out via friendly email. If that fails to work, a lot of things can happen. In some cases in the past, remote administrations have been contacted, and even whole sites have been ! locked out. ! If you find someone violating the rules, please contact the ICB ! server administrator. The address is available with the "version" command. diff -c -r icb-5.0.5/icb/help/variables icb-5.0.8/icb/help/variables *** icb-5.0.5/icb/help/variables Wed Feb 10 15:10:52 1993 --- icb-5.0.8/icb/help/variables Wed Apr 6 19:11:01 1994 *************** *** 23,28 **** --- 23,34 ---- a nickname is not signed on, that nickname will be deleted from your "tab" history. + autoreg (boolean) default: false + + If true, whenever the server sends a message indicating that you must + send your password to register your nickname, the client will prompt you + for your password and send it to the server. + beeps (boolean) default: true If true, a received beep will make your terminal beep (with a ^G). *************** *** 89,95 **** group. If you specify the -permanent flag on the /message command, this ! variable will be set to the target of that /m. The -lear flag of /message will unset this variable. pauseonshell (boolean) default: false --- 95,101 ---- group. If you specify the -permanent flag on the /message command, this ! variable will be set to the target of that /m. The -clear flag of /message will unset this variable. pauseonshell (boolean) default: false diff -c -r icb-5.0.5/murgil/clientserve.c icb-5.0.8/murgil/clientserve.c *** icb-5.0.5/murgil/clientserve.c Wed Feb 10 15:09:11 1993 --- icb-5.0.8/murgil/clientserve.c Wed Apr 6 19:09:58 1994 *************** *** 17,26 **** struct Cbuf buf; int timeisup; clientserve() { int ret; - int gotalarm(); sock = port_fd; --- 17,31 ---- struct Cbuf buf; int timeisup; + sighandler + gotalarm() + { + timeisup++; + } + clientserve() { int ret; sock = port_fd; *************** *** 126,136 **** close(sock); exit(1); } - } - - gotalarm() - { - timeisup++; } /* disconnect from the server */ --- 131,136 ---- diff -c -r icb-5.0.5/murgil/externs.h icb-5.0.8/murgil/externs.h *** icb-5.0.5/murgil/externs.h Wed Feb 10 15:09:12 1993 --- icb-5.0.8/murgil/externs.h Wed Apr 6 19:09:58 1994 *************** *** 9,12 **** extern struct timeval *polltimeout; /* timeout value in msec for select() */ extern struct itimerval *polldelay; /* timeout value in msec for select() */ extern struct Cbuf cbufs[MAX_USERS];/* user packet buffers */ ! --- 9,16 ---- extern struct timeval *polltimeout; /* timeout value in msec for select() */ extern struct itimerval *polldelay; /* timeout value in msec for select() */ extern struct Cbuf cbufs[MAX_USERS];/* user packet buffers */ ! #if VOID_SIGHANDLER ! #define sighandler void ! #else ! #define sighandler int ! #endif diff -c -r icb-5.0.5/murgil/getrname.c icb-5.0.8/murgil/getrname.c *** icb-5.0.5/murgil/getrname.c Wed Feb 10 15:09:13 1993 --- icb-5.0.8/murgil/getrname.c Wed Apr 6 19:09:59 1994 *************** *** 14,19 **** --- 14,26 ---- { static char rname[24]; struct hostent *host; + #if defined(linux) + #define PEER_CAST (struct sockaddr *) + #define HOST_CAST (char *) + #else + #define PEER_CAST + #define HOST_CAST + #endif struct sockaddr_in rs; int rs_size = sizeof(rs); /* temporary hack */ *************** *** 22,28 **** char *inet_ntoa(); /* get address of remote user */ ! if (getpeername(s, &rs, &rs_size) < 0) { perror("server: getpeername failed"); return(NULL); } --- 29,35 ---- char *inet_ntoa(); /* get address of remote user */ ! if (getpeername(s, PEER_CAST &rs, &rs_size) < 0) { perror("server: getpeername failed"); return(NULL); } *************** *** 31,37 **** debug_l = inet_addr(debug_c); /* get hostname from table */ ! if ((host = gethostbyaddr(&rs.sin_addr.s_addr, sizeof(rs.sin_addr.s_addr), AF_INET)) == 0) { #ifdef NEVER /* temporary hack */ --- 38,44 ---- debug_l = inet_addr(debug_c); /* get hostname from table */ ! if ((host = gethostbyaddr(HOST_CAST &rs.sin_addr.s_addr, sizeof(rs.sin_addr.s_addr), AF_INET)) == 0) { #ifdef NEVER /* temporary hack */ *************** *** 41,45 **** #endif return(inet_ntoa(rs.sin_addr.s_addr)); } else ! return(host->h_name); } --- 48,52 ---- #endif return(inet_ntoa(rs.sin_addr.s_addr)); } else ! return(char *)(host->h_name); } diff -c -r icb-5.0.5/murgil/makeport.c icb-5.0.8/murgil/makeport.c *** icb-5.0.5/murgil/makeport.c Wed Feb 10 15:09:15 1993 --- icb-5.0.8/murgil/makeport.c Wed Apr 6 19:10:00 1994 *************** *** 4,10 **** /* returns socket for new connects */ #include - /*#include */ #include "config.h" #include #include --- 4,9 ---- *************** *** 56,62 **** listen(s, 255); /* make it non-blocking */ ! #ifndef SYSV if (fcntl(s, F_SETFL, FNDELAY) < 0) { #else /* SYSV */ if (fcntl(s, F_SETFL, O_NDELAY) < 0) { --- 55,61 ---- listen(s, 255); /* make it non-blocking */ ! #if !defined(SYSV) && !defined(linux) if (fcntl(s, F_SETFL, FNDELAY) < 0) { #else /* SYSV */ if (fcntl(s, F_SETFL, O_NDELAY) < 0) { diff -c -r icb-5.0.5/murgil/newconnect.c icb-5.0.8/murgil/newconnect.c *** icb-5.0.5/murgil/newconnect.c Wed Feb 10 15:09:15 1993 --- icb-5.0.8/murgil/newconnect.c Wed Apr 6 19:10:00 1994 *************** *** 57,63 **** */ /* make the socket non-blocking */ ! #ifndef SYSV if (fcntl(ns, F_SETFL, FNDELAY) < 0) { #else /* SYSV */ if (fcntl(ns, F_SETFL, O_NDELAY) < 0) { --- 57,63 ---- */ /* make the socket non-blocking */ ! #if !defined(SYSV) && !defined(linux) if (fcntl(ns, F_SETFL, FNDELAY) < 0) { #else /* SYSV */ if (fcntl(ns, F_SETFL, O_NDELAY) < 0) { diff -c -r icb-5.0.5/murgil/select.h icb-5.0.8/murgil/select.h *** icb-5.0.5/murgil/select.h Wed Feb 10 15:09:16 1993 --- icb-5.0.8/murgil/select.h Wed Apr 6 19:10:01 1994 *************** *** 15,21 **** --- 15,24 ---- #ifndef NFDBITS + #ifndef linux typedef long fd_mask; + #endif + #define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ #endif /* NFDBITS */ diff -c -r icb-5.0.5/murgil/serverserve.c icb-5.0.8/murgil/serverserve.c *** icb-5.0.5/murgil/serverserve.c Wed Feb 10 15:09:17 1993 --- icb-5.0.8/murgil/serverserve.c Wed Apr 6 19:10:01 1994 *************** *** 19,28 **** fd_set fdr; int timeisup; serverserve() { int ret; - int gotalarm(); long loopcount = 0; /* used to break loop for periodic didpoll */ /* look at fd where new clients connect */ --- 19,29 ---- fd_set fdr; int timeisup; + sighandler gotalarm(); + serverserve() { int ret; long loopcount = 0; /* used to break loop for periodic didpoll */ /* look at fd where new clients connect */ Common subdirectories: icb-5.0.5/readline/doc and icb-5.0.8/readline/doc Common subdirectories: icb-5.0.5/readline/examples and icb-5.0.8/readline/examples diff -c -r icb-5.0.5/readline/readline.c icb-5.0.8/readline/readline.c *** icb-5.0.5/readline/readline.c Wed Feb 10 15:09:48 1993 --- icb-5.0.8/readline/readline.c Wed Apr 6 19:10:26 1994 *************** *** 84,91 **** --- 84,95 ---- /* Other (BSD) machines use sgtty. */ #if defined (NEW_TTY_DRIVER) + #ifdef linux + #include + #else #include #endif + #endif /* Define _POSIX_VDISABLE if we are not using the `new' tty driver and it is not already defined. It is used both to determine if a *************** *** 2494,2500 **** --- 2498,2507 ---- otio = tio; + /* readline_echoing_p = (tio.c_lflag & ECHO); + */ + readline_echoing_p = ECHO; tio.c_lflag &= ~(ICANON | ECHO); *************** *** 3115,3120 **** --- 3122,3134 ---- int count; { int c = rl_read_key (); + + /* block control-As */ + if (c==0x01) + { + printf("\007"); + return; + } rl_insert (count, c); } diff -c -r icb-5.0.5/readline/vi_keymap.c icb-5.0.8/readline/vi_keymap.c *** icb-5.0.5/readline/vi_keymap.c Wed Feb 10 15:09:49 1993 --- icb-5.0.8/readline/vi_keymap.c Wed Apr 6 19:10:26 1994 *************** *** 180,186 **** /* The regular control keys come first. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ ! { ISFUNC, rl_insert }, /* Control-a */ { ISFUNC, rl_insert }, /* Control-b */ { ISFUNC, rl_insert }, /* Control-c */ { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ --- 180,186 ---- /* The regular control keys come first. */ { ISFUNC, (Function *)0x0 }, /* Control-@ */ ! { ISFUNC, (Function *)0x0 }, /* Control-a */ { ISFUNC, rl_insert }, /* Control-b */ { ISFUNC, rl_insert }, /* Control-c */ { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ Only in icb-5.0.5/readline/doc: readline.dvi diff -c -r icb-5.0.5/tcl/list.h icb-5.0.8/tcl/list.h *** icb-5.0.5/tcl/list.h Wed Feb 10 15:09:27 1993 --- icb-5.0.8/tcl/list.h Wed Apr 6 19:10:07 1994 *************** *** 12,18 **** * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * rcsid "$Header: /sprite/src/lib/include/RCS/list.h,v 1.3 89/06/23 11:29:49 rab Exp $ SPRITE (Berkeley)" */ #ifndef _LIST --- 12,18 ---- * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * rcsid "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/list.h,v 4.6 1993/02/10 20:03:58 mark Exp $ SPRITE (Berkeley)" */ #ifndef _LIST diff -c -r icb-5.0.5/tcl/panic.c icb-5.0.8/tcl/panic.c *** icb-5.0.5/tcl/panic.c Wed Feb 10 15:09:28 1993 --- icb-5.0.8/tcl/panic.c Wed Apr 6 19:10:08 1994 *************** *** 14,20 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/c/etc/RCS/panic.c,v 1.7 89/04/12 12:43:02 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 14,20 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/panic.c,v 4.6 1993/02/10 20:04:02 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/sprite.h icb-5.0.8/tcl/sprite.h *** icb-5.0.5/tcl/sprite.h Wed Feb 10 15:09:28 1993 --- icb-5.0.8/tcl/sprite.h Wed Apr 6 19:10:08 1994 *************** *** 12,18 **** * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /sprite/src/lib/include/RCS/sprite.h,v 1.6 89/09/08 16:27:43 mgbaker Exp $ SPRITE (Berkeley) */ #ifndef _SPRITE --- 12,18 ---- * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /home/aurora1/mark/tmp/icb/tcl/RCS/sprite.h,v 4.6 1993/02/10 20:04:05 mark Exp $ SPRITE (Berkeley) */ #ifndef _SPRITE diff -c -r icb-5.0.5/tcl/stdlib.h icb-5.0.8/tcl/stdlib.h *** icb-5.0.5/tcl/stdlib.h Wed Feb 10 15:09:28 1993 --- icb-5.0.8/tcl/stdlib.h Wed Apr 6 19:10:09 1994 *************** *** 13,19 **** * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /sprite/src/lib/include/RCS/stdlib.h,v 1.12 90/01/06 13:45:29 rab Exp $ SPRITE (Berkeley) */ #ifndef _STDLIB --- 13,19 ---- * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /home/aurora1/mark/tmp/icb/tcl/RCS/stdlib.h,v 4.6 1993/02/10 20:04:07 mark Exp $ SPRITE (Berkeley) */ #ifndef _STDLIB diff -c -r icb-5.0.5/tcl/strchr.c icb-5.0.8/tcl/strchr.c *** icb-5.0.5/tcl/strchr.c Wed Feb 10 15:09:29 1993 --- icb-5.0.8/tcl/strchr.c Wed Apr 6 19:10:09 1994 *************** *** 14,20 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/c/string/RCS/strchr.c,v 1.2 89/03/22 16:06:40 rab Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 14,20 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/strchr.c,v 4.6 1993/02/10 20:04:10 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/strerror.c icb-5.0.8/tcl/strerror.c *** icb-5.0.5/tcl/strerror.c Wed Feb 10 15:09:29 1993 --- icb-5.0.8/tcl/strerror.c Wed Apr 6 19:10:10 1994 *************** *** 14,20 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/c/string/RCS/strerror.c,v 1.5 89/03/22 16:06:57 rab Exp Locker: shirriff $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 14,20 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/strerror.c,v 4.6 1993/02/10 20:04:12 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/string.h icb-5.0.8/tcl/string.h *** icb-5.0.5/tcl/string.h Wed Feb 10 15:09:29 1993 --- icb-5.0.8/tcl/string.h Wed Apr 6 19:10:10 1994 *************** *** 12,18 **** * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /sprite/src/lib/include/RCS/string.h,v 1.5 89/03/22 16:03:43 rab Exp $ SPRITE (Berkeley) */ #ifndef _STRING --- 12,18 ---- * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /home/aurora1/mark/tmp/icb/tcl/RCS/string.h,v 4.6 1993/02/10 20:04:14 mark Exp $ SPRITE (Berkeley) */ #ifndef _STRING diff -c -r icb-5.0.5/tcl/strpbrk.c icb-5.0.8/tcl/strpbrk.c *** icb-5.0.5/tcl/strpbrk.c Wed Feb 10 15:09:30 1993 --- icb-5.0.8/tcl/strpbrk.c Wed Apr 6 19:10:11 1994 *************** *** 14,20 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/c/string/RCS/strpbrk.c,v 1.2 89/03/22 16:07:46 rab Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 14,20 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/strpbrk.c,v 4.6 1993/02/10 20:04:17 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/strspn.c icb-5.0.8/tcl/strspn.c *** icb-5.0.5/tcl/strspn.c Wed Feb 10 15:09:30 1993 --- icb-5.0.8/tcl/strspn.c Wed Apr 6 19:10:11 1994 *************** *** 14,20 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/c/string/RCS/strspn.c,v 1.2 89/03/22 16:07:53 rab Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 14,20 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/strspn.c,v 4.6 1993/02/10 20:04:21 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/strstr.c icb-5.0.8/tcl/strstr.c *** icb-5.0.5/tcl/strstr.c Wed Feb 10 15:09:31 1993 --- icb-5.0.8/tcl/strstr.c Wed Apr 6 19:10:12 1994 *************** *** 14,20 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/c/string/RCS/strstr.c,v 1.2 89/03/22 16:07:57 rab Exp $ SPRITE (Berkeley)"; #endif /* not lint */ /* --- 14,20 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/strstr.c,v 4.6 1993/02/10 20:04:19 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ /* diff -c -r icb-5.0.5/tcl/strtol.c icb-5.0.8/tcl/strtol.c *** icb-5.0.5/tcl/strtol.c Wed Feb 10 15:09:31 1993 --- icb-5.0.8/tcl/strtol.c Wed Apr 6 19:10:12 1994 *************** *** 15,21 **** #ifndef NeXT #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/c/stdlib/RCS/strtol.c,v 1.4 89/03/22 00:47:30 rab Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 15,21 ---- #ifndef NeXT #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/strtol.c,v 4.6 1993/02/10 20:04:23 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/strtoul.c icb-5.0.8/tcl/strtoul.c *** icb-5.0.5/tcl/strtoul.c Wed Feb 10 15:09:32 1993 --- icb-5.0.8/tcl/strtoul.c Wed Apr 6 19:10:13 1994 *************** *** 15,21 **** #ifndef NeXT #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/c/stdlib/RCS/strtoul.c,v 1.2 89/03/22 00:47:33 rab Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 15,21 ---- #ifndef NeXT #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/strtoul.c,v 4.6 1993/02/10 20:04:26 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/tcl.h icb-5.0.8/tcl/tcl.h *** icb-5.0.5/tcl/tcl.h Wed Feb 10 15:09:32 1993 --- icb-5.0.8/tcl/tcl.h Wed Apr 6 19:10:13 1994 *************** *** 13,19 **** * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /sprite/src/lib/tcl/RCS/tcl.h,v 1.35 90/04/18 16:05:56 ouster Exp $ SPRITE (Berkeley) */ #ifndef _TCL --- 13,19 ---- * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tcl.h,v 4.6 1993/02/10 20:04:28 mark Exp $ SPRITE (Berkeley) */ #ifndef _TCL diff -c -r icb-5.0.5/tcl/tclAssem.c icb-5.0.8/tcl/tclAssem.c *** icb-5.0.5/tcl/tclAssem.c Wed Feb 10 15:09:32 1993 --- icb-5.0.8/tcl/tclAssem.c Wed Apr 6 19:10:14 1994 *************** *** 16,22 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclAssem.c,v 1.4 90/03/23 16:26:20 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include "tclInt.h" --- 16,22 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclAssem.c,v 4.6 1993/02/10 20:04:31 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include "tclInt.h" diff -c -r icb-5.0.5/tcl/tclBasic.c icb-5.0.8/tcl/tclBasic.c *** icb-5.0.5/tcl/tclBasic.c Wed Feb 10 15:09:33 1993 --- icb-5.0.8/tcl/tclBasic.c Wed Apr 6 19:10:15 1994 *************** *** 16,22 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclBasic.c,v 1.72 90/03/29 10:36:39 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 16,22 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclBasic.c,v 4.7 1994/02/16 00:40:21 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include *************** *** 1318,1324 **** * strcmp. */ ! if ((cur->name[0] == c) && (strcmp(cur->name, cmdName) == 0)) { if (prev != NULL) { prev->nextPtr = cur->nextPtr; cur->nextPtr = iPtr->commandPtr; --- 1318,1324 ---- * strcmp. */ ! if (cur->name && (cur->name[0] == c) && (strcmp(cur->name, cmdName) == 0)) { if (prev != NULL) { prev->nextPtr = cur->nextPtr; cur->nextPtr = iPtr->commandPtr; diff -c -r icb-5.0.5/tcl/tclCmdAH.c icb-5.0.8/tcl/tclCmdAH.c *** icb-5.0.5/tcl/tclCmdAH.c Wed Feb 10 15:09:34 1993 --- icb-5.0.8/tcl/tclCmdAH.c Wed Apr 6 19:10:16 1994 *************** *** 16,24 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclCmdAH.c,v 1.45 90/04/18 17:09:19 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include #include #include --- 16,28 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclCmdAH.c,v 4.9 1994/02/16 02:54:59 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ + #ifdef linux + #include + #endif /* linux */ + #include #include #include *************** *** 106,112 **** return TCL_ERROR; } string = argv[1]; ! body = NULL; if (strcmp(argv[2], "in") == 0) { i = 3; } else { --- 110,116 ---- return TCL_ERROR; } string = argv[1]; ! body = 0; if (strcmp(argv[2], "in") == 0) { i = 3; } else { *************** *** 166,172 **** } match: ! if (body != NULL) { result = Tcl_Eval(interp, argv[body], 0, (char **) NULL); if (result == TCL_ERROR) { char msg[100]; --- 170,176 ---- } match: ! if (body != 0) { result = Tcl_Eval(interp, argv[body], 0, (char **) NULL); if (result == TCL_ERROR) { char msg[100]; diff -c -r icb-5.0.5/tcl/tclCmdIZ.c icb-5.0.8/tcl/tclCmdIZ.c *** icb-5.0.5/tcl/tclCmdIZ.c Wed Feb 10 15:09:35 1993 --- icb-5.0.8/tcl/tclCmdIZ.c Wed Apr 6 19:10:17 1994 *************** *** 16,22 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclCmdIZ.c,v 1.36 90/04/18 17:09:07 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 16,22 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclCmdIZ.c,v 4.6 1993/02/10 20:04:43 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/tclExpr.c icb-5.0.8/tcl/tclExpr.c *** icb-5.0.5/tcl/tclExpr.c Wed Feb 10 15:09:35 1993 --- icb-5.0.8/tcl/tclExpr.c Wed Apr 6 19:10:17 1994 *************** *** 15,21 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclExpr.c,v 1.13 90/03/22 15:24:59 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 15,21 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclExpr.c,v 4.6 1993/02/10 20:04:48 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/tclGlob.c icb-5.0.8/tcl/tclGlob.c *** icb-5.0.5/tcl/tclGlob.c Wed Feb 10 15:09:36 1993 --- icb-5.0.8/tcl/tclGlob.c Wed Apr 6 19:10:18 1994 *************** *** 15,21 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclGlob.c,v 1.4 90/04/19 14:53:59 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 15,21 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclGlob.c,v 4.6 1993/02/10 20:04:52 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/tclHistory.c icb-5.0.8/tcl/tclHistory.c *** icb-5.0.5/tcl/tclHistory.c Wed Feb 10 15:09:37 1993 --- icb-5.0.8/tcl/tclHistory.c Wed Apr 6 19:10:18 1994 *************** *** 17,23 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclHistory.c,v 1.6 90/03/29 13:20:04 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include "tclInt.h" --- 17,23 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclHistory.c,v 4.6 1993/02/10 20:04:57 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include "tclInt.h" diff -c -r icb-5.0.5/tcl/tclInt.h icb-5.0.8/tcl/tclInt.h *** icb-5.0.5/tcl/tclInt.h Wed Feb 10 15:09:37 1993 --- icb-5.0.8/tcl/tclInt.h Wed Apr 6 19:10:18 1994 *************** *** 12,18 **** * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /sprite/src/lib/tcl/RCS/tclInt.h,v 1.22 90/03/29 10:55:01 ouster Exp $ SPRITE (Berkeley) */ #ifndef _TCLINT --- 12,18 ---- * software for any purpose. It is provided "as is" without * express or implied warranty. * ! * $Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclInt.h,v 4.6 1993/02/10 20:05:02 mark Exp $ SPRITE (Berkeley) */ #ifndef _TCLINT diff -c -r icb-5.0.5/tcl/tclProc.c icb-5.0.8/tcl/tclProc.c *** icb-5.0.5/tcl/tclProc.c Wed Feb 10 15:09:38 1993 --- icb-5.0.8/tcl/tclProc.c Wed Apr 6 19:10:19 1994 *************** *** 15,21 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclProc.c,v 1.35 90/03/29 10:55:16 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 15,21 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclProc.c,v 4.6 1993/02/10 20:05:05 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include diff -c -r icb-5.0.5/tcl/tclUtil.c icb-5.0.8/tcl/tclUtil.c *** icb-5.0.5/tcl/tclUtil.c Wed Feb 10 15:09:38 1993 --- icb-5.0.8/tcl/tclUtil.c Wed Apr 6 19:10:19 1994 *************** *** 15,21 **** */ #ifndef lint ! static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclUtil.c,v 1.30 90/03/25 11:04:25 ouster Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include --- 15,21 ---- */ #ifndef lint ! static char rcsid[] = "$Header: /home/aurora1/mark/tmp/icb/tcl/RCS/tclUtil.c,v 4.6 1993/02/10 20:05:10 mark Exp $ SPRITE (Berkeley)"; #endif /* not lint */ #include