From andrew.rakowski@nr.usu.edu Wed Mar 19 15:49:36 1997
Return-Path: <andrew.rakowski@nr.usu.edu>
Received: from trc.amoco.com by attcmail.trc.amoco.com (SMI-8.6/SMI-SVR4)
	id PAA04632; Wed, 19 Mar 1997 15:49:34 -0600
Received: from corpmx02 (corpmx02.trc.amoco.com) by trc.amoco.com (4.1/SMI-4.1)
	id AA25712; Wed, 19 Mar 97 15:49:41 CST
Received: from interlock.amoco.com by corpmx02 (SMI-8.6/SMI-4.0)
	id PAA23456; Wed, 19 Mar 1997 15:40:36 -0600
Received: from spur.Stanford.EDU by portal.amoco.com with SMTP id AA05572
  (InterLock SMTP Gateway 3.0 for <jdellinger@trc.amoco.com>);
  Wed, 19 Mar 1997 15:49:25 -0600
Received: from nr.usu.edu (rsgis.nr.usu.edu) by spur.Stanford.EDU with ESMTP
	(1.39.111.2/16.2) id AA101658158; Wed, 19 Mar 1997 13:49:18 -0800
Received: from landrew.usu.edu by nr.usu.edu (SMI-8.6/SMI-SVR4)
	id OAA17261; Wed, 19 Mar 1997 14:49:11 -0700
Received: by landrew.usu.edu (SMI-8.6/SMI-SVR4)
	id OAA03244; Wed, 19 Mar 1997 14:49:09 -0700
Date: Wed, 19 Mar 1997 14:49:09 -0700
From: andrew.rakowski@nr.usu.edu (Andrew Rakowski, KC7OZS)
Message-Id: <199703192149.OAA03244@landrew.usu.edu>
Return-Receipt-To: rakowski@nr.usu.edu
Organization: Utah State University - Remote Sensing/GIS Lab
Reply-To: rakowski@nr.usu.edu
X-Mailer: Mail User's Shell (7.2.5 10/14/92)
To: joe@spur.Stanford.EDU
Subject: morse program Solaris-2.5 updates...
Content-Length: 3473
Status: RO

Hello Joe...I don't know if you're keeping the Unix-based Morse code
trainer code or not (the morse program and your FTP site seem to
indicate so), but I have some changes that will let you run it on
Solaris-2.5 (probably 2.4, but definitely 2.5 and 2.5.1) Sun systems.

Unfortunately, I can't get morse.c to compile without a WARNING on one
of the signal handler calls.  It doesn't seem to affect the program's
operation, but it's not completely clean compiling.

Here's the error during compilation:

    ...
    landrew{rakowski}16: make
    make test
    cc -O -DFULLVOLUME -DUSG -DPOSIXSIGS  -c  morse.c
    "morse.c", line 1674: warning: argument #2 is incompatible with prototype:
            prototype: pointer to function(int) returning void : "/usr/include/signal.h", line 37
            argument : pointer to function(void) returning void
    cc -O -DFULLVOLUME -DUSG -DPOSIXSIGS  -c  beepSun.c
    cc -o morseSun morse.o beepSun.o -L/usr/demo/SOUND/lib -laudio -lsunmath -lm
    rm -f morse
    ...

It doesn't like the "signal(SIGTSTP, suspend);" in the suspend()
function:

    ...
    landrew{rakowski}17: head -1680 morse.c |tail -10
    SIGRET
    suspend ()
    {
        signal (SIGTSTP, suspend);
        cleanup ();
        kill (getpid (), SIGSTOP);
        if (termopen)
            openterminal ();
        BeepResume ();
    }
    ...

Where signal() is defined as (from the Solaris-2.5.1 man page):

    ...
    NAME
         signal, sigset, sighold,  sigrelse,  sigignore,  sigpause  -
         simplified signal management for application processes
    
    SYNOPSIS
         #include <signal.h>
    
         void (*signal (int sig, void (*disp)(int)))(int);
    
         void (*sigset (int sig, void (*disp)(int)))(int);
    ...



Here's what I needed to change to build morseSun on this Solaris-2.5.1
system (basically, SOUND libs moved, new sunmath lib needed):

landrew{rakowski}38: diff -c -C2 Makefile.orig Makefile
*** Makefile.orig       Sat Nov 19 14:58:15 1994
--- Makefile    Sun Mar 16 14:49:09 1997
***************
*** 45,49 ****
  #DEFINES = -DUSG
  #DEFINES = -DUSG -DERROR_VOLUME=1. -DERROR_FREQ=2000.
! DEFINES = -DFULLVOLUME
  #DEFINES = 
  
--- 45,49 ----
  #DEFINES = -DUSG
  #DEFINES = -DUSG -DERROR_VOLUME=1. -DERROR_FREQ=2000.
! DEFINES = -DFULLVOLUME -DUSG -DPOSIXSIGS
  #DEFINES = 
  
***************
*** 68,72 ****
  
  morseSun:     morse.o beepSun.o
!       $(CC) -o $@ morse.o beepSun.o -L/usr/demo/SOUND -laudio -lm
  
  morseHP:      morse.o beepHP.o alarm.o
--- 68,72 ----
  
  morseSun:     morse.o beepSun.o
!       $(CC) -o $@ morse.o beepSun.o -L/usr/demo/SOUND/lib -laudio -lsunmath -lm
  
  morseHP:      morse.o beepHP.o alarm.o
landrew{rakowski}39: 

landrew{rakowski}39: diff -c -C2 beepSun.c.orig beepSun.c
*** beepSun.c.orig      Sat Oct  8 19:23:10 1994
--- beepSun.c   Sun Mar 16 15:17:51 1997
***************
*** 23,30 ****
  /* Fri Sep 16 12:29:13 PDT 1994 */
  
  #include "beep.h"
! #include <sun/audioio.h>
! #include </usr/demo/SOUND/multimedia/libaudio.h>
! #include </usr/demo/SOUND/multimedia/ulaw2linear.h>
  #include <stropts.h>
  #include <math.h>
--- 23,31 ----
  /* Fri Sep 16 12:29:13 PDT 1994 */
  
+ /* Corrected headers files needed for Solaris 2.5.x [AER/16mar97] */
+ 
  #include "beep.h"
! #include </usr/demo/SOUND/include/multimedia/libaudio.h>
! #include </usr/demo/SOUND/include/multimedia/audio_device.h>
  #include <stropts.h>
  #include <math.h>
landrew{rakowski}40: 


