From: Eric S. Raymond Date: Mon, 24 Jan 2005 16:29:14 +0000 (+0000) Subject: Rearrange some documentation. X-Git-Tag: 2.0~11 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=c96466aa5ccab8eb5c4ab770813702b999a9947f;p=morse-classic.git Rearrange some documentation. --- diff --git a/HISTORY b/HISTORY new file mode 100644 index 0000000..de716b1 --- /dev/null +++ b/HISTORY @@ -0,0 +1,44 @@ +Written by: + Joe Dellinger, Hawaii Institute of Geophysics, University of Hawaii at Manoa + * First alpha on Tue Aug 11 14:01:02 HST 1992 + * Second alpha Thu Nov 26 03:24:19 HST 1992 + * submitted to comp.sources.misc Dec 15 1993 + * Revised version submitted to comp.sources.misc Nov 22 1994 + +Marc Unangst, N8VRH, mju@mudos.ann-arbor.mi.us, Dec 1992: + added System V support. + +Joe Dellinger: + Finally got around to getting my license, April 1994: WH6UR + Moved to Tulsa, Oklahoma: July 1994 + +Joe Dellinger, Nov 1994: + Fixed a bug in the USG termio calls. + Added an option to make the "error" beep come out via the beep + routines instead of by printing a control-G. + +Jacek M. Holeczek, March/April 2000: + Fixed some source code files so that no warnings from -Wall appear. + The character set made compatible with the International Morse Code. + Added the -n NUM, -R NUM, -N NUM, -C 'STRING', -q options. + Added beep for the AdLib/SoundBlaster FM chip and for the Open Sound + System (OSS) /dev/dsp device. + Note: The code uses directly ANSI sequences "\E[7m" to turn the inverse + video mode on and "\E[0m" to turn all video attributes off. + One should rewrite the openterminal function to provide the + enter_standout_mode "smso/so" and exit_standout_mode "rmso/se" + terminfo/termcap terminal string capabilities. + +Eric S. Raymond , January 2005: + Accepted maintainer's baton from Joe Dellinger and Paul J. Drongowski. + Dusted it off, cleaned it up to modern C standards. + Changed ALLINTERNATIONAL to runtime -A option. + Changed ALLPROSIGNS to runtime -S option. + Changed ALLPUNCTUATION to runtime -B option. + Changed ERROR_FREQUENCY to runtime -x option. + Changed ERROR_VOLUME to runtime -X option. + Dropped BSD signal and tty support, it's all POSIX now. + Wrote the manual page. + Wrote the manual page. + Updated all code to use ANSI prototypes. + diff --git a/morse.c b/morse.c index 1f2bf9a..4a91f99 100644 --- a/morse.c +++ b/morse.c @@ -1,76 +1,7 @@ -/* - * A morse code practice utility. (Contains those characters that can appear - * on the FCC ham license exam.) - * - * Running "morse" without arguments or input gives self-doc. - * - * It doesn't keep PERFECT time, but it seems reasonably close - * for reasonable word speeds on my slow SUN IPC! - * - * Joe Dellinger - * Tue Aug 11 14:01:02 HST 1992 - * University of Hawaii at Manoa - * - * Revised by Joe: - * Thu Nov 26 03:24:19 HST 1992 - * - * Finally got around to getting my license, April 1994: WH6UR - * Moved to Tulsa, Oklahoma: July 1994 - * - * Legal stuff: - * This code is (ridiculously) heavily modified from morse.c from the Reno UNIX - * distribution. I (Joe) also used slightly modified versions of a subroutine - * from Richard Ottolini at Unocal for Sun workstation tone generation. - * Scott Seligman at Stanford added support for other sorts of devices and - * made several other changes. John Shalamskas helped test and made comments. - * - * I don't think anybody cares if you redistribute this, modify it, etc... - * But don't claim you wrote it, try to sell it, or take anyone's name out - * of the code! If you modify it, PLEASE INDICATE WHEN, WHERE, AND HOW - * YOU MODIFIED IT IN THE COMMENT BELOW. Please. - */ -/* - * Joe Dellinger, UH Manoa, joe@montebello.soest.hawaii.edu, June 1992: - * inserted this sample modification log entry. - * - * Marc Unangst, N8VRH, mju@mudos.ann-arbor.mi.us, Dec 1992: - * added System V support. - * - * Joe Dellinger, Nov 1994: - * Fixed a bug in the USG termio calls. - * Added an option to make the "error" beep come out via the beep - * routines instead of by printing a control-G. - * - * Jacek M. Holeczek, March/April 2000: - * Fixed some source code files so that no warnings from -Wall appear. - * The character set made compatible with the International Morse Code. - * Added the -n NUM, -R NUM, -N NUM, -C 'STRING', -q options. - * Added beep for the AdLib/SoundBlaster FM chip and for the Open Sound - * System (OSS) /dev/dsp device. - * Note: The code uses directly ANSI sequences "\E[7m" to turn the inverse - * video mode on and "\E[0m" to turn all video attributes off. - * One should rewrite the openterminal function to provide the - * enter_standout_mode "smso/so" and exit_standout_mode "rmso/se" - * terminfo/termcap terminal string capabilities. - * - * Eric S. Raymond January 2005. - * Dusted it off, cleaned it up to modern C standards. - * Changed ALLINTERNATIONAL to runtime -A option. - * Changed ALLPROSIGNS to runtime -S option. - * Changed ALLPUNCTUATION to runtime -B option. - * Changed ERROR_FREQUENCY to runtime -x option. - * Changed ERROR_VOLUME to runtime -X option. - * Dropped BSD signal and tty support, it's all POSIX now. - * Wrote the manual page. - */ - -/* - * The following stuff is here because this started life as a routine from - * the Reno UNIX distribution. (It's also a good boilerplate bit of legalese - * to have in there anyway.) - */ /* * Copyright (c) 1988 Regents of the University of California. + * Copyright (c) 1992 Joe Dellinger, University of Hawaii at Manoa + * Copyright (c) 2005 Eric S. Raymond. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -97,20 +28,24 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - -#ifndef lint -char copyright[] = -"@(#) Copyright (c) 1988 Regents of the University of California.\n\ - All rights reserved.\n"; -char copyleftjoe[] = -"@(#) Copyright (c) 1992 Joe Dellinger, University of Hawaii at Manoa.\n"; -#endif /* not lint */ - /* - *============================================================================ - * Here starts the code! - *============================================================================ + * A morse code practice utility. (Contains those characters that can appear + * on the FCC ham license exam.) + * + * Running "morse" without arguments or input gives self-doc. + * + * It doesn't keep PERFECT time, but it seems reasonably close + * for reasonable word speeds on my slow SUN IPC! + * + * This code is (ridiculously) heavily modified from morse.c from the Reno UNIX + * distribution. I (Joe) also used slightly modified versions of a subroutine + * from Richard Ottolini at Unocal for Sun workstation tone generation. + * Scott Seligman at Stanford added support for other sorts of devices and + * made several other changes. John Shalamskas helped test and made comments. + * + * For a more detailed history, see the HISTORY file */ + /* * Useful for seeing what the interleaved reading and writing loops are * really up to. @@ -437,28 +372,6 @@ extern time_t time (); printf ("-X Set error volume. Defaults to %g.\n", ERROR_VOLUME); printf (" Error volume 0 means use console speaker.\n"); printf ("-x Set frequency of error tone, default 2000.0Hz\n"); - printf ("\n"); - printf ("\n"); - printf ("\n"); - printf ("For the raw beginner trying to learn morse code I recommend\n"); - printf ("the following sequence:\n"); - printf ("\n"); - printf ("Start learning the alphabet:\n"); - printf (" morse -r -s -T -d -w 5 -F 15 -p 5 -E -10\n"); - printf ("Then drill drill drill:\n"); - printf (" morse -r -s -T -d -w 5 -F 15 -p 5 -E 0\n"); - printf ("Real-time drill, with hints if you really need it:\n"); - printf (" morse -r -T -d -w 5 -F 15 -M 2 -E 4\n"); - printf ("Simulated test:\n"); - printf (" QSO | morse -e -T -d -w 5 -F 15\n"); - printf ("The dreaded random-letter test:\n"); - printf (" morse -r -T -d -w 5 -F 15\n"); - printf ("Finally try for greater and greater speed:\n"); - printf (" morse -r -T -d -w 13 -F 24\n"); - printf ("\n"); -/* printf ("Written by (mostly) joe@montebello.soest.hawaii.edu\n"); */ - printf ("Please send updates/comments to joe@sep.stanford.edu\n"); - printf ("Get the latest revision from sepftp.stanford.edu before hacking!\n"); exit (0); }