From lyndon@thingfish.v-wave.com  Tue Sep  8 20:05:29 1998
Received: from thingfish.v-wave.com (thingfish.v-wave.com [24.108.17.129])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA06468
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 8 Sep 1998 20:05:28 -0700 (PDT)
          (envelope-from lyndon@thingfish.v-wave.com)
Received: (from lyndon@localhost)
	by thingfish.v-wave.com (8.9.1/8.9.1) id VAA02319;
	Tue, 8 Sep 1998 21:05:14 -0600 (MDT)
Message-Id: <199809090305.VAA02319@thingfish.v-wave.com>
Date: Tue, 8 Sep 1998 21:05:14 -0600 (MDT)
From: Lyndon Nerenberg <lyndon@orthanc.ca>
Reply-To: Lyndon Nerenberg <lyndon@orthanc.ca>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Morse Code Fixups
X-Send-Pr-Version: 3.2

>Number:         7868
>Category:       bin
>Synopsis:       [patch] morse(6): Morse Code Fixups
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    scf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep  8 20:10:01 PDT 1998
>Closed-Date:    Sun Jun 08 14:45:24 CDT 2008
>Last-Modified:  Thu Jun 19 23:50:03 UTC 2008
>Originator:     
>Release:        FreeBSD 2.2.7-STABLE i386
>Organization:
The Frobozz Magic Homing Pigeon Company
>Environment:

>Description:

* Make audio support conditional on __FreeBSD__ instead of via explicit
  CFLAGS setting in the Makefile.

* Fixed the output grammar to properly speak non-terminal dits.

>How-To-Repeat:
>Fix:

In /usr/src/games/morse:
	
===================================================================
RCS file: Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1998/09/09 02:39:40	1.1
+++ Makefile	1998/09/09 02:40:16
@@ -2,6 +2,5 @@
 
 PROG=	morse
 NOMAN=	noman
-CFLAGS += -DSPEAKER=\"/dev/speaker\"
 
 .include <bsd.prog.mk>
===================================================================
RCS file: morse.c,v
retrieving revision 1.1
diff -u -r1.1 morse.c
--- morse.c	1998/09/09 02:39:47	1.1
+++ morse.c	1998/09/09 02:50:00
@@ -32,8 +32,8 @@
  */
 
 /*
- * Taught to send *real* morse by Lyndon Nerenberg (VE7TCP/VE6BBM)
- * <lyndon@orthanc.com>
+ * Taught to send *real* morse by Lyndon Nerenberg (VE6BBM)
+ * <lyndon@orthanc.ab.ca>
  */
 
 #ifndef lint
@@ -50,10 +50,10 @@
 #include <ctype.h>
 #include <locale.h>
 #include <stdlib.h>
-
-#ifdef SPEAKER
-#include <machine/speaker.h>
-#include <fcntl.h>
+#include <sys/param.h>
+#ifdef __FreeBSD__
+# include <machine/speaker.h>
+# include <fcntl.h>
 #endif
 
 struct morsetab {
@@ -194,7 +194,7 @@
 #define FREQUENCY 600
 static int      freq = FREQUENCY;
 
-#ifdef SPEAKER
+#ifdef __FreeBSD__
 #define DASH_LEN 3
 #define CHAR_SPACE 3
 #define WORD_SPACE (7 - CHAR_SPACE - 1)
@@ -243,10 +243,10 @@
 	if (pflag && (freq == 0))
 		freq = FREQUENCY;
 
-#ifdef SPEAKER
+#ifdef __FreeBSD__
 	if (pflag) {
-		if ((spkr = open(SPEAKER, O_WRONLY, 0)) == -1) {
-			perror(SPEAKER);
+		if ((spkr = open("/dev/speaker", O_WRONLY, 0)) == -1) {
+			perror("/dev/speaker");
 			exit(1);
 		}
 		dot_clock = wpm / 2.4;		/* dots/sec */
@@ -255,7 +255,9 @@
 						/* the dot rate */
 		dot_clock = dot_clock * 100;	/* scale for ioctl */
 	}
-#endif
+#else /* ! __FreeBSD__ */
+	errx(1, "audio not supported on this platform");
+#endif /* ! __FreeBSD__ */
 	argc -= optind;
 	argv += optind;
 
@@ -319,14 +321,14 @@
 		printf(" %s", s);
 	else
 		for (; *s; ++s)
-			printf(" %s", *s == '.' ? "dit" : "dah");
+			printf(" %s", *s == '.' ? *(s+1) == '\0' ? "dit" : "di" : "dah");
 	printf("\n");
 }
 
 void
 play(const char *s)
 {
-#ifdef SPEAKER
+#ifdef __FreeBSD__
 	const char *c;
 
 	for (c = s; *c != '\0'; c++) {


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Thu Sep 17 02:00:26 PDT 1998 
State-Changed-Why:  
the patch doesn't apply cleanly in -current 

From: Lyndon Nerenberg {VE6BBM} <lyndon@orthanc.ab.ca>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/7868 [almost patch]Morse Code Fixups
Date: Fri, 14 Mar 2003 13:54:27 -0700

 Attached is an updated patch that applies against 5.0-RELEASE.
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/src/games/morse/Makefile,v
 retrieving revision 1.7
 diff -u -r1.7 Makefile
 --- Makefile	2001/03/26 14:20:58	1.7
 +++ Makefile	2003/03/14 20:48:52
 @@ -4,8 +4,4 @@
  PROG=	morse
  MAN=	morse.6
  
 -.if ${MACHINE_ARCH} == "i386"
 -CFLAGS += -DSPEAKER=\"/dev/speaker\"
 -.endif
 -
  .include <bsd.prog.mk>
 Index: morse.6
 ===================================================================
 RCS file: /home/ncvs/src/games/morse/morse.6,v
 retrieving revision 1.10
 diff -u -r1.10 morse.6
 --- morse.6	2001/08/07 15:48:28	1.10
 +++ morse.6	2003/03/14 20:48:52
 @@ -135,7 +135,8 @@
  .Sh FILES
  .Bl -tag -width /dev/speaker -compact
  .It Pa /dev/speaker
 -speaker device file
 +.Xr speaker 4
 +device file
  .El
  .Sh ENVIRONMENT
  If your
 @@ -158,7 +159,7 @@
  Sound support for
  .Nm
  added by
 -.An Lyndon Nerenberg (VE7TCP/VE6BBM) Aq lyndon@orthanc.com .
 +.An Lyndon Nerenberg (VE6BBM) Aq lyndon@orthanc.ab.ca .
  .Pp
  Ability to key an external device added by
  .An J\(:org Wunsch
 Index: morse.c
 ===================================================================
 RCS file: /home/ncvs/src/games/morse/morse.c,v
 retrieving revision 1.14
 diff -u -r1.14 morse.c
 --- morse.c	2001/06/26 01:43:52	1.14
 +++ morse.c	2003/03/14 20:48:53
 @@ -32,8 +32,8 @@
   */
  
  /*
 - * Taught to send *real* morse by Lyndon Nerenberg (VE7TCP/VE6BBM)
 - * <lyndon@orthanc.com>
 + * Taught to send *real* morse by Lyndon Nerenberg (VE6BBM)
 + * <lyndon@orthanc.ab.ca>
   */
  
  #ifndef lint
 @@ -63,9 +63,13 @@
  #include <termios.h>
  #include <unistd.h>
  
 -#ifdef SPEAKER
 -#include <machine/speaker.h>
 -#endif
 +#include <sys/param.h>
 +#if defined(__FreeBSD__) && defined(__i386__)	/* spkr(4) exists only on */
 +						/* Intel platforms. */
 +# define SPEAKER
 +# include <machine/speaker.h>
 +# include <fcntl.h>
 +#endif /* __FreeBSD__ && __i386__ */
  
  struct morsetab {
  	char            inchar;
 @@ -276,17 +280,19 @@
  	if ((pflag || device) && (freq == 0))
  		freq = FREQUENCY;
  
 -#ifdef SPEAKER
  	if (pflag) {
 -		if ((spkr = open(SPEAKER, O_WRONLY, 0)) == -1) {
 -			perror(SPEAKER);
 +#ifdef SPEAKER
 +		if ((spkr = open("/dev/speaker", O_WRONLY, 0)) == -1) {
 +			perror("/dev/speaker");
  			exit(1);
  		}
 +#else /* ! SPEAKER */
 +		errx(1, "speaker device not supported on this platform");
 +#endif /* ! SPEAKER */
  	} else
 -#endif
  	if (device) {
  		if ((line = open(device, O_WRONLY | O_NONBLOCK)) == -1) {
 -			perror("open tty line");
 +			perror(device);
  			exit(1);
  		}
  		if (tcgetattr(line, &otty) == -1) {
 @@ -393,7 +399,7 @@
  		printf(" %s", s);
  	else
  		for (; *s; ++s)
 -			printf(" %s", *s == '.' ? "dit" : "dah");
 +			printf(" %s", *s == '.' ? *(s+1) == '\0' ? "dit" : "di" : "dah");
  	printf("\n");
  }
  
State-Changed-From-To: suspended->closed 
State-Changed-By: maxim 
State-Changed-When: Fri Apr 14 18:06:58 UTC 2006 
State-Changed-Why:  
morse(6) was removed from FreeBSD distribution long time ago. 
Thanks for you efforts anyway. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=7868 

From: Maxim Konovalov <maxim@macomnet.ru>
To: Matteo Riondato <matteo@freebsd.org>
Cc: bug-followup@freebsd.org, lyndon@orthanc.ab.ca
Subject: Re: bin/7868: [patch] morse(6): Morse Code Fixups
Date: Fri, 14 Apr 2006 22:46:17 +0400 (MSD)

 On Fri, 14 Apr 2006, 20:24+0200, Matteo Riondato wrote:
 
 > On Fri, Apr 14, 2006 at 06:08:06PM +0000, Maxim Konovalov wrote:
 > > Synopsis: [patch] morse(6): Morse Code Fixups
 > >
 > > State-Changed-From-To: suspended->closed
 > > State-Changed-By: maxim
 > > State-Changed-When: Fri Apr 14 18:06:58 UTC 2006
 > > State-Changed-Why:
 > > morse(6) was removed from FreeBSD distribution long time ago.
 > > Thanks for you efforts anyway.
 >
 > Actually not. Please check src/games/morse :)
 
 Well, it is not built at least :-)
 
 -- 
 Maxim Konovalov

From: Maxim Konovalov <maxim@macomnet.ru>
To: Lyndon Nerenberg <lyndon@orthanc.ca>
Cc: lyndon@orthanc.ab.ca, bug-followup@freebsd.org
Subject: Re: bin/7868: [patch] morse(6): Morse Code Fixups
Date: Sat, 15 Apr 2006 00:20:20 +0400 (MSD)

 On Fri, 14 Apr 2006, 13:17-0700, Lyndon Nerenberg wrote:
 
 >
 > > morse(6) was removed from FreeBSD distribution long time ago.
 >
 > Not according to the 6.1-RC I built from source three days ago.
 
 Ah, yes, I see.  Want I re-open PR?
 
 -- 
 Maxim Konovalov
 
State-Changed-From-To: closed->open 
State-Changed-By: maxim 
State-Changed-When: Sat Apr 15 07:14:12 UTC 2006 
State-Changed-Why:  
I'm blind, morse(6) is here. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=7868 
Responsible-Changed-From-To: freebsd-bugs->scf 
Responsible-Changed-By: scf 
Responsible-Changed-When: Sun Jun 8 13:19:57 CDT 2008 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=7868 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/7868: commit references a PR
Date: Sun,  8 Jun 2008 19:36:01 +0000 (UTC)

 scf         2008-06-08 19:35:47 UTC
 
   FreeBSD src repository
 
   Modified files:
     games/morse          morse.6 morse.c 
   Log:
   SVN rev 179654 on 2008-06-08 19:35:47Z by scf
   
   Fixed the output grammar to properly speak non-terminal dits.
   
   Updated Lyndon Nerenberg's radio callsign and E-mail address.
   
   PR:             bin/7868
   Submitted by:   Lyndon Nerenberg <lyndon@orthanc.ca>
   MFC after:      1 week
   
   Revision  Changes    Path
   1.18      +3 -2      src/games/morse/morse.6
   1.22      +4 -3      src/games/morse/morse.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: scf 
State-Changed-When: Sun Jun 8 14:44:23 CDT 2008 
State-Changed-Why:  
Committed.  Thank you! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=7868 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/7868: commit references a PR
Date: Thu, 19 Jun 2008 23:25:26 +0000 (UTC)

 scf         2008-06-19 23:25:00 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     games/morse          morse.6 morse.c 
   Log:
   SVN rev 179883 on 2008-06-19 23:25:00Z by scf
   
   MFC revisions: 179654
   
   Fixed the output grammar to properly speak non-terminal dits.
   
   Updated Lyndon Nerenberg's radio callsign and E-mail address.
   
   PR:             bin/7868
   Submitted by:   Lyndon Nerenberg <lyndon@orthanc.ca>
   
   Revision   Changes    Path
   1.17.10.1  +3 -2      src/games/morse/morse.6
   1.21.2.1   +4 -3      src/games/morse/morse.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/7868: commit references a PR
Date: Thu, 19 Jun 2008 23:41:16 +0000 (UTC)

 scf         2008-06-19 23:40:32 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     games/morse          morse.6 morse.c 
   Log:
   SVN rev 179884 on 2008-06-19 23:40:32Z by scf
   
   MFC revisions: 179654
   
   Fixed the output grammar to properly speak non-terminal dits.
   
   Updated Lyndon Nerenberg's radio callsign and E-mail address.
   
   PR:             bin/7868
   Submitted by:   Lyndon Nerenberg <lyndon@orthanc.ca>
   
   Revision  Changes    Path
   1.17.2.1  +3 -2      src/games/morse/morse.6
   1.20.2.2  +4 -3      src/games/morse/morse.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
