Software Package:       
	mxv

Release/Version:
	1.07 pl 03

Retrieved from:
	http://www.ccmrc.ucsb.edu/~doug/htmls/MiXViews.html

Bug reports:
	This software package is not maintained by BSDI, please send bug
	reports to doug@ccmrc.ucsb.edu (the author).

Comments:
	- Makefile wrapper (real source is in D)
	- Applied author's patche:
		mxv-v1.07-patch01
		mxv-v1.07-patch02
		mxv-v1.07-patch03

	- Make depend whines a lot about sun_dac.h and sun_audio.h, this is OK)
	- There are many warnings about members being reordered, this seems to
	  be OK.

Other changes:

*** mxv/Imakefile	Wed Nov 29 15:37:50 1995
--- /home/boom/ewv/src/contrib/mxv/D/Imakefile	Tue Nov 28 19:29:02 1995
***************
*** 5,10 ****
--- 5,11 ----
  XCOMM Note:  You must '#define HasGcc2 YES' in config/gcc.def to get the
  XCOMM correct flags for the Gnu C and C++ compilers.
  XCOMM If you cannot do that, then add that line immediately below this line.
+ #define HasGcc2 YES
  
  CCSUFFIX = C
  
***************
*** 137,142 ****
--- 138,158 ----
  ARCH_OBJS = utils.o
  #endif
  
+ #if defined(BsdiArchitecture)
+ XCOMM Extra defines, include directories, loading flags, and libraries needed
+ XCOMM for the Linux version.  The assumption is that you are using Gnu gcc/g++
+ 
+ ARCH_CCDEFINES = -DVOXWARE_DACS -DXDisplay=_XDisplay
+ ARCH_CCFLAGS = -fkeep-inline-functions -mieee-fp
+ ARCH_CCINCLUDES =
+ ARCH_CCLDFLAGS =
+ ARCH_CCLDLIBS = $(APP_FORTLIBS) -lm
+ DEBUG_CCFLAGS = -Ddebug
+ 
+ DAC_OBJS = conv_config.o conv_device.o vw_converter.o
+ ARCH_OBJS = utils.o
+ #endif
+ 
  #if defined(i386SVR4Architecture)
  XCOMM This assumes you have the SoundBlaster card on your machine
  ARCH_CCDEFINES = -DSOUNDBLASTER
***************
*** 186,192 ****
  XCOMM Be sure to remove the -DIV_IS_PATCHED flag if using InterViews 3.1
  
  APP_CCFLAGS = $(GNU_CCFLAGS) $(ARCH_CCFLAGS)
! APP_CCDEFINES = $(ARCH_CCDEFINES) -DIV_IS_PATCHED -DNDEBUG
  APP_CCINCLUDES = -I$(SRC) $(ARCH_CCINCLUDES)
  APP_CCLDFLAGS = -L. $(ARCH_CCLDFLAGS)
  APP_CCLDLIBS = $(DEBUG_CCLDLIBS) -lcfuns $(ARCH_CCLDLIBS)
--- 202,208 ----
  XCOMM Be sure to remove the -DIV_IS_PATCHED flag if using InterViews 3.1
  
  APP_CCFLAGS = $(GNU_CCFLAGS) $(ARCH_CCFLAGS)
! APP_CCDEFINES = $(ARCH_CCDEFINES) -DNDEBUG
  APP_CCINCLUDES = -I$(SRC) $(ARCH_CCINCLUDES)
  APP_CCLDFLAGS = -L. $(ARCH_CCLDFLAGS)
  APP_CCLDLIBS = $(DEBUG_CCLDLIBS) -lcfuns $(ARCH_CCLDLIBS)
***************
*** 248,253 ****
--- 264,274 ----
  MakeObjectFromSrc(sgi_dac)
  #endif
  #if defined(LinuxArchitecture)
+ MakeObjectFromSrc(utils)
+ MakeObjectFromSrc(conv_device)
+ MakeObjectFromSrc(vw_converter)
+ #endif
+ #if defined(BsdiArchitecture)
  MakeObjectFromSrc(utils)
  MakeObjectFromSrc(conv_device)
  MakeObjectFromSrc(vw_converter)

*** mxv/application.C	Wed Nov 29 15:37:51 1995
--- /home/boom/ewv/src/contrib/mxv/D/application.C	Mon Nov 27 21:09:25 1995
***************
*** 41,46 ****
--- 41,48 ----
  #include <iostream.h>
  #include "localdefs.h"
  
+ #ifndef __bsdi__
+ #include <stdio.h>
  #ifndef NeXT
  #include <errno.h>
  extern char *sys_errlist[];
***************
*** 53,58 ****
--- 55,61 ----
  	int sleep(unsigned);
  }
  #endif /* NeXT */
+ #endif
  
  class GlobalResourceList {
  	friend Application;
***************
*** 288,295 ****
  Application::createStatusBar(World *world) {
  	statusBar = new StatusBar("MXV Status", 
  		"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
  	world->Insert(
! 		new TitleFrame(new Banner("", "MXV Status", ""), statusBar, 1), 
  		300,
  		world->Height() - 80
  	);
--- 291,299 ----
  Application::createStatusBar(World *world) {
  	statusBar = new StatusBar("MXV Status", 
  		"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM");
+ 	Banner *b = new Banner("", "MXV Status", "");
  	world->Insert(
! 		new TitleFrame(b, statusBar, 1), 
  		300,
  		world->Height() - 80
  	);

*** mxv/controller_conv.C	Tue May 16 10:51:17 1995
--- /home/boom/ewv/src/contrib/mxv/D/controller_conv.C	Tue Nov 28 20:11:46 1995
***************
*** 25,30 ****
--- 25,32 ----
  // The "factory" method in Converter class for creating appropriate
  // Converter subclass instance
  
+ #include <sys/ioctl.h>
+ 
  #include "sndconfig.h"
  
  #ifdef ADC_DACS

*** mxv/conv_config.C	Mon May 15 10:35:11 1995
--- /home/boom/ewv/src/contrib/mxv/D/conv_config.C	Tue Nov 28 19:52:46 1995
***************
*** 30,35 ****
--- 30,37 ----
  #pragma implementation
  #endif
  
+ #include <sys/ioctl.h>
+ 
  #include "localdefs.h"
  #include "converter.h"
  #include "query.h"

*** mxv/conv_device.C	Mon May  8 10:53:13 1995
--- /home/boom/ewv/src/contrib/mxv/D/conv_device.C	Tue Nov 28 19:53:09 1995
***************
*** 27,32 ****
--- 27,34 ----
  #pragma implementation
  #endif
  
+ #include <sys/ioctl.h>
+ 
  #include "application.h"
  #include "conv_device.h"
  #include "statusaction.h"
Only in mxv: data.C.orig
Only in mxv: datamodifier.C.orig
Only in mxv: datamodifier.h.orig
Only in mxv: datarep.C.orig
Only in mxv: datarep.h.orig
Only in mxv: dataview.C.orig

*** mxv/device.h	Sat May  6 14:28:03 1995
--- /home/boom/ewv/src/contrib/mxv/D/device.h	Tue Nov 28 19:44:58 1995
***************
*** 33,40 ****
--- 33,42 ----
  #include "InterViews/resource.h"
  #include "localdefs.h"
  
+ #ifndef __bsdi__
  #ifndef sgi
  extern "C" int ioctl(int, unsigned long, char*);
+ #endif
  #endif
  
  class Device : virtual public Resource {

*** mxv/diskfile.C	Wed Nov 29 15:37:51 1995
--- /home/boom/ewv/src/contrib/mxv/D/diskfile.C	Mon Nov 27 21:09:26 1995
***************
*** 50,60 ****
--- 50,68 ----
  #if defined(linux)
  extern "C" void setbuffer(FILE*, char*, int);
  #else
+ #ifndef __bsdi__
  #ifndef sgi
  extern "C" int setbuffer(FILE*, char*, int);
  #endif
  #endif
+ #endif
  
+ #ifdef __bsdi__
+ #define	_IOAPPEND	0
+ #define _IOREAD		4
+ #define _IOWRT		8
+ #define _IORW		0x10
+ #else
  #ifndef _IOAPPEND
  #define _IOAPPEND	00	/* not used in this version of stdio -- DAS */
  #endif
***************
*** 67,72 ****
--- 75,81 ----
  #ifndef _IORW
  #define	_IORW 0400
  #endif
+ #endif
  
  // error handlers
  
***************
*** 194,203 ****
--- 203,219 ----
      if (fp->_flags & _IO_NO_WRITES)
        rw &= ~02;
  #else
+ #ifdef __bsdi__
+     if (fp->_flags & (_IOREAD|_IORW))
+       rw |= 01;
+     if (fp->_flags & (_IOWRT|_IORW|_IOAPPEND))
+       rw |= 02;
+ #else
      if (fp->_flag & (_IOREAD|_IORW))
        rw |= 01;
      if (fp->_flag & (_IOWRT|_IORW|_IOAPPEND))
        rw |= 02;
+ #endif
  #endif
      check_state();
    }

*** mxv/ellipse.c	Mon Feb  6 10:08:38 1995
--- /home/boom/ewv/src/contrib/mxv/D/ellipse.c	Tue Nov 28 19:46:34 1995
***************
*** 51,57 ****
  	return x->r;
  }
  
! INLINE int
  cdexp_(r, z)
  	doublecomplex *r, *z;
  {
--- 51,57 ----
  	return x->r;
  }
  
! INLINE void
  cdexp_(r, z)
  	doublecomplex *r, *z;
  {
***************
*** 62,68 ****
  	r->i = expx * sin(z->i);
  }
  
! int
  cdsqrt_(r, z)
  	doublecomplex *r, *z;
  {
--- 62,68 ----
  	r->i = expx * sin(z->i);
  }
  
! void
  cdsqrt_(r, z)
  	doublecomplex *r, *z;
  {

*** mxv/mxfft.c	Tue Dec 13 13:13:34 1994
--- /home/boom/ewv/src/contrib/mxv/D/mxfft.c	Tue Nov 28 19:52:05 1995
***************
*** 41,47 ****
      integer e_1[10];
      doublereal fill_2[2495];
      doublereal e_3;
!     } cstak_ = { 0, 10, 10, 5000, 10, 1, 1, 1, 2, 2, {0}, 0. };
  
  
  /* Table of constant values */
--- 41,47 ----
      integer e_1[10];
      doublereal fill_2[2495];
      doublereal e_3;
!     } cstak_ = { {0, 10, 10, 5000, 10, 1, 1, 1, 2, 2}, {0}, 0. };
  
  
  /* Table of constant values */
***************
*** 1957,1962 ****
--- 1957,1963 ----
  /*<       stop >*/
      s_stop("", 0L);
  /*<       end >*/
+     return (0);
  } /* istkgt_ */
  
  #undef isize

diff -r -c mxv/smartmem.C /home/boom/ewv/src/contrib/mxv/D/smartmem.C
*** mxv/smartmem.C	Wed May 24 16:39:35 1995
--- /home/boom/ewv/src/contrib/mxv/D/smartmem.C	Wed Nov  1 00:18:43 1995
***************
*** 64,70 ****
--- 64,74 ----
  void
  SmartMemory::free(void* ptr, unsigned size) {
  	if(ptr) {
+ #ifdef __bsdi__
+ 		::free(ptr);
+ #else
  		::cfree(ptr);
+ #endif
  		totalBytes_Allocated -= size;
  	}
  }

*** mxv/vw_converter.C	Tue May 30 10:13:40 1995
--- /home/boom/ewv/src/contrib/mxv/D/vw_converter.C	Mon Oct 30 19:10:15 1995
***************
*** 87,93 ****
  		int sampleFormat = 0;
  		switch(dataType()) {
  			case CharData: sampleFormat = AFMT_U8; break;
! 			case ALawData: sampleFormat = AFMT_A_LAW; break;
  			case MuLawData: sampleFormat = AFMT_MU_LAW; break;
  			case ShortData: sampleFormat = AFMT_S16_LE; break;
  			default: break;
--- 87,93 ----
  		int sampleFormat = 0;
  		switch(dataType()) {
  			case CharData: sampleFormat = AFMT_U8; break;
! //			case ALawData: sampleFormat = AFMT_A_LAW; break;
  			case MuLawData: sampleFormat = AFMT_MU_LAW; break;
  			case ShortData: sampleFormat = AFMT_S16_LE; break;
  			default: break;

===================================================================
RCS file: /master/contrib/mxv/D/device.h,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 device.h
*** 1.1.1.1	1995/11/29 19:46:31
--- device.h	1995/11/30 04:14:04
***************
*** 44,50 ****
  	Device() : fd(0) {}
  	virtual ~Device() { close(); }
  	virtual boolean open(const char* name, int mode);
! 	virtual boolean close();
  	virtual int read(void *buffer, int bytes);
  	virtual int write(void *buffer, int bytes);
  	virtual boolean ioctl(unsigned long req, char *argp);
--- 44,50 ----
  	Device() : fd(0) {}
  	virtual ~Device() { close(); }
  	virtual boolean open(const char* name, int mode);
! 	inline virtual boolean close();
  	virtual int read(void *buffer, int bytes);
  	virtual int write(void *buffer, int bytes);
  	virtual boolean ioctl(unsigned long req, char *argp);

===================================================================
RCS file: /master/contrib/mxv/D/Imakefile,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 Imakefile
*** 1.1.1.1	1995/11/29 19:46:28
--- Imakefile	1995/11/30 04:11:08
***************
*** 208,214 ****
  APP_CCLDLIBS = $(DEBUG_CCLDLIBS) -lcfuns $(ARCH_CCLDLIBS)
  APP_CCDEPLIBS = libcfuns.a
  
! FLAGS = $(ARCH_CCDEFINES) $(EXTRA_CCFLAGS)
  
  BINDIR = /usr/local/bin
  
--- 208,214 ----
  APP_CCLDLIBS = $(DEBUG_CCLDLIBS) -lcfuns $(ARCH_CCLDLIBS)
  APP_CCDEPLIBS = libcfuns.a
  
! FLAGS = $(ARCH_CCDEFINES)
  
  BINDIR = /usr/local/bin
  
