# # PATCH FILE: xmcd v2.0PL0 -> v2.0PL2 # # Apply this patch to convert xmcd source code # from version 2.0 patchlevel 0 to 2.0 patchlevel 2. # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # libdi - CD Audio Player Device Interface Library # cddb - CD Database Management Library # # Copyright (C) 1993-1996 Ti Kan # E-mail: ti@amb.org # # # INSTRUCTIONS: # # From the xmcd v2.0 patchlevel 0 source code top # level directory, execute the following command: # # patch < xmcd-2.0.pl0-pl2.patch # # See the CHANGES file for a description of the changes. # diff -c5 -r ../xmcd-2.0pl0/CHANGES ./CHANGES *** ../xmcd-2.0pl0/CHANGES Thu Mar 21 20:09:00 1996 --- ./CHANGES Thu May 9 16:48:29 1996 *************** *** 1,7 **** # ! # @(#)CHANGES 6.2 96/03/21 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # libdi - CD Audio Player Device Interface Library # cddb - CD Database Management Library --- 1,7 ---- # ! # @(#)CHANGES 6.4 96/05/09 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # libdi - CD Audio Player Device Interface Library # cddb - CD Database Management Library *************** *** 11,20 **** --- 11,93 ---- Change history: =============== + Ver 2.0 patchlevel 2 released Thu May 09 16:46:17 PDT 1996 + ---------------------------------------------------------- + CD-ROM drive support changes: + + - Added support for the following SCSI CD-ROM drives: + Nakamichi MBR-7 + + OS Support changes: + + - On Linux platforms, the CD device is now opened with + the O_NONBLOCK flag set. This is in accordance with + the new Linux CD audio control standard. + + - The closeOnEject parameter is no longer forced to be + True when running in the SunOS/Linux or FreeBSD ioctl + modes. + + - Added support for configuring ATAPI drives on the + SCO Open Server 5.x platform in config.sh. + + - Changed to use #ifdef __bsdi__ instead of #ifdef bsdi + for BSDI BSD/OS support code. + + Misc changes: + + - Cda was not generating the correct command to the remote + CD database server. This is now fixed. + + - Another xmcd fix for internationalization and multi-byte + character sets. + + - If the xmcd and cda was playing in program mode and the repeat + mode is turned off in the middle of play, it would continue + with one more repeat iteration before stopping. This has been + corrected. + + + Ver 2.0 patchlevel 1 released Mon Apr 08 10:00:48 PDT 1996 + ---------------------------------------------------------- + CD-ROM drive support changes: + + - Fixed the Pioneer DR-U124X configuration to include balance + control support. + + OS Support changes: + + - Fixed a install.sh script failure where the variable $AWK + wasn't defined. This problem was only occuring on some + platforms. + + - On Solaris 2.x systems running vold, the xmcd display would + erroneously indicate "cd busy" after a disc eject. This is + now fixed. + + - Corrected compilation problems on some OpenVMS platforms. + + Misc changes: + + - Xmcd was malfunctioning on some systems with long device + path names due to insufficient path name buffer space. + This has been corrected. + + - On first startup, xmcd tries to write a file to the + /tmp/.cdaudio directory before the directory is created. + This is now fixed. + + - Fix handling of CD database files that contain extended ASCII + characters. + + - Minor changes for internationalization and multi-byte character + sets. + + Ver 2.0 released Thu Mar 21 20:08:15 PST 1996 --------------------------------------------- CD-ROM drive support changes: - Added support for the following SCSI CD-ROM drives: *************** *** 73,83 **** HP-UX 9.x on m68k HP-UX 10.x on PA-RISC NetBSD 1.0A or later on x86, sparc and others SCO Open Server Release 5.x on x86 Siemens Nixdorf SINIX SVR4/mips ! Silicon Graphics Irix64 SVR4 6.x Sony NEWS-OS/m68k - Non-SCSI CD-ROM drives are now supported on the FreeBSD platform via the new FreeBSD ioctl method module. --- 146,156 ---- HP-UX 9.x on m68k HP-UX 10.x on PA-RISC NetBSD 1.0A or later on x86, sparc and others SCO Open Server Release 5.x on x86 Siemens Nixdorf SINIX SVR4/mips ! Silicon Graphics Irix and Irix64 SVR4 6.x Sony NEWS-OS/m68k - Non-SCSI CD-ROM drives are now supported on the FreeBSD platform via the new FreeBSD ioctl method module. diff -c5 -r ../xmcd-2.0pl0/FAQ ./FAQ *** ../xmcd-2.0pl0/FAQ Thu Mar 21 20:09:00 1996 --- ./FAQ Thu May 9 16:48:29 1996 *************** *** 1,7 **** # ! # @(#)FAQ 6.14 96/03/11 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # # by Ti Kan --- 1,7 ---- # ! # @(#)FAQ 6.15 96/04/25 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # # by Ti Kan *************** *** 31,40 **** --- 31,48 ---- XmClientLibs. A. Your system's imake configuration is not set up to properly support Motif. To work around this problem, see the INSTALL file and read the comments in the xmcd_d/Imakefile. + ---------- + Q. I get the following warning when I start xmcd: + + Warning: locale not supported by C library, locale unchanged + + A. This message is displayed when you do not have a properly defined + LANG environment variable. If you are not using an international + character set then you can usually ignore this message. ---------- Q. I get the following message when I start xmcd: Error: attempt to add non-widget child "dsm" to parent "xmcd" which supports only widgets diff -c5 -r ../xmcd-2.0pl0/INSTALL ./INSTALL *** ../xmcd-2.0pl0/INSTALL Thu Mar 21 20:09:01 1996 --- ./INSTALL Thu May 9 16:48:30 1996 *************** *** 1,7 **** # ! # @(#)INSTALL 6.25 96/03/14 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # # by Ti Kan --- 1,7 ---- # ! # @(#)INSTALL 6.26 96/04/19 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # # by Ti Kan *************** *** 56,69 **** PLATFORM-SPECIFIC COMPILE NOTES ------------------------------- ! All platforms: ! If you use the GNU C compiler (gcc), do not use the -ansi ! option. The -ansi option changes the compiler's interpretation of structure bit-fields and breaks both xmcd and cda. Apple A/UX: --- 56,69 ---- PLATFORM-SPECIFIC COMPILE NOTES ------------------------------- ! ALL PLATFORMS: ! IF YOU USE THE GNU C COMPILER (gcc), DO NOT USE THE -ansi ! OPTION. The -ansi option changes the compiler's interpretation of structure bit-fields and breaks both xmcd and cda. Apple A/UX: *************** *** 79,88 **** --- 79,91 ---- BSDI BSD/OS: See the README file for minimum operating system version requirements. + + You must ensure that _ANSI_SOURCE and _POSIX_SOURCE are _not_ + defined. The visual mode in cda is disabled by default for BSD/OS due to the lack of a SYSV-compatible curses library. If you have added the ncurses package to your system then you should remove the -DNOVISUAL from your cda_d/Makefile to enable visual mode diff -c5 -r ../xmcd-2.0pl0/PORTING ./PORTING *** ../xmcd-2.0pl0/PORTING Thu Mar 21 20:09:01 1996 --- ./PORTING Thu May 9 16:48:30 1996 *************** *** 1,7 **** # ! # @(#)PORTING 6.10 95/09/24 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # libdi - CD Audio Player Device Interface Library # cddb - CD Database Management Library --- 1,7 ---- # ! # @(#)PORTING 6.11 96/04/12 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # libdi - CD Audio Player Device Interface Library # cddb - CD Database Management Library *************** *** 509,517 **** QUESTIONS? If you are working on enhancing xmcd/cda and need information, help ! or advice, please send e-mail to me at "ti@amb.org". Likewise, suggestions are also very welcome. --- 509,517 ---- QUESTIONS? If you are working on enhancing xmcd/cda and need information, help ! or advice, please send e-mail to me at "xmcd@amb.org". Likewise, suggestions are also very welcome. diff -c5 -r ../xmcd-2.0pl0/README ./README *** ../xmcd-2.0pl0/README Thu Mar 21 20:09:02 1996 --- ./README Thu May 9 16:48:30 1996 *************** *** 1,7 **** # ! # @(#)README 6.104 96/03/20 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # # by Ti Kan --- 1,7 ---- # ! # @(#)README 6.109 96/04/12 # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player # # by Ti Kan *************** *** 147,157 **** - SINIX-P (on SNI RM600) 14. Silicon Graphics Irix System V Release 4 - Irix version 4.x (on SGI platforms) - Irix version 5.x (on SGI platforms) ! - Irix64 version 6.x (on SGI platforms) 15. Sony NEWS-OS - NEWS-OS 4.1 or later (on Sony NEWS/m68k) 16. Stratus FTX System V Release 4 --- 147,157 ---- - SINIX-P (on SNI RM600) 14. Silicon Graphics Irix System V Release 4 - Irix version 4.x (on SGI platforms) - Irix version 5.x (on SGI platforms) ! - Irix and Irix64 version 6.x (on SGI platforms) 15. Sony NEWS-OS - NEWS-OS 4.1 or later (on Sony NEWS/m68k) 16. Stratus FTX System V Release 4 *************** *** 225,234 **** --- 225,236 ---- CDR-H93RMV, Reno Micro Design International 600CD4X, SE6CDI Mitsumi FX-001S (#). FX-001D (#), FX-001DE (#), FX-400B (#), LU-005S (#) + Nakamichi + MBR-7 NEC CDR-25, CDR-37, CDR-38 (*), CDR-55, CDR-72, CDR-74, CDR-77, CDR-80, CDR-82, CDR-84, CDR-74-1 (*), CDR-84-1 (*), CDR-210P, CDR-222S, CDR-260 (#), CDR-260R (#), CDR-400, CDR-401, CDR-500, CDR-501, CDR-502, CDR-510, CDR-511, CDR-512, CDR-600, CDR-601, *************** *** 373,383 **** system hang or crash). Thus, it is best to turn on the CD-ROM drive before booting the OS, and do not turn it off until after OS shutdown. Although xmcd and cda should run reliably on the supported platforms and CD hardware as noted, if you encounter a problem, please send a ! report to "ti@amb.org" with detailed descriptions of the configuration and problem symptoms. It would also be helpful to reproduce the problem while running either application with the -debug option, and capture the diagnostic output. Send the output to the author for examination. Please also include detailed information about your software and hardware configuration. --- 375,385 ---- system hang or crash). Thus, it is best to turn on the CD-ROM drive before booting the OS, and do not turn it off until after OS shutdown. Although xmcd and cda should run reliably on the supported platforms and CD hardware as noted, if you encounter a problem, please send a ! report to "xmcd@amb.org" with detailed descriptions of the configuration and problem symptoms. It would also be helpful to reproduce the problem while running either application with the -debug option, and capture the diagnostic output. Send the output to the author for examination. Please also include detailed information about your software and hardware configuration. *************** *** 431,441 **** channelRouteSupport: False The Hitachi SCSI-1 CD-ROM drives will not work on the BSD/OS platform without some changes to the SCSI driver. The specific changes necessary are beyond the scope of these notes. If you ! must use the Hitachi SCSI-1 drives please e-mail ti@amb.org for information. Digital UNIX (OSF/1) and Ultrix: The minimum Ultrix and OSF/1 OS version listed above should be --- 433,443 ---- channelRouteSupport: False The Hitachi SCSI-1 CD-ROM drives will not work on the BSD/OS platform without some changes to the SCSI driver. The specific changes necessary are beyond the scope of these notes. If you ! must use the Hitachi SCSI-1 drives please e-mail xmcd@amb.org for information. Digital UNIX (OSF/1) and Ultrix: The minimum Ultrix and OSF/1 OS version listed above should be *************** *** 498,508 **** file (where DEVICE is the basename of the CD-ROM special file). The Hitachi SCSI-1 CD-ROM drives will not work on the Linux platform without some changes to the SCSI driver. The specific changes necessary are beyond the scope of these notes. If you ! must use the Hitachi SCSI-1 drives please e-mail ti@amb.org for information. Sun SunOS 4.1.x: The current SunOS 4.1.x run-time support is limited to systems --- 500,510 ---- file (where DEVICE is the basename of the CD-ROM special file). The Hitachi SCSI-1 CD-ROM drives will not work on the Linux platform without some changes to the SCSI driver. The specific changes necessary are beyond the scope of these notes. If you ! must use the Hitachi SCSI-1 drives please e-mail xmcd@amb.org for information. Sun SunOS 4.1.x: The current SunOS 4.1.x run-time support is limited to systems *************** *** 616,630 **** (rather than the "SCSI pass-through method"). See the "deviceInterfaceMethod" parameter in the LIBDIR/xmcd/config/DEVICE file (where DEVICE is the basename of the CD-ROM special file). On SCO OSR5, only ATAPI-compliant CD-ROM drives can be used. ! you must use the ATAPI BTLD from SCO for these drives. You should ! configure xmcd/cda for a "generic SCSI-2 CD-ROM drive", this is ! because the ATAPI BTLD driver emulates the SCSI pass-through ! interface. Some xmcd/cda features for SCSI-2 drives may be ! non-functional, however. The specific list of non-SCSI drives supported depends upon the configuration of the OS host CD-ROM driver. You should make sure that a driver for your non-SCSI CD-ROM drive is present in your kernel (or can be added to your kernel). Without the appropriate --- 618,628 ---- (rather than the "SCSI pass-through method"). See the "deviceInterfaceMethod" parameter in the LIBDIR/xmcd/config/DEVICE file (where DEVICE is the basename of the CD-ROM special file). On SCO OSR5, only ATAPI-compliant CD-ROM drives can be used. ! you must use the ATAPI BTLD from SCO for these drives. The specific list of non-SCSI drives supported depends upon the configuration of the OS host CD-ROM driver. You should make sure that a driver for your non-SCSI CD-ROM drive is present in your kernel (or can be added to your kernel). Without the appropriate *************** *** 699,708 **** --- 697,707 ---- response time. Host name Location --------------------- ----------------------- cddb.celestial.com Mercer Island, WA, USA + cddb.sonic.net Santa Rosa, CA, USA cddb.schoneal.com Austin, TX, USA sunsite.unc.edu Chapel Hill, NC, USA cddb.delphi.com Lowell, MA, USA cddb.shu.ac.uk United Kingdom cddb.ton.tut.fi Finland *************** *** 710,723 **** cddb.ieo.nctu.edu.tw Taiwan cddb.dentistry.adelaide.edu.au Australia The public CD database server sites may change over time. A current list can be obtained from the xmcd World Wide Web page (see below), ! or write to ti@amb.org. If you wish to operate your own xmcd CD database server on a private ! network, send e-mail to ti@amb.org to inquire about the CD database server software. WHERE TO GET XMCD ----------------- --- 709,729 ---- cddb.ieo.nctu.edu.tw Taiwan cddb.dentistry.adelaide.edu.au Australia The public CD database server sites may change over time. A current list can be obtained from the xmcd World Wide Web page (see below), ! or write to xmcd@amb.org. ! ! If a problem occurs with one of the public CD database servers ! (e.g., cannot connect to it), do not send complaints unless the ! problem lasts for more than a couple of days. It is not unusual ! for network or system interruptions to occur, but they usually ! clear up shortly. If you suspect a real, persistent problem then ! please notify xmcd@amb.org. If you wish to operate your own xmcd CD database server on a private ! network, send e-mail to xmcd@amb.org to inquire about the CD database server software. WHERE TO GET XMCD ----------------- *************** *** 739,749 **** ftp://ftp.x.org/contrib/applications/xmcd/xmcd-cddb.README (gzip'd tar archive) ftp://ftp.x.org/contrib/applications/xmcd/xmcd-cddb.tar.gz ! Some ftp sites are not secure, as it is commonly allowed for anyone to anonymously post to them. The xmcd web page (see below) lists the checksum of all xmcd-related packages, so you can check that your copy is genuine. Both packages require the "gunzip" (GNU unzip) utility to uncompress. --- 745,755 ---- ftp://ftp.x.org/contrib/applications/xmcd/xmcd-cddb.README (gzip'd tar archive) ftp://ftp.x.org/contrib/applications/xmcd/xmcd-cddb.tar.gz ! Some FTP sites are not secure, as it is commonly allowed for anyone to anonymously post to them. The xmcd web page (see below) lists the checksum of all xmcd-related packages, so you can check that your copy is genuine. Both packages require the "gunzip" (GNU unzip) utility to uncompress. *************** *** 755,766 **** encouraged to contribute to this database by using the "Send" feature in xmcd. Please read the xmcd-cddb.README file in the public CD database archive before sending entries to the public database. Pre-compiled binary releases of xmcd and cda for certain OS ! environments are also available from the author. Please send ! e-mail to ti@amb.org for more information. XMCD/CDA WORLD WIDE WEB HOME PAGE --------------------------------- --- 761,773 ---- encouraged to contribute to this database by using the "Send" feature in xmcd. Please read the xmcd-cddb.README file in the public CD database archive before sending entries to the public database. Pre-compiled binary releases of xmcd and cda for certain OS ! environments are also available via the xmcd World Wide Web page ! (see below). If you don't have web access then send e-mail to ! xmcd@amb.org for more information. XMCD/CDA WORLD WIDE WEB HOME PAGE --------------------------------- diff -c5 -r ../xmcd-2.0pl0/cda_d/cda.c ./cda_d/cda.c *** ../xmcd-2.0pl0/cda_d/cda.c Thu Mar 21 20:10:06 1996 --- ./cda_d/cda.c Thu May 9 16:49:19 1996 *************** *** 18,28 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef LINT ! static char *_cda_c_ident_ = "@(#)cda.c 6.66 96/01/07"; #endif #define _CDA_ #include "common_d/appenv.h" --- 18,28 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef LINT ! static char *_cda_c_ident_ = "@(#)cda.c 6.67 96/05/08"; #endif #define _CDA_ #include "common_d/appenv.h" *************** *** 1038,1047 **** --- 1038,1075 ---- WR_ARG_TOC(p->arg[i+1], s->trkinfo[i].trkno, 0, s->trkinfo[i].min, s->trkinfo[i].sec); break; + case CDA_TOC2: + if (s->mode == MOD_NODISC || s->mode == MOD_BUSY) { + p->retcode = CDA_INVALID; + break; + } + + /* Initialize */ + memset(p->arg, 0, CDA_NARGS * sizeof(word32_t)); + + p->arg[0] = cddb_discid(s); + + for (i = 0; i < (int) s->tot_trks; i++) { + WR_ARG_TOC2(p->arg[i+1], s->trkinfo[i].trkno, + s->trkinfo[i].min, + s->trkinfo[i].sec, + s->trkinfo[i].frame + ); + } + + /* Lead-out track */ + WR_ARG_TOC2(p->arg[i+1], s->trkinfo[i].trkno, + s->trkinfo[i].min, + s->trkinfo[i].sec, + s->trkinfo[i].frame + ); + + break; + case CDA_EXTINFO: if (s->mode == MOD_NODISC || s->mode == MOD_BUSY) { p->retcode = CDA_INVALID; break; } *************** *** 1976,1997 **** * cda_dbload * Read in the CD database file entry pertaining to the * currently loaded disc, if available. * * Args: ! * s - Pointer to the curstat_t structure. * * Return: * Nothing. */ bool_t cda_dbload(word32_t discid) { curstat_t *s; s = &status; cur_db.discid = discid; /* Load CD database entry */ if (cddb_load(&cur_db, s) != 0) { /* Failed to load database entry */ return FALSE; --- 2004,2066 ---- * cda_dbload * Read in the CD database file entry pertaining to the * currently loaded disc, if available. * * Args: ! * discid - The disc identifier * * Return: * Nothing. */ bool_t cda_dbload(word32_t discid) { + int i; curstat_t *s; + word32_t arg[CDA_NARGS]; s = &status; + memset(arg, 0, CDA_NARGS * sizeof(word32_t)); + + if (!cda_sendcmd(CDA_TOC2, arg)) { + printf("%s\n", errmsg); + return FALSE; + } + cur_db.discid = discid; + s->tot_trks = discid & 0xff; + + /* Update curstat with essential info */ + for (i = 0; i < (int) s->tot_trks; i++) { + RD_ARG_TOC2(arg[i+1], s->trkinfo[i].trkno, + s->trkinfo[i].min, + s->trkinfo[i].sec, + s->trkinfo[i].frame + ); + + msftoblk( + s->trkinfo[i].min, + s->trkinfo[i].sec, + s->trkinfo[i].frame, + &s->trkinfo[i].addr, + MSF_OFFSET(s) + ); + } + + /* Lead-out track */ + RD_ARG_TOC2(arg[i+1], s->trkinfo[i].trkno, + s->trkinfo[i].min, + s->trkinfo[i].sec, + s->trkinfo[i].frame + ); + msftoblk( + s->trkinfo[i].min, + s->trkinfo[i].sec, + s->trkinfo[i].frame, + &s->trkinfo[i].addr, + MSF_OFFSET(s) + ); /* Load CD database entry */ if (cddb_load(&cur_db, s) != 0) { /* Failed to load database entry */ return FALSE; diff -c5 -r ../xmcd-2.0pl0/cda_d/cda.h ./cda_d/cda.h *** ../xmcd-2.0pl0/cda_d/cda.h Thu Mar 21 20:10:06 1996 --- ./cda_d/cda.h Thu May 9 16:49:20 1996 *************** *** 21,31 **** */ #ifndef __CDA_H__ #define __CDA_H__ #ifndef LINT ! static char *_cda_h_ident_ = "@(#)cda.h 6.8 96/01/07"; #endif /* Program name string */ #define PROGNAME "cda" --- 21,31 ---- */ #ifndef __CDA_H__ #define __CDA_H__ #ifndef LINT ! static char *_cda_h_ident_ = "@(#)cda.h 6.9 96/05/08"; #endif /* Program name string */ #define PROGNAME "cda" *************** *** 67,76 **** --- 67,77 ---- #define CDA_TOC 0x110 #define CDA_EXTINFO 0x111 #define CDA_DEVICE 0x112 #define CDA_VERSION 0x113 #define CDA_DEBUG 0x114 + #define CDA_TOC2 0x115 /* CDA return code */ #define CDA_UNKNOWN 0x00 #define CDA_OK 0x01 *************** *** 123,132 **** --- 124,147 ---- (x) |= (((t) & 0xff) << 16); \ (x) |= (((m) & 0xff) << 8); \ (x) |= ((s) & 0xff); \ } /* arg[n] */ + /* CDA_TOC2 return argument macros */ + #define RD_ARG_TOC2(x,t,m,s,f) { \ + ((t) = ((x) >> 24) & 0xff); \ + ((m) = ((x) >> 16) & 0xff); \ + ((s) = ((x) >> 8) & 0xff); \ + ((f) = (x) & 0xff); \ + } /* arg[n] */ + + #define WR_ARG_TOC2(x,t,m,s,f) { \ + (x) |= (((t) & 0xff) << 24); \ + (x) |= (((m) & 0xff) << 16); \ + (x) |= (((s) & 0xff) << 8); \ + (x) |= ((f) & 0xff); \ + } /* arg[n] */ /* CDA pipe protocol packet */ typedef struct cda_pkt { word32_t magic; word32_t pktid; diff -c5 -r ../xmcd-2.0pl0/cda_d/visual.c ./cda_d/visual.c *** ../xmcd-2.0pl0/cda_d/visual.c Thu Mar 21 20:10:06 1996 --- ./cda_d/visual.c Thu May 9 16:49:20 1996 *************** *** 26,36 **** * Contributing author: Philip Le Riche * E-Mail: pleriche@uk03.bull.co.uk */ #ifndef LINT ! static char *_visual_c_ident_ = "@(#)visual.c 6.36 96/01/07"; #endif #ifndef NOVISUAL #define _CDA_ --- 26,36 ---- * Contributing author: Philip Le Riche * E-Mail: pleriche@uk03.bull.co.uk */ #ifndef LINT ! static char *_visual_c_ident_ = "@(#)visual.c 6.37 96/04/19"; #endif #ifndef NOVISUAL #define _CDA_ *************** *** 52,66 **** #define SYSV #else #if defined(ultrix) || defined(__ultrix) #include #else ! #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(bsdi) #include #else #include ! #endif /* __FreeBSD__ __NetBSD__ bsdi */ #endif /* ultrix */ #endif /* SYSV */ #include --- 52,66 ---- #define SYSV #else #if defined(ultrix) || defined(__ultrix) #include #else ! #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__) #include #else #include ! #endif /* __FreeBSD__ __NetBSD__ __bsdi__ */ #endif /* ultrix */ #endif /* SYSV */ #include diff -c5 -r ../xmcd-2.0pl0/cddb_d/cddb.c ./cddb_d/cddb.c *** ../xmcd-2.0pl0/cddb_d/cddb.c Thu Mar 21 20:09:06 1996 --- ./cddb_d/cddb.c Thu May 9 16:48:34 1996 *************** *** 18,28 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef LINT ! static char *_cddb_c_ident_ = "@(#)cddb.c 6.73 96/03/21"; #endif #ifdef __VMS typedef char * caddr_t; #endif --- 18,28 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef LINT ! static char *_cddb_c_ident_ = "@(#)cddb.c 6.77 96/04/07"; #endif #ifdef __VMS typedef char * caddr_t; #endif *************** *** 347,357 **** fp->pos = 1; } else fp->pos++; ! return (fp->cache[fp->pos-1]); } /* * cddb_gets --- 347,357 ---- fp->pos = 1; } else fp->pos++; ! return ((int) fp->cache[fp->pos-1]); } /* * cddb_gets *************** *** 373,390 **** STATIC bool_t cddb_gets(cddb_file_t *fp, char *buf, int len, bool_t do_workproc) { int tot = 0, c = 0; - bool_t prev_lf; /* Sanity check */ if (fp->magic != CDDB_FMAGIC) return FALSE; - prev_lf = FALSE; - while ((c = cddb_getc(fp, do_workproc)) > 0) { *buf = (char) c; tot++; buf++; --- 373,387 ---- *************** *** 436,446 **** return FALSE; len = strlen(buf); for (i = 0; i < len; i++) { ! fp->cache[fp->pos] = *buf; fp->pos++; buf++; if (fp->pos == CDDB_CACHESZ) { --- 433,443 ---- return FALSE; len = strlen(buf); for (i = 0; i < len; i++) { ! fp->cache[fp->pos] = (unsigned char) *buf; fp->pos++; buf++; if (fp->pos == CDDB_CACHESZ) { *************** *** 1292,1302 **** CDDB_FATAL(app_data.str_nomemory); return NULL; } /* Allocate storage for I/O cache */ ! fp->cache = (char *) MEM_ALLOC(CDDB_CACHESZ); if (fp->cache == NULL) { CDDB_FATAL(app_data.str_nomemory); return NULL; } --- 1289,1299 ---- CDDB_FATAL(app_data.str_nomemory); return NULL; } /* Allocate storage for I/O cache */ ! fp->cache = (unsigned char *) MEM_ALLOC(CDDB_CACHESZ); if (fp->cache == NULL) { CDDB_FATAL(app_data.str_nomemory); return NULL; } *************** *** 2161,2171 **** --- 2158,2170 ---- /* Sanity check */ if (clp->prog[0] == '\0') strcpy(clp->prog, "unknown"); + #ifndef NOREMOTE SOCKSINIT(clp->prog); + #endif if (clp->host[0] == '\0') { #ifndef NOREMOTE /* Try to determine host name */ if (gethostname(clp->host, MAXHOSTNAMELEN) < 0) *************** *** 2302,2312 **** CDDB_FATAL(app_data.str_nomemory); return CDDB_SET_CODE(OPEN_ERR, 0); } /* Allocate read cache */ ! rfp->cache = (char *) MEM_ALLOC(CDDB_CACHESZ); if (rfp->cache == NULL) { CDDB_FATAL(app_data.str_nomemory); return CDDB_SET_CODE(OPEN_ERR, 0); } --- 2301,2311 ---- CDDB_FATAL(app_data.str_nomemory); return CDDB_SET_CODE(OPEN_ERR, 0); } /* Allocate read cache */ ! rfp->cache = (unsigned char *) MEM_ALLOC(CDDB_CACHESZ); if (rfp->cache == NULL) { CDDB_FATAL(app_data.str_nomemory); return CDDB_SET_CODE(OPEN_ERR, 0); } *************** *** 2372,2382 **** wfp = (cddb_file_t *)(void *) MEM_ALLOC(sizeof(cddb_file_t)); if (wfp == NULL) exit(OPEN_ERR); /* Allocate write cache */ ! wfp->cache = (char *) MEM_ALLOC(CDDB_CACHESZ); if (wfp->cache == NULL) exit(OPEN_ERR); wfp->magic = CDDB_FMAGIC; wfp->fd = pfd[1]; --- 2371,2381 ---- wfp = (cddb_file_t *)(void *) MEM_ALLOC(sizeof(cddb_file_t)); if (wfp == NULL) exit(OPEN_ERR); /* Allocate write cache */ ! wfp->cache = (unsigned char *) MEM_ALLOC(CDDB_CACHESZ); if (wfp->cache == NULL) exit(OPEN_ERR); wfp->magic = CDDB_FMAGIC; wfp->fd = pfd[1]; *************** *** 3045,3056 **** cddb_curfileupd(cddb_incore_t *dbp) { #ifndef __VMS FILE *fp; struct stat stbuf; ! char str[STR_BUF_SZ]; ! static char prev[STR_BUF_SZ]; if (dbp->discid != 0) sprintf(str, "Device:\t\t%s\nCategory:\t%s\nDiscID:\t\t%08x\n", app_data.device, dbp->category, dbp->discid); else --- 3044,3055 ---- cddb_curfileupd(cddb_incore_t *dbp) { #ifndef __VMS FILE *fp; struct stat stbuf; ! char str[STR_BUF_SZ + FILE_PATH_SZ]; ! static char prev[STR_BUF_SZ + FILE_PATH_SZ]; if (dbp->discid != 0) sprintf(str, "Device:\t\t%s\nCategory:\t%s\nDiscID:\t\t%08x\n", app_data.device, dbp->category, dbp->discid); else diff -c5 -r ../xmcd-2.0pl0/cddb_d/cddb.h ./cddb_d/cddb.h *** ../xmcd-2.0pl0/cddb_d/cddb.h Thu Mar 21 20:09:06 1996 --- ./cddb_d/cddb.h Thu May 9 16:48:34 1996 *************** *** 21,31 **** */ #ifndef __CDDB_H__ #define __CDDB_H__ #ifndef LINT ! static char *_cddb_h_ident_ = "@(#)cddb.h 6.29 96/03/21"; #endif #ifndef NOREMOTE #ifndef __VMS --- 21,31 ---- */ #ifndef __CDDB_H__ #define __CDDB_H__ #ifndef LINT ! static char *_cddb_h_ident_ = "@(#)cddb.h 6.31 96/04/07"; #endif #ifndef NOREMOTE #ifndef __VMS *************** *** 53,64 **** #include #include #include #include /* OpenVMS hack: These are normally defined in socket.h ! * but missing in OpenVMS. */ typedef int fd_mask; #ifndef FD_SETSIZE #define FD_SETSIZE 4096 --- 53,66 ---- #include #include #include #include + #ifndef __FD_SET + /* OpenVMS hack: These are normally defined in socket.h ! * but missing in some versions of OpenVMS. */ typedef int fd_mask; #ifndef FD_SETSIZE #define FD_SETSIZE 4096 *************** *** 75,84 **** --- 77,88 ---- #define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) #define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p))) + #endif /* __FD_SET */ + #endif /* __VMS */ #else /* NOREMOTE implies SYNCHRONOUS */ *************** *** 212,222 **** int magic; /* Magic number */ int fd; /* File descriptor */ int rw; /* O_RDONLY, O_WRONLY */ int pos; /* Cache position */ int cnt; /* Cache character count */ ! char *cache; /* I/O cache */ int type; /* CDDB_LOCAL or CDDB_REMOTE */ } cddb_file_t; /* CDDB path list structure */ --- 216,226 ---- int magic; /* Magic number */ int fd; /* File descriptor */ int rw; /* O_RDONLY, O_WRONLY */ int pos; /* Cache position */ int cnt; /* Cache character count */ ! unsigned char *cache; /* I/O cache */ int type; /* CDDB_LOCAL or CDDB_REMOTE */ } cddb_file_t; /* CDDB path list structure */ diff -c5 -r ../xmcd-2.0pl0/common_d/patchlevel.h ./common_d/patchlevel.h *** ../xmcd-2.0pl0/common_d/patchlevel.h Thu Mar 21 20:09:04 1996 --- ./common_d/patchlevel.h Thu May 9 16:48:32 1996 *************** *** 26,38 **** */ #ifndef __PATCHLEVEL_H__ #define __PATCHLEVEL_H__ #ifndef LINT ! static char *_patchlevel_h_ident_ = "@(#)patchlevel.h 6.4 96/03/21"; #endif #define VERSION "2.0" /* The version number */ #define VERSION_EXT "" /* Version number extension */ ! #define PATCHLEVEL 0 /* The patch level */ #endif /* __PATCHLEVEL_H__ */ --- 26,38 ---- */ #ifndef __PATCHLEVEL_H__ #define __PATCHLEVEL_H__ #ifndef LINT ! static char *_patchlevel_h_ident_ = "@(#)patchlevel.h 6.6 96/04/10"; #endif #define VERSION "2.0" /* The version number */ #define VERSION_EXT "" /* Version number extension */ ! #define PATCHLEVEL 2 /* The patch level */ #endif /* __PATCHLEVEL_H__ */ diff -c5 -r ../xmcd-2.0pl0/install.sh ./install.sh *** ../xmcd-2.0pl0/install.sh Thu Mar 21 20:09:02 1996 --- ./install.sh Thu May 9 16:48:31 1996 *************** *** 1,8 **** #!/bin/sh # ! # @(#)install.sh 6.25 96/01/07 # # Script to install the software binary and support files on # the target system. # # xmcd - Motif(tm) CD Audio Player --- 1,8 ---- #!/bin/sh # ! # @(#)install.sh 6.26 96/04/03 # # Script to install the software binary and support files on # the target system. # # xmcd - Motif(tm) CD Audio Player *************** *** 368,377 **** --- 368,381 ---- then ECHO="echo -e" # GNU bash, etc. else ECHO=echo # generic SysV fi + + # If awk doesn't work well on your system, try changing the + # following to nawk or gawk. + AWK=awk # Remove old error log file ERROR=0 rm -f $ERRFILE if [ -f $ERRFILE ] Only in ./libdi_d/cfgtbl: Nakamich diff -c5 -r ../xmcd-2.0pl0/libdi_d/cfgtbl/Pioneer ./libdi_d/cfgtbl/Pioneer *** ../xmcd-2.0pl0/libdi_d/cfgtbl/Pioneer Thu Mar 21 20:09:32 1996 --- ./libdi_d/cfgtbl/Pioneer Thu May 9 16:48:52 1996 *************** *** 1,7 **** # ! # @(#)Pioneer 6.6 96/01/07 # # xmcd CD-ROM vendor configuration file # # xmcd - Motif(tm) CD Audio Player # --- 1,7 ---- # ! # @(#)Pioneer 6.7 96/04/03 # # xmcd CD-ROM vendor configuration file # # xmcd - Motif(tm) CD Audio Player # *************** *** 77,83 **** DRM-604X:1:4:0:0:0:0:0:1:0:0:0:0:0:1:0:0 DRM-610:1:4:0:0:0:0:0:1:0:0:0:0:0:1:0:0 DRM-624X:2:0:1:1:1:1:0:1:1:5:0:0:1:1:1:0 DRM-1804X:2:0:1:1:1:1:0:1:1:5:0:0:1:1:1:0 DR-U104X:2:0:1:1:1:1:1:1:1:5:0:0:1:1:1:0 ! DR-U124X:2:0:1:1:1:1:1:1:1:5:0:0:1:1:1:0 DR-UA124X:0:1:1:0:0:1:1:1:0:3:0:0:1:0:0:0 --- 77,83 ---- DRM-604X:1:4:0:0:0:0:0:1:0:0:0:0:0:1:0:0 DRM-610:1:4:0:0:0:0:0:1:0:0:0:0:0:1:0:0 DRM-624X:2:0:1:1:1:1:0:1:1:5:0:0:1:1:1:0 DRM-1804X:2:0:1:1:1:1:0:1:1:5:0:0:1:1:1:0 DR-U104X:2:0:1:1:1:1:1:1:1:5:0:0:1:1:1:0 ! DR-U124X:2:0:1:1:1:1:1:1:1:7:0:0:1:1:1:0 DR-UA124X:0:1:1:0:0:1:1:1:0:3:0:0:1:0:0:0 diff -c5 -r ../xmcd-2.0pl0/libdi_d/config.sh ./libdi_d/config.sh *** ../xmcd-2.0pl0/libdi_d/config.sh Thu Mar 21 20:09:07 1996 --- ./libdi_d/config.sh Thu May 9 16:48:35 1996 *************** *** 1,8 **** #!/bin/sh # ! # @(#)config.sh 6.48 96/02/02 # # Script to set up the device-dependent configuration files. # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player --- 1,8 ---- #!/bin/sh # ! # @(#)config.sh 6.50 96/04/12 # # Script to set up the device-dependent configuration files. # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player *************** *** 308,321 **** ask_nonscsi_config() { $ECHO "\n Non-SCSI CD-ROM drives are currently supported only" ! $ECHO " via the SunOS/Linux and FreeBSD ioctl interfaces." ! $ECHO " If you are not running Linux or FreeBSD then this will" ! $ECHO " not work. You must have the appropriate CD-ROM driver" ! $ECHO " configured in your kernel." YNDEF=n getyn "\n Do you want to continue" if [ $? != 0 ] then --- 308,320 ---- ask_nonscsi_config() { $ECHO "\n Non-SCSI CD-ROM drives are currently supported only" ! $ECHO " on the Linux, FreeBSD and SCO Open Server platforms." ! $ECHO " You must have the appropriate CD-ROM driver configured in" ! $ECHO " your kernel." YNDEF=n getyn "\n Do you want to continue" if [ $? != 0 ] then *************** *** 326,335 **** --- 325,335 ---- # Select the ioctl method # $ECHO "\n Please select a Device Interface Method:\n" $ECHO " 1.\tSunOS/Linux ioctl method" $ECHO " 2.\tFreeBSD ioctl method" + $ECHO " 3.\tSCO Open Server ATAPI BTLD" $ECHO " q.\tquit" while : do $ECHO "\n Enter choice: \c" *************** *** 338,350 **** if [ "$ANS" = q ] then return 1 fi ! if [ -z "$ANS" -o "$ANS" -lt 1 -o "$ANS" -gt 2 ] then ! $ECHO " Please answer 1 to 2." else break fi done --- 338,350 ---- if [ "$ANS" = q ] then return 1 fi ! if [ -z "$ANS" -o "$ANS" -lt 1 -o "$ANS" -gt 3 ] then ! $ECHO " Please answer 1 to 3." else break fi done *************** *** 387,396 **** --- 387,419 ---- BALSUPP=True CHRSUPP=False VOLCTL=3 PAUSE=True CADDYLOCK=True + CURPOSFMT=False + PLAYNOTUR=False + ;; + 3) + # SCO Open Server ATAPI BTLD + # Set up as a "generic" SCSI-2 drive + METHOD=0 + VENDOR=0 + VOLBASE=0 + VOLTAPER=0 + PLAYMSF=True + PLAY12=False + PLAY10=False + PLAYTI=True + LOAD=True + EJECT=True + MODEDBD=False + VOLSUPP=True + BALSUPP=True + CHRSUPP=False + VOLCTL=3 + PAUSE=True + CADDYLOCK=False CURPOSFMT=False PLAYNOTUR=False ;; *) # Should not get here $ECHO " Error: unsupported ioctl method." diff -c5 -r ../xmcd-2.0pl0/libdi_d/fbioc.c ./libdi_d/fbioc.c *** ../xmcd-2.0pl0/libdi_d/fbioc.c Thu Mar 21 20:09:25 1996 --- ./libdi_d/fbioc.c Thu May 9 16:48:47 1996 *************** *** 25,35 **** * Contributing author: Gennady B. Sorokopud * E-mail: gena@NetVision.net.il */ #ifndef LINT ! static char *_fbioc_c_ident_ = "@(#)fbioc.c 6.31 96/01/07"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" --- 25,35 ---- * Contributing author: Gennady B. Sorokopud * E-mail: gena@NetVision.net.il */ #ifndef LINT ! static char *_fbioc_c_ident_ = "@(#)fbioc.c 6.34 96/04/25"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" *************** *** 176,188 **** struct stat stbuf; char errstr[ERR_BUF_SZ]; int i, ret; - /* Force close on eject. */ - app_data.eject_close = TRUE; - /* Check for validity of device node */ if (stat(path, &stbuf) < 0) { sprintf(errstr, app_data.str_staterr, path); DI_FATAL(errstr); return FALSE; --- 176,185 ---- *************** *** 1923,1933 **** STATIC bool_t fbioc_run_repeat(curstat_t *s) { msf_t start_msf, end_msf; ! int ret; if (!s->repeat) return FALSE; if (s->prog_tot > 0) { --- 1920,1930 ---- STATIC bool_t fbioc_run_repeat(curstat_t *s) { msf_t start_msf, end_msf; ! bool_t ret; if (!s->repeat) return FALSE; if (s->prog_tot > 0) { *************** *** 2140,2149 **** --- 2137,2148 ---- void fbioc_repeat(curstat_t *s, bool_t enable) { s->repeat = enable; DPY_RPTCNT(s); + if (!enable) + fbioc_new_progshuf = FALSE; } /* * fbioc_shuffle diff -c5 -r ../xmcd-2.0pl0/libdi_d/libdi.c ./libdi_d/libdi.c *** ../xmcd-2.0pl0/libdi_d/libdi.c Thu Mar 21 20:09:08 1996 --- ./libdi_d/libdi.c Thu May 9 16:48:36 1996 *************** *** 17,27 **** * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef LINT ! static char *_libdi_c_ident_ = "@(#)libdi.c 6.30 96/01/17"; #endif #include "common_d/appenv.h" #include "common_d/patchlevel.h" #include "common_d/util.h" --- 17,27 ---- * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef LINT ! static char *_libdi_c_ident_ = "@(#)libdi.c 6.31 96/04/04"; #endif #include "common_d/appenv.h" #include "common_d/patchlevel.h" #include "common_d/util.h" *************** *** 1184,1195 **** struct stat stbuf; if (di_isdemo()) return TRUE; /* No locking needed in demo mode */ ! if (stat(path, &stbuf) < 0) ! return FALSE; sprintf(lockfile, "%s/lock.%x", TEMP_DIR, stbuf.st_rdev); DBGPRN(errfp, "Lock file: %s\n", lockfile); --- 1184,1206 ---- struct stat stbuf; if (di_isdemo()) return TRUE; /* No locking needed in demo mode */ ! if (stat(path, &stbuf) < 0) { ! if (errno == ENOENT) ! /* If the device node is missing it is probably ! * due to dynamic node creation/removal ! * on some platforms based on presence of media. ! * In this case, let the lock call succeed without ! * actually setting a lock. Otherwise the status ! * would erroneously become "cd busy". ! */ ! return TRUE; ! else ! return FALSE; ! } sprintf(lockfile, "%s/lock.%x", TEMP_DIR, stbuf.st_rdev); DBGPRN(errfp, "Lock file: %s\n", lockfile); diff -c5 -r ../xmcd-2.0pl0/libdi_d/os_bsdi.c ./libdi_d/os_bsdi.c *** ../xmcd-2.0pl0/libdi_d/os_bsdi.c Thu Mar 21 20:09:10 1996 --- ./libdi_d/os_bsdi.c Thu May 9 16:48:37 1996 *************** *** 27,45 **** * * This software fragment contains code that interfaces the CD player * application to the BSDI BSD/OS (version 2.0 or later) operating system. */ #ifndef LINT ! static char *_os_bsdi_c_ident_ = "@(#)os_bsdi.c 6.13 96/01/07"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" #include "libdi_d/scsipt.h" ! #if defined(bsdi) && defined(DI_SCSIPT) && !defined(DEMO_ONLY) extern appdata_t app_data; extern bool_t scsipt_notrom_error; extern FILE *errfp; extern di_client_t *di_clinfo; --- 27,45 ---- * * This software fragment contains code that interfaces the CD player * application to the BSDI BSD/OS (version 2.0 or later) operating system. */ #ifndef LINT ! static char *_os_bsdi_c_ident_ = "@(#)os_bsdi.c 6.14 96/04/19"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" #include "libdi_d/scsipt.h" ! #if defined(__bsdi__) && defined(DI_SCSIPT) && !defined(DEMO_ONLY) extern appdata_t app_data; extern bool_t scsipt_notrom_error; extern FILE *errfp; extern di_client_t *di_clinfo; *************** *** 304,310 **** pthru_vers(void) { return ("OS Interface module for BSDI BSD/OS\n"); } ! #endif /* bsdi DI_SCSIPT DEMO_ONLY */ --- 304,310 ---- pthru_vers(void) { return ("OS Interface module for BSDI BSD/OS\n"); } ! #endif /* __bsdi__ DI_SCSIPT DEMO_ONLY */ diff -c5 -r ../xmcd-2.0pl0/libdi_d/os_bsdi.h ./libdi_d/os_bsdi.h *** ../xmcd-2.0pl0/libdi_d/os_bsdi.h Thu Mar 21 20:09:11 1996 --- ./libdi_d/os_bsdi.h Thu May 9 16:48:38 1996 *************** *** 29,42 **** * application to the BSDI BSD/OS (version 2.0 or later) operating system. */ #ifndef __OS_BSDI_H__ #define __OS_BSDI_H__ ! #if defined(bsdi) && defined(DI_SCSIPT) && !defined(DEMO_ONLY) #ifndef LINT ! static char *_os_bsdi_h_ident_ = "@(#)os_bsdi.h 6.3 96/01/07"; #endif #include #include --- 29,42 ---- * application to the BSDI BSD/OS (version 2.0 or later) operating system. */ #ifndef __OS_BSDI_H__ #define __OS_BSDI_H__ ! #if defined(__bsdi__) && defined(DI_SCSIPT) && !defined(DEMO_ONLY) #ifndef LINT ! static char *_os_bsdi_h_ident_ = "@(#)os_bsdi.h 6.4 96/04/19"; #endif #include #include *************** *** 50,58 **** word32_t, byte_t, byte_t, byte_t, bool_t); extern bool_t pthru_open(char *); extern void pthru_close(void); extern char *pthru_vers(void); ! #endif /* bsdi DI_SCSIPT DEMO_ONLY */ #endif /* __OS_BSDI_H__ */ --- 50,58 ---- word32_t, byte_t, byte_t, byte_t, bool_t); extern bool_t pthru_open(char *); extern void pthru_close(void); extern char *pthru_vers(void); ! #endif /* __bsdi__ DI_SCSIPT DEMO_ONLY */ #endif /* __OS_BSDI_H__ */ diff -c5 -r ../xmcd-2.0pl0/libdi_d/os_linux.c ./libdi_d/os_linux.c *** ../xmcd-2.0pl0/libdi_d/os_linux.c Thu Mar 21 20:09:15 1996 --- ./libdi_d/os_linux.c Thu May 9 16:48:41 1996 *************** *** 24,34 **** * * This software fragment contains code that interfaces the CD player * application to the Linux operating system. */ #ifndef LINT ! static char *_os_linux_c_ident_ = "@(#)os_linux.c 6.7 96/01/07"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" --- 24,34 ---- * * This software fragment contains code that interfaces the CD player * application to the Linux operating system. */ #ifndef LINT ! static char *_os_linux_c_ident_ = "@(#)os_linux.c 6.8 96/04/12"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" *************** *** 262,272 **** sprintf(errstr, app_data.str_noderr, path); DI_FATAL(errstr); return FALSE; } ! if ((pthru_fd = open(path, O_RDONLY | O_EXCL)) < 0) { DBGPRN(errfp, "Cannot open %s: errno=%d\n", path, errno); return FALSE; } /* Linux hack: The CD-ROM driver allows the open to succeed --- 262,272 ---- sprintf(errstr, app_data.str_noderr, path); DI_FATAL(errstr); return FALSE; } ! if ((pthru_fd = open(path, O_RDONLY | O_EXCL | O_NONBLOCK)) < 0) { DBGPRN(errfp, "Cannot open %s: errno=%d\n", path, errno); return FALSE; } /* Linux hack: The CD-ROM driver allows the open to succeed diff -c5 -r ../xmcd-2.0pl0/libdi_d/os_vms.c ./libdi_d/os_vms.c *** ../xmcd-2.0pl0/libdi_d/os_vms.c Thu Mar 21 20:09:20 1996 --- ./libdi_d/os_vms.c Thu May 9 16:48:43 1996 *************** *** 29,39 **** * application to the Digital OpenVMS operating system. * The terms Digital and OpenVMS are used here for identification * purposes only. */ #ifndef LINT ! static char *_os_vms_c_ident_ = "@(#)os_vms.c 6.9 96/01/07"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" --- 29,39 ---- * application to the Digital OpenVMS operating system. * The terms Digital and OpenVMS are used here for identification * purposes only. */ #ifndef LINT ! static char *_os_vms_c_ident_ = "@(#)os_vms.c 6.10 96/04/05"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" *************** *** 174,183 **** --- 174,185 ---- pthru_desc[10] = 0; pthru_desc[11] = 0; pthru_desc[12] = 0; pthru_desc[13] = 0; pthru_desc[14] = 0; + + DBGDUMP("SCSI CDB bytes", cdb, pthru_desc[3]); /* Send the command to the driver */ ret = sys$qiow(1, pthru_chan, IO$_DIAGNOSE, pthru_iosb, 0, 0, &pthru_desc[0], 15*4, 0, 0, 0, 0); diff -c5 -r ../xmcd-2.0pl0/libdi_d/scsipt.c ./libdi_d/scsipt.c *** ../xmcd-2.0pl0/libdi_d/scsipt.c Thu Mar 21 20:09:09 1996 --- ./libdi_d/scsipt.c Thu May 9 16:48:36 1996 *************** *** 17,27 **** * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef LINT ! static char *_scsipt_c_ident_ = "@(#)scsipt.c 6.38 96/01/07"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" --- 17,27 ---- * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef LINT ! static char *_scsipt_c_ident_ = "@(#)scsipt.c 6.40 96/04/19"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" *************** *** 2249,2259 **** STATIC bool_t scsipt_run_repeat(curstat_t *s) { msf_t start_msf, end_msf; ! int ret; if (!s->repeat) return FALSE; if (s->prog_tot > 0) { --- 2249,2259 ---- STATIC bool_t scsipt_run_repeat(curstat_t *s) { msf_t start_msf, end_msf; ! bool_t ret; if (!s->repeat) return FALSE; if (s->prog_tot > 0) { *************** *** 2551,2560 **** --- 2551,2562 ---- void scsipt_repeat(curstat_t *s, bool_t enable) { s->repeat = enable; DPY_RPTCNT(s); + if (!enable) + scsipt_new_progshuf = FALSE; } /* * scsipt_shuffle diff -c5 -r ../xmcd-2.0pl0/libdi_d/slioc.c ./libdi_d/slioc.c *** ../xmcd-2.0pl0/libdi_d/slioc.c Thu Mar 21 20:09:26 1996 --- ./libdi_d/slioc.c Thu May 9 16:48:48 1996 *************** *** 25,35 **** * Contributing author: Peter Bauer * E-mail: 100136.3530@compuserve.com */ #ifndef LINT ! static char *_slioc_c_ident_ = "@(#)slioc.c 6.33 96/01/07"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" --- 25,35 ---- * Contributing author: Peter Bauer * E-mail: 100136.3530@compuserve.com */ #ifndef LINT ! static char *_slioc_c_ident_ = "@(#)slioc.c 6.37 96/04/25"; #endif #include "common_d/appenv.h" #include "common_d/util.h" #include "libdi_d/libdi.h" *************** *** 178,190 **** struct stat stbuf; char errstr[ERR_BUF_SZ]; int i, ret; - /* Force close on eject. */ - app_data.eject_close = TRUE; - /* Check for validity of device node */ if (stat(path, &stbuf) < 0) { sprintf(errstr, app_data.str_staterr, path); DI_FATAL(errstr); return FALSE; --- 178,187 ---- *************** *** 200,210 **** sprintf(errstr, app_data.str_noderr, path); DI_FATAL(errstr); return FALSE; } ! if ((slioc_fd = open(path, O_RDONLY | O_EXCL)) < 0) { DBGPRN(errfp, "Cannot open %s: errno=%d\n", path, errno); return FALSE; } #ifdef linux --- 197,207 ---- sprintf(errstr, app_data.str_noderr, path); DI_FATAL(errstr); return FALSE; } ! if ((slioc_fd = open(path, O_RDONLY | O_EXCL | O_NONBLOCK)) < 0) { DBGPRN(errfp, "Cannot open %s: errno=%d\n", path, errno); return FALSE; } #ifdef linux *************** *** 1928,1938 **** STATIC bool_t slioc_run_repeat(curstat_t *s) { msf_t start_msf, end_msf; ! int ret; if (!s->repeat) return FALSE; if (s->prog_tot > 0) { --- 1925,1935 ---- STATIC bool_t slioc_run_repeat(curstat_t *s) { msf_t start_msf, end_msf; ! bool_t ret; if (!s->repeat) return FALSE; if (s->prog_tot > 0) { *************** *** 2128,2137 **** --- 2125,2136 ---- void slioc_repeat(curstat_t *s, bool_t enable) { s->repeat = enable; DPY_RPTCNT(s); + if (!enable) + slioc_new_progshuf = FALSE; } /* * slioc_shuffle diff -c5 -r ../xmcd-2.0pl0/misc_d/BINLIST ./misc_d/BINLIST *** ../xmcd-2.0pl0/misc_d/BINLIST Thu Mar 21 20:10:08 1996 --- ./misc_d/BINLIST Thu May 9 16:49:21 1996 *************** *** 1,7 **** # ! # @(#)BINLIST 6.17 95/11/01 # # List of files to be included in a binary distribution # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player --- 1,7 ---- # ! # @(#)BINLIST 6.18 96/04/12 # # List of files to be included in a binary distribution # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player *************** *** 27,36 **** --- 27,37 ---- libdi_d/cfgtbl/IBM libdi_d/cfgtbl/Longshin libdi_d/cfgtbl/MDI libdi_d/cfgtbl/MediaVis libdi_d/cfgtbl/Mitsumi + libdi_d/cfgtbl/Nakamich libdi_d/cfgtbl/NEC libdi_d/cfgtbl/Okano libdi_d/cfgtbl/Opticsto libdi_d/cfgtbl/Orchid libdi_d/cfgtbl/Panasoni diff -c5 -r ../xmcd-2.0pl0/misc_d/SRCLIST ./misc_d/SRCLIST *** ../xmcd-2.0pl0/misc_d/SRCLIST Thu Mar 21 20:10:08 1996 --- ./misc_d/SRCLIST Thu May 9 16:49:21 1996 *************** *** 1,7 **** # ! # @(#)SRCLIST 6.31 95/11/01 # # List of files to be included in a source distribution # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player --- 1,7 ---- # ! # @(#)SRCLIST 6.32 96/04/12 # # List of files to be included in a source distribution # # xmcd - Motif(tm) CD Audio Player # cda - Command-line CD Audio Player *************** *** 108,117 **** --- 108,118 ---- libdi_d/cfgtbl/IBM libdi_d/cfgtbl/Longshin libdi_d/cfgtbl/MDI libdi_d/cfgtbl/MediaVis libdi_d/cfgtbl/Mitsumi + libdi_d/cfgtbl/Nakamich libdi_d/cfgtbl/NEC libdi_d/cfgtbl/Okano libdi_d/cfgtbl/Opticsto libdi_d/cfgtbl/Orchid libdi_d/cfgtbl/Panasoni diff -c5 -r ../xmcd-2.0pl0/xmcd_d/XMcd.ad ./xmcd_d/XMcd.ad *** ../xmcd-2.0pl0/xmcd_d/XMcd.ad Thu Mar 21 20:09:35 1996 --- ./xmcd_d/XMcd.ad Thu May 9 16:48:55 1996 *************** *** 1,7 **** ! ! ! @(#)XMcd.ad 6.19 96/01/07 ! ! xmcd - Motif(tm) CD Audio Player ! ! Copyright (C) 1993-1996 Ti Kan ! E-mail: ti@amb.org --- 1,7 ---- ! ! ! @(#)XMcd.ad 6.20 96/04/07 ! ! xmcd - Motif(tm) CD Audio Player ! ! Copyright (C) 1993-1996 Ti Kan ! E-mail: ti@amb.org *************** *** 158,168 **** XMcd*playModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-* XMcd*discTitleIndicator.fontList: -*-helvetica-medium-r-*--10-100-* XMcd*trackTitleIndicator.fontList: -*-helvetica-medium-r-*--10-100-* XMcd*aboutPopup*fontList: -*-times-bold-i-*--24-240-*=chset1, \ -*-times-bold-i-*--12-120-*=chset2, \ ! -*-fixed-medium-r-*--10-100-*=chset3, \ fixed XMcd*discIdIndicator.fontList: -*-helvetica-medium-r-*--10-100-* XMcd*dirSelectList.fontList: -*-helvetica-medium-r-*--12-120-* XMcd*linkSelectList*fontList: -*-helvetica-medium-r-*--12-120-*=chset1, \ -*-helvetica-bold-r-*--12-120-*=chset2, \ --- 158,168 ---- XMcd*playModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-* XMcd*discTitleIndicator.fontList: -*-helvetica-medium-r-*--10-100-* XMcd*trackTitleIndicator.fontList: -*-helvetica-medium-r-*--10-100-* XMcd*aboutPopup*fontList: -*-times-bold-i-*--24-240-*=chset1, \ -*-times-bold-i-*--12-120-*=chset2, \ ! -misc-fixed-medium-r-*--10-100-*=chset3, \ fixed XMcd*discIdIndicator.fontList: -*-helvetica-medium-r-*--10-100-* XMcd*dirSelectList.fontList: -*-helvetica-medium-r-*--12-120-* XMcd*linkSelectList*fontList: -*-helvetica-medium-r-*--12-120-*=chset1, \ -*-helvetica-bold-r-*--12-120-*=chset2, \ diff -c5 -r ../xmcd-2.0pl0/xmcd_d/cdfunc.c ./xmcd_d/cdfunc.c *** ../xmcd-2.0pl0/xmcd_d/cdfunc.c Thu Mar 21 20:09:36 1996 --- ./xmcd_d/cdfunc.c Thu May 9 16:48:55 1996 *************** *** 18,28 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef LINT ! static char *_cdfunc_c_ident_ = "@(#)cdfunc.c 6.47 96/03/21"; #endif #define _XMINC_ #include "common_d/appenv.h" --- 18,28 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef LINT ! static char *_cdfunc_c_ident_ = "@(#)cdfunc.c 6.48 96/04/03"; #endif #define _XMINC_ #include "common_d/appenv.h" *************** *** 1749,1764 **** int i; char *cp; cddb_path_t *pathp; XmString xs; char titlestr[STR_BUF_SZ], ! str[FILE_PATH_SZ + 2]; DBGPRN(errfp, "XMCD v%s%s PL%d DEBUG MODE\n", VERSION, VERSION_EXT, PATCHLEVEL); /* Initialize libutil */ util_init(); if ((cp = getenv("XMCD_LIBDIR")) != NULL) { app_data.libdir = (char *) MEM_ALLOC(strlen(cp) + 1); --- 1749,1794 ---- int i; char *cp; cddb_path_t *pathp; XmString xs; char titlestr[STR_BUF_SZ], ! str[FILE_PATH_SZ + 2], ! errmsg[ERR_BUF_SZ]; ! struct stat stbuf; ! DBGPRN(errfp, "XMCD v%s%s PL%d DEBUG MODE\n", VERSION, VERSION_EXT, PATCHLEVEL); + #ifndef NOMKTMPDIR + /* Make temporary directory, if needed */ + sprintf(errmsg, app_data.str_tmpdirerr, TEMP_DIR); + if (stat(TEMP_DIR, &stbuf) < 0) { + if (errno == ENOENT) { + int omask; + + /* The permissions should be writable by all */ + omask = umask(0); + if (mkdir(TEMP_DIR, 0777) < 0) { + (void) umask((mode_t) omask); + cd_fatal_popup(app_data.str_fatal, errmsg); + return; + } + (void) umask((mode_t) omask); + } + else { + cd_fatal_popup(app_data.str_fatal, errmsg); + return; + } + } + else if (!S_ISDIR(stbuf.st_mode)) { + cd_fatal_popup(app_data.str_fatal, errmsg); + return; + } + #endif /* NOMKTMPDIR */ + /* Initialize libutil */ util_init(); if ((cp = getenv("XMCD_LIBDIR")) != NULL) { app_data.libdir = (char *) MEM_ALLOC(strlen(cp) + 1); *************** *** 1884,1896 **** * Nothing. */ void cd_start(curstat_t *s) { - struct stat stbuf; - char errmsg[ERR_BUF_SZ]; - /* Debug information */ if (app_data.debug) { fprintf(errfp, "\ndevnum=%d\n", app_data.devnum); fprintf(errfp, "device=%s\n", --- 1914,1923 ---- *************** *** 1986,2022 **** fprintf(errfp, "mainShowFocus=%d\n", app_data.main_showfocus); fprintf(errfp, "\n"); } - - #ifndef NOMKTMPDIR - /* Make temporary directory, if needed */ - sprintf(errmsg, app_data.str_tmpdirerr, TEMP_DIR); - if (stat(TEMP_DIR, &stbuf) < 0) { - if (errno == ENOENT) { - int omask; - - /* The permissions should be writable by all */ - omask = umask(0); - if (mkdir(TEMP_DIR, 0777) < 0) { - (void) umask((mode_t) omask); - cd_fatal_popup(app_data.str_fatal, errmsg); - return; - } - (void) umask((mode_t) omask); - } - else { - cd_fatal_popup(app_data.str_fatal, errmsg); - return; - } - } - else if (!S_ISDIR(stbuf.st_mode)) { - cd_fatal_popup(app_data.str_fatal, errmsg); - return; - } - #endif /* NOMKTMPDIR */ /* Allow popup dialogs from here on */ popup_ok = TRUE; /* Start up I/O interface */ --- 2013,2022 ---- diff -c5 -r ../xmcd-2.0pl0/xmcd_d/main.c ./xmcd_d/main.c *** ../xmcd-2.0pl0/xmcd_d/main.c Thu Mar 21 20:09:39 1996 --- ./xmcd_d/main.c Thu May 9 16:48:58 1996 *************** *** 18,28 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef LINT ! static char *_main_c_ident_ = "@(#)main.c 6.8 96/01/07"; #endif #define _XMINC_ #include "common_d/appenv.h" --- 18,28 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef LINT ! static char *_main_c_ident_ = "@(#)main.c 6.11 96/04/09"; #endif #define _XMINC_ #include "common_d/appenv.h" *************** *** 150,160 **** --- 150,172 ---- signal(SIGHUP, SIG_IGN); if (signal(SIGTERM, onsig) == SIG_IGN) signal(SIGTERM, SIG_IGN); /* Set SIGCHLD handler to default */ + #ifndef __VMS_VER signal(SIGCHLD, SIG_DFL); + #else + #if (__VMS_VER >= 70000000) && (__DECC_VER > 50230003) + /* OpenVMS v7.0 and DECCV5.2 have these defined */ + signal(SIGCHLD, SIG_DFL); + #endif + #endif + + #if (XtSpecificationRelease >= 5) + /* Set locale */ + XtSetLanguageProc(NULL, NULL, NULL); + #endif /* Initialize X toolkit */ widgets.toplevel = XtVaAppInitialize( &app_context, "XMcd",