home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-29 | 61.7 KB | 1,742 lines |
- Newsgroups: alt.sources
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!sandman.lerc.nasa.gov!drich
- From: drich@sandman.lerc.nasa.gov (Daniel Rich)
- Subject: xcdplayer-2.2, Part (1/5) - X11 CD player for Sun and SGI
- Message-ID: <1992Dec28.225028.20791@eagle.lerc.nasa.gov>
- Sender: news@eagle.lerc.nasa.gov
- Nntp-Posting-Host: sandman.lerc.nasa.gov
- Organization: NASA Lewis Research Center
- Date: Mon, 28 Dec 1992 22:50:28 GMT
- Lines: 1730
-
- Submitted-by: drich@lerc.nasa.gov
- Archive-name: xcdplayer-2.2/part01
-
- Enclosed below is the latest release of XCdplayer. The current
- version will now run on SGI and Sun, and has a set of color defaults.
- With the SGI version, you also gain the ability to play through either
- the CDROM drive audio jack, or through the SGI audio board (for those
- systems so equiped). This has been tested on both IRIX 4.0.2 and
- 4.0.5, and will *NOT* work on 4.0.1 (apparently, there are problems
- with the audio libraries).
-
- Things to look for in future releases:
- o Motif support (I hope!)
- o Record capibilities (on SGI only)
- o Track and Artist labeling
- o A better programming interface
- o AIX and Ultrix support (maybe....)
-
- For more information, take a look at the man page and README file. If
- you do run into problems or know of any other features you would like to
- see (or implement, for that matter :-), please let me know.
-
- Here is the description from the man page:
- Xcdplayer is a graphical user interface for controlling the Sun or SGI cdrom
- drive under the X Window System. It provides visual feedback and
- gives the user facilities for mode selection, device control, scanning, and
- programming.
-
- Xcdplayer allows previously stored cd title and program information to
- be read from a specified directory and loaded into the player on startup
- or at disc changes. This directory can be specified either on the command
- line, by using the -cdInfoDir option, by using a customized personal resource
- file, or by setting the environment variable XCDINFODIR.
-
- --
- Dan Rich | drich@lerc.nasa.gov | (216) 433-4000
- Sr. Systems Engineer | "Danger, you haven't seen the last of me!"
- RMS Technologies, Inc. | "No, but the first of you turns my stomach!"
- NASA Lewis Research Center | -- The Firesign Theatre's Nick Danger
-
- 8<------------------------------ Cut Here ------------------------------>8
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 5)."
- # Contents: xcdplayer-2.2/Imakefile xcdplayer-2.2/MANIFEST
- # xcdplayer-2.2/audio.xbm xcdplayer-2.2/cdrom_globs.h
- # xcdplayer-2.2/cdrom_sgi.h xcdplayer-2.2/cdrom_sun.h
- # xcdplayer-2.2/circle00.xbm xcdplayer-2.2/circle0a.xbm
- # xcdplayer-2.2/circle0b.xbm xcdplayer-2.2/circle0c.xbm
- # xcdplayer-2.2/circle0d.xbm xcdplayer-2.2/circle0e.xbm
- # xcdplayer-2.2/circle0f.xbm xcdplayer-2.2/circle0g.xbm
- # xcdplayer-2.2/circle0h.xbm xcdplayer-2.2/circle0x.xbm
- # xcdplayer-2.2/copyright.h xcdplayer-2.2/cycle.xbm
- # xcdplayer-2.2/debug.c xcdplayer-2.2/debug.h
- # xcdplayer-2.2/eject.xbm xcdplayer-2.2/ff.xbm xcdplayer-2.2/leds.c
- # xcdplayer-2.2/logo.xbm xcdplayer-2.2/main.c xcdplayer-2.2/next.xbm
- # xcdplayer-2.2/patchlevel.h xcdplayer-2.2/pause.xbm
- # xcdplayer-2.2/pgm.xbm xcdplayer-2.2/play.xbm
- # xcdplayer-2.2/prev.xbm xcdplayer-2.2/quit.xbm
- # xcdplayer-2.2/rewind.xbm xcdplayer-2.2/shuffle.c
- # xcdplayer-2.2/shuffle.xbm xcdplayer-2.2/stop.xbm
- # xcdplayer-2.2/thumb.xbm xcdplayer-2.2/top_setup.c
- # xcdplayer-2.2/version.h
- # Wrapped by drich@sandman on Mon Dec 28 17:30:37 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -d 'xcdplayer-2.2' ; then
- :
- else
- mkdir xcdplayer-2.2
- fi
- if test -f 'xcdplayer-2.2/Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/Imakefile'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/Imakefile'\" \(1786 characters\)
- sed "s/^X//" >'xcdplayer-2.2/Imakefile' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- XLOCAL_LIBRARIES = XawClientLibs
- XLINTLIBS = -lXaw -lXt -lX11
- X#ifdef SunArchitecture
- X SRCS = main.c top_setup.c logo_setup.c button_setup.c cdrom_callb.c\
- X cdrom_sun.c internals.c shuffle.c program.c leds.c debug.c
- X
- X OBJS = main.o top_setup.o logo_setup.o button_setup.o cdrom_callb.o\
- X cdrom_sun.o internals.o shuffle.o program.o leds.o debug.o
- X#endif
- X#ifdef SGIArchitecture
- XLOCAL_LIBRARIES = XawClientLibs -lcdaudio -lds -laudio -lm
- X SRCS = main.c top_setup.c logo_setup.c button_setup.c cdrom_callb.c\
- X cdrom_sgi.c internals.c shuffle.c program.c leds.c debug.c
- X
- X OBJS = main.o top_setup.o logo_setup.o button_setup.o cdrom_callb.o\
- X cdrom_sgi.o internals.o shuffle.o program.o leds.o debug.o
- X#endif
- X
- X PROGRAMS = xcdplayer
- X
- XAllTarget(${PROGRAMS})
- X
- XComplexProgramTarget(xcdplayer)
- XNormalProgramTarget(cdinfo, cdinfo.o,,,)
- XNormalProgramTarget(cdgrab, cdgrab.o,,,)
- XNormalLintTarget(${SRCS})
- XInstallAppDefaults(XCdplayer)
- END_OF_FILE
- if test 1786 -ne `wc -c <'xcdplayer-2.2/Imakefile'`; then
- echo shar: \"'xcdplayer-2.2/Imakefile'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/Imakefile'
- fi
- if test -f 'xcdplayer-2.2/MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/MANIFEST'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/MANIFEST'\" \(1800 characters\)
- sed "s/^X//" >'xcdplayer-2.2/MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X xcdplayer-2.2/Imakefile 1
- X xcdplayer-2.2/MANIFEST 1
- X xcdplayer-2.2/Makefile 5
- X xcdplayer-2.2/README 2
- X xcdplayer-2.2/XCdplayer.ad 2
- X xcdplayer-2.2/XCdplayer.ad.sgi 2
- X xcdplayer-2.2/XCdplayer.ad.sun 2
- X xcdplayer-2.2/audio.xbm 1
- X xcdplayer-2.2/button_setup.c 4
- X xcdplayer-2.2/cdgrab.c 2
- X xcdplayer-2.2/cdinfo.c 2
- X xcdplayer-2.2/cdrom_callb.c 4
- X xcdplayer-2.2/cdrom_globs.h 1
- X xcdplayer-2.2/cdrom_sgi.c 5
- X xcdplayer-2.2/cdrom_sgi.h 1
- X xcdplayer-2.2/cdrom_sun.c 3
- X xcdplayer-2.2/cdrom_sun.h 1
- X xcdplayer-2.2/circle00.xbm 1
- X xcdplayer-2.2/circle0a.xbm 1
- X xcdplayer-2.2/circle0b.xbm 1
- X xcdplayer-2.2/circle0c.xbm 1
- X xcdplayer-2.2/circle0d.xbm 1
- X xcdplayer-2.2/circle0e.xbm 1
- X xcdplayer-2.2/circle0f.xbm 1
- X xcdplayer-2.2/circle0g.xbm 1
- X xcdplayer-2.2/circle0h.xbm 1
- X xcdplayer-2.2/circle0x.xbm 1
- X xcdplayer-2.2/copyright.h 1
- X xcdplayer-2.2/cycle.xbm 1
- X xcdplayer-2.2/debug.c 1
- X xcdplayer-2.2/debug.h 1
- X xcdplayer-2.2/eject.xbm 1
- X xcdplayer-2.2/ff.xbm 1
- X xcdplayer-2.2/internals.c 3
- X xcdplayer-2.2/leds.c 1
- X xcdplayer-2.2/logo.xbm 1
- X xcdplayer-2.2/logo_setup.c 3
- X xcdplayer-2.2/main.c 1
- X xcdplayer-2.2/next.xbm 1
- X xcdplayer-2.2/patchlevel.h 1
- X xcdplayer-2.2/pause.xbm 1
- X xcdplayer-2.2/pgm.xbm 1
- X xcdplayer-2.2/play.xbm 1
- X xcdplayer-2.2/prev.xbm 1
- X xcdplayer-2.2/program.c 4
- X xcdplayer-2.2/quit.xbm 1
- X xcdplayer-2.2/rewind.xbm 1
- X xcdplayer-2.2/shuffle.c 1
- X xcdplayer-2.2/shuffle.xbm 1
- X xcdplayer-2.2/stop.xbm 1
- X xcdplayer-2.2/thumb.xbm 1
- X xcdplayer-2.2/top_setup.c 1
- X xcdplayer-2.2/version.h 1
- X xcdplayer-2.2/xcdplayer.1 2
- END_OF_FILE
- if test 1800 -ne `wc -c <'xcdplayer-2.2/MANIFEST'`; then
- echo shar: \"'xcdplayer-2.2/MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/MANIFEST'
- fi
- if test -f 'xcdplayer-2.2/audio.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/audio.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/audio.xbm'\" \(278 characters\)
- sed "s/^X//" >'xcdplayer-2.2/audio.xbm' <<'END_OF_FILE'
- X#define audio_width 16
- X#define audio_height 16
- Xstatic char audio_bits[] = {
- X 0x00, 0x00, 0x80, 0x19, 0xc0, 0x31, 0x67, 0x65, 0x35, 0x4d, 0x1d, 0xc9,
- X 0x05, 0x99, 0x05, 0x91, 0x05, 0x91, 0x05, 0x99, 0x1d, 0xc9, 0x35, 0x4d,
- X 0x67, 0x65, 0xc0, 0x31, 0x80, 0x19, 0x00, 0x00};
- END_OF_FILE
- if test 278 -ne `wc -c <'xcdplayer-2.2/audio.xbm'`; then
- echo shar: \"'xcdplayer-2.2/audio.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/audio.xbm'
- fi
- if test -f 'xcdplayer-2.2/cdrom_globs.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/cdrom_globs.h'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/cdrom_globs.h'\" \(3433 characters\)
- sed "s/^X//" >'xcdplayer-2.2/cdrom_globs.h' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X#include "version.h"
- X#include "patchlevel.h"
- X
- X/* shorthand */
- X# define rootwin(x) RootWindow(XtDisplay(x), XtWindow(x))
- X
- X/*
- X * number of milliseconds to sleep between
- X * checking to see what the current track
- X * is.
- X */
- X# define TIMER_PERIOD ((unsigned long) 250)
- X
- X# define BACKWARDS -1
- X# define FORWARDS 1
- X
- Xextern Widget top_setup();
- Xextern Widget main_setup();
- X
- Xextern void cb_cdrom_play();
- Xextern void cb_cdrom_pause();
- Xextern void cb_cdrom_stop();
- Xextern void cb_cdrom_previous();
- Xextern void cb_cdrom_next();
- Xextern void cb_cdrom_eject();
- X#ifdef sgi
- Xextern void cb_cdrom_audio();
- X#endif
- Xextern void cb_cdrom_cycle();
- Xextern void cb_cdrom_quit();
- Xextern void cb_cdrom_shuffle();
- Xextern void cb_cdrom_rewind();
- Xextern void cb_cdrom_ff();
- Xextern void cb_cdrom_program();
- X
- Xextern int cdrom_get_curtime();
- Xextern void cdrom_timer_on();
- Xextern void cdrom_timer_off();
- Xextern int cdrom_play();
- Xextern void cdrom_reset();
- Xextern void cdrom_rewind();
- Xextern void cdrom_ff();
- X
- Xextern void logo_setup();
- Xextern void track_button_update();
- Xextern void track_button_set();
- Xextern void track_button_reset();
- Xextern void timer_button_update();
- Xextern void timer_button_set();
- Xextern void timer_button_reset();
- X
- Xextern void button_setup();
- Xextern void top_start();
- Xextern void update_status();
- Xextern void play_button_set();
- Xextern void play_button_reset();
- Xextern void pause_button_reset();
- Xextern void eject_button_reset();
- Xextern void shuffle_button_set();
- Xextern void shuffle_button_reset();
- Xextern void pgm_button_set();
- Xextern void pgm_button_reset();
- Xextern void update_title();
- X
- X
- Xextern void leds_stop();
- Xextern void leds_update();
- X
- Xextern void shuffle_setup();
- Xextern unsigned char shuffle_next_track();
- Xextern unsigned char shuffle_prev_track();
- X
- Xextern void program_form_setup();
- Xextern void popup_program_form();
- Xextern int program_time_remaining();
- Xextern unsigned char program_resume();
- Xextern unsigned char program_goto_next_track();
- Xextern unsigned char program_goto_prev_track();
- Xextern unsigned char program_next_track();
- Xextern unsigned char program_prev_track();
- Xextern void program_add_track();
- Xextern void program_cancel();
- X
- Xextern int cdrom_open();
- Xextern int cdrom_init();
- X
- X
- Xextern Boolean display_timer;
- X
- Xextern XtAppContext appc;
- X
- Xextern char *file;
- Xextern char *device;
- Xextern char info_filename[];
- Xextern char *disc_title;
- Xextern unsigned int timer_fsecs;
- X
- X
- Xextern float volbase;
- Xextern float volpcent;
- Xextern int replayThreshold;
- Xextern float scanPauseInterval;
- Xextern int scanSkipInterval;
- Xextern float pausePauseInterval;
- Xextern int pauseSkipInterval;
- END_OF_FILE
- if test 3433 -ne `wc -c <'xcdplayer-2.2/cdrom_globs.h'`; then
- echo shar: \"'xcdplayer-2.2/cdrom_globs.h'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/cdrom_globs.h'
- fi
- if test -f 'xcdplayer-2.2/cdrom_sgi.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/cdrom_sgi.h'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/cdrom_sgi.h'\" \(3953 characters\)
- sed "s/^X//" >'xcdplayer-2.2/cdrom_sgi.h' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <X11/Intrinsic.h>
- X# include <cdaudio.h>
- X# include <audio.h>
- X
- X# define NOTITLESTR "No Title"
- X# define NODISCSTR "No Disc"
- X
- X# define VAL2PCT(a) (double)(1.0 - 1.0 * (exp((-7.0/255.0) * a)))
- X# define PCT2VAL(a) (int)((-255.0/7.0) * log(1.0 * (1.0 - a)))
- X
- X# define bit(n) (1 << (n))
- X
- X/* bits for cdrom_state */
- X# define CDROM_STATE_PLAY bit(0)
- X# define CDROM_STATE_PAUSE bit(1)
- X# define CDROM_STATE_STOP bit(2)
- X# define CDROM_STATE_EJECTED bit(3)
- X# define CDROM_STATE_CYCLE bit(4)
- X# define CDROM_STATE_SHUFFLE bit(5)
- X# define CDROM_STATE_PROGRAM bit(6)
- X
- X/* return codes from cdrom_status() */
- X# define CDROM_INVALID CD_STILL
- X# define CDROM_PLAYING CD_PLAYING
- X# define CDROM_PAUSED CD_PAUSED
- X# define CDROM_COMPLETED CD_READY
- X# define CDROM_ERROR CD_ERROR
- X# define CDROM_NO_STATUS CD_NODISC
- X# define CD_ABORT 0xfe
- X
- X#define CDROM_LEADOUT 0xAA
- X#define CDROM_MSF 0x02
- X#define STILL_MOUNTED 1
- X#define UNMOUNTED 0
- X#define SAMPLES_PER_FRAME (CDDA_DATASIZE/2)
- X
- Xstruct cdrom_tocentry {
- X unsigned char cdte_track;
- X unsigned char cdte_adr :4;
- X unsigned char cdte_ctrl :4;
- X unsigned char cdte_format;
- X union {
- X struct {
- X int minute;
- X int second;
- X int frame;
- X } msf;
- X int lba;
- X } cdte_addr;
- X unsigned char cdte_datamode;
- X};
- X
- Xstruct msf {
- X int minute;
- X int second;
- X int frame;
- X};
- X
- Xstruct prognode {
- X unsigned char track;
- X Widget button;
- X struct prognode *next;
- X struct prognode *prev;
- X};
- X
- Xtypedef struct _cdrom_info {
- X unsigned char curtrack; /* current track playing */
- X unsigned char mintrack; /* first audio track */
- X unsigned char maxtrack; /* last audio track */
- X unsigned char ntracks; /* size of random track list */
- X int duration; /* seconds played so far */
- X int state; /* state of cd-rom drive */
- X short currand; /* index into random track list */
- X short lastprog; /* number of selections in prog.*/
- X unsigned short *times; /* duration of each track */
- X struct msf *addrs; /* starting minute/second/frames*/
- X struct prognode *selection; /* currently selected prog. trk */
- X struct prognode *program; /* list of programmed tracks */
- X int scsi_audio; /* true if scsi audio is avail. */
- X} cdrom_info;
- X
- X/* The below is a repeat of the above for SGIs using scsi_audio (the */
- X/* CD* calls don't return the info anymore). */
- Xtypedef struct _cdrom_audio_info {
- X unsigned char curtrack;
- X int duration;
- X int state;
- X int start_track; /* Start track for play */
- X int end_track; /* End track for play */
- X int child_pid; /* PID of child process */
- X} cdrom_audio_info;
- X
- Xstruct _cdrom_shmem {
- X cdrom_audio_info cdrom_audio_cdi;
- X struct msf cdrom_audio_msf;
- X};
- X
- Xextern int cdrom_open();
- Xextern void cdrom_close();
- Xextern int cdrom_start();
- Xextern int cdrom_stop();
- Xextern int cdrom_eject();
- Xextern int cdrom_pause();
- Xextern int cdrom_resume();
- Xextern int cdrom_volume();
- Xextern int cdrom_get_times();
- Xextern int cdrom_get_curtrack();
- Xextern int cdrom_get_msf();
- Xextern int cdrom_get_curmsf();
- Xextern int cdrom_play_track();
- Xextern int cdrom_play_msf();
- Xextern int cdrom_read_tocentry();
- Xextern int cdrom_read_tochdr();
- Xextern int cdrom_status();
- X
- Xextern cdrom_info cdi;
- Xextern char *disc_title;
- Xextern char program_str[];
- Xextern char *cdInfoDir;
- X
- END_OF_FILE
- if test 3953 -ne `wc -c <'xcdplayer-2.2/cdrom_sgi.h'`; then
- echo shar: \"'xcdplayer-2.2/cdrom_sgi.h'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/cdrom_sgi.h'
- fi
- if test -f 'xcdplayer-2.2/cdrom_sun.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/cdrom_sun.h'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/cdrom_sun.h'\" \(2872 characters\)
- sed "s/^X//" >'xcdplayer-2.2/cdrom_sun.h' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <X11/Intrinsic.h>
- X
- X# define NOTITLESTR "No Title"
- X# define NODISCSTR "No Disc"
- X
- X# define bit(n) (1 << (n))
- X
- X/* bits for cdrom_state */
- X# define CDROM_STATE_PLAY bit(0)
- X# define CDROM_STATE_PAUSE bit(1)
- X# define CDROM_STATE_STOP bit(2)
- X# define CDROM_STATE_EJECTED bit(3)
- X# define CDROM_STATE_CYCLE bit(4)
- X# define CDROM_STATE_SHUFFLE bit(5)
- X# define CDROM_STATE_PROGRAM bit(6)
- X
- X/* return codes from cdrom_status() */
- X# define CDROM_INVALID 1
- X# define CDROM_PLAYING 2
- X# define CDROM_PAUSED 3
- X# define CDROM_COMPLETED 4
- X# define CDROM_ERROR 5
- X# define CDROM_NO_STATUS 6
- X
- X#define STILL_MOUNTED 1
- X#define UNMOUNTED 0
- X
- Xstruct msf {
- X unsigned char minute;
- X unsigned char second;
- X unsigned char frame;
- X};
- X
- Xstruct prognode {
- X unsigned char track;
- X Widget button;
- X struct prognode *next;
- X struct prognode *prev;
- X};
- X
- Xtypedef struct _cdrom_info {
- X unsigned char curtrack; /* current track playing */
- X unsigned char mintrack; /* first audio track */
- X unsigned char maxtrack; /* last audio track */
- X unsigned char ntracks; /* size of random track list */
- X int duration; /* seconds played so far */
- X int state; /* state of cd-rom drive */
- X short currand; /* index into random track list */
- X short lastprog; /* number of selections in prog.*/
- X unsigned short *times; /* duration of each track */
- X struct msf *addrs; /* starting minute/second/frames*/
- X struct prognode *selection; /* currently selected prog. trk */
- X struct prognode *program; /* list of programmed tracks */
- X} cdrom_info;
- X
- Xextern int cdrom_open();
- Xextern void cdrom_close();
- Xextern int cdrom_start();
- Xextern int cdrom_stop();
- Xextern int cdrom_eject();
- Xextern int cdrom_pause();
- Xextern int cdrom_resume();
- Xextern int cdrom_volume();
- Xextern int cdrom_get_times();
- Xextern int cdrom_get_curtrack();
- Xextern int cdrom_get_msf();
- Xextern int cdrom_get_curmsf();
- Xextern int cdrom_play_track();
- Xextern int cdrom_play_msf();
- Xextern int cdrom_read_tocentry();
- Xextern int cdrom_read_tochdr();
- Xextern int cdrom_status();
- X
- Xextern cdrom_info cdi;
- Xextern char *disc_title;
- Xextern char program_str[];
- Xextern char *cdInfoDir;
- X
- END_OF_FILE
- if test 2872 -ne `wc -c <'xcdplayer-2.2/cdrom_sun.h'`; then
- echo shar: \"'xcdplayer-2.2/cdrom_sun.h'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/cdrom_sun.h'
- fi
- if test -f 'xcdplayer-2.2/circle00.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle00.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle00.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle00.xbm' <<'END_OF_FILE'
- X#define circle00_width 21
- X#define circle00_height 21
- Xstatic char circle00_bits[] = {
- X 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0xe0, 0xff, 0x00, 0xf0, 0xe0, 0x01,
- X 0x38, 0x84, 0x03, 0x1c, 0x1b, 0x07, 0x4c, 0x44, 0x06, 0x0e, 0x04, 0x0e,
- X 0x26, 0x95, 0x0c, 0x26, 0x8a, 0x0c, 0xd6, 0x71, 0x0d, 0x26, 0x8a, 0x0c,
- X 0x26, 0x95, 0x0c, 0x0e, 0x04, 0x0e, 0x4c, 0x44, 0x06, 0x1c, 0x1b, 0x07,
- X 0x38, 0x84, 0x03, 0xf0, 0xe0, 0x01, 0xe0, 0xff, 0x00, 0x80, 0x3f, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle00.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle00.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle00.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0a.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0a.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0a.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0a.xbm' <<'END_OF_FILE'
- X#define circle0a_width 21
- X#define circle0a_height 21
- Xstatic char circle0a_bits[] = {
- X 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x80, 0xff, 0x00, 0x00, 0xe0, 0x01,
- X 0x00, 0x80, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e,
- X 0x00, 0x00, 0x0c, 0x00, 0x04, 0x0c, 0x00, 0x0e, 0x0c, 0x00, 0x04, 0x0c,
- X 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0a.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0a.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0a.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0b.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0b.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0b.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0b.xbm' <<'END_OF_FILE'
- X#define circle0b_width 21
- X#define circle0b_height 21
- Xstatic char circle0b_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0xe0, 0x00, 0x00, 0xe0, 0x01,
- X 0x00, 0x80, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0e,
- X 0x00, 0x00, 0x0c, 0x00, 0x04, 0x0c, 0x00, 0x0a, 0x0c, 0x00, 0x04, 0x0c,
- X 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x06, 0x00, 0x00, 0x07,
- X 0x00, 0x80, 0x03, 0x00, 0xe0, 0x01, 0x00, 0xe0, 0x00, 0x00, 0x20, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0b.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0b.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0b.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0c.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0c.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0c.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0c.xbm' <<'END_OF_FILE'
- X#define circle0c_width 21
- X#define circle0c_height 21
- Xstatic char circle0c_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
- X 0x00, 0x00, 0x0c, 0x00, 0x04, 0x0c, 0x00, 0x0e, 0x0c, 0x00, 0x04, 0x0c,
- X 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x06, 0x00, 0x00, 0x07,
- X 0x00, 0x80, 0x03, 0x00, 0xe0, 0x01, 0x80, 0xff, 0x00, 0x80, 0x3f, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0c.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0c.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0c.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0d.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0d.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0d.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0d.xbm' <<'END_OF_FILE'
- X#define circle0d_width 21
- X#define circle0d_height 21
- Xstatic char circle0d_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x04, 0x00,
- X 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0e, 0x0c, 0x00, 0x06, 0x1c, 0x00, 0x07,
- X 0x38, 0x80, 0x03, 0xf0, 0xe0, 0x01, 0xe0, 0xff, 0x00, 0x80, 0x3f, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0d.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0d.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0d.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0e.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0e.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0e.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0e.xbm' <<'END_OF_FILE'
- X#define circle0e_width 21
- X#define circle0e_height 21
- Xstatic char circle0e_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
- X 0x06, 0x00, 0x00, 0x06, 0x04, 0x00, 0x06, 0x0e, 0x00, 0x06, 0x04, 0x00,
- X 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1c, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x80, 0x3f, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0e.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0e.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0e.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0f.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0f.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0f.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0f.xbm' <<'END_OF_FILE'
- X#define circle0f_width 21
- X#define circle0f_height 21
- Xstatic char circle0f_bits[] = {
- X 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 0xf0, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00,
- X 0x06, 0x00, 0x00, 0x06, 0x04, 0x00, 0x06, 0x0a, 0x00, 0x06, 0x04, 0x00,
- X 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1c, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0f.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0f.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0f.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0g.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0g.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0g.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0g.xbm' <<'END_OF_FILE'
- X#define circle0g_width 21
- X#define circle0g_height 21
- Xstatic char circle0g_bits[] = {
- X 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0xe0, 0x3f, 0x00, 0xf0, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00,
- X 0x06, 0x00, 0x00, 0x06, 0x04, 0x00, 0x06, 0x0e, 0x00, 0x06, 0x04, 0x00,
- X 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0g.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0g.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0g.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0h.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0h.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0h.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0h.xbm' <<'END_OF_FILE'
- X#define circle0h_width 21
- X#define circle0h_height 21
- Xstatic char circle0h_bits[] = {
- X 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0xe0, 0xff, 0x00, 0xf0, 0xe0, 0x01,
- X 0x38, 0x80, 0x03, 0x1c, 0x00, 0x07, 0x0c, 0x00, 0x06, 0x0e, 0x00, 0x0e,
- X 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x04, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0h.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0h.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0h.xbm'
- fi
- if test -f 'xcdplayer-2.2/circle0x.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/circle0x.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/circle0x.xbm'\" \(482 characters\)
- sed "s/^X//" >'xcdplayer-2.2/circle0x.xbm' <<'END_OF_FILE'
- X#define circle0x_width 21
- X#define circle0x_height 21
- Xstatic char circle0x_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 482 -ne `wc -c <'xcdplayer-2.2/circle0x.xbm'`; then
- echo shar: \"'xcdplayer-2.2/circle0x.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/circle0x.xbm'
- fi
- if test -f 'xcdplayer-2.2/copyright.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/copyright.h'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/copyright.h'\" \(825 characters\)
- sed "s/^X//" >'xcdplayer-2.2/copyright.h' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X/*
- X * Additional material Copyright (C) 1992 Dan Rich and Will Sadkin
- X */
- END_OF_FILE
- if test 825 -ne `wc -c <'xcdplayer-2.2/copyright.h'`; then
- echo shar: \"'xcdplayer-2.2/copyright.h'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/copyright.h'
- fi
- if test -f 'xcdplayer-2.2/cycle.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/cycle.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/cycle.xbm'\" \(278 characters\)
- sed "s/^X//" >'xcdplayer-2.2/cycle.xbm' <<'END_OF_FILE'
- X#define cycle_width 16
- X#define cycle_height 16
- Xstatic char cycle_bits[] = {
- X 0x00, 0x00, 0xc0, 0x07, 0xf0, 0x5f, 0x38, 0x7c, 0x0c, 0x78, 0x04, 0x70,
- X 0x00, 0x78, 0x00, 0x7c, 0x00, 0x00, 0x7e, 0x00, 0x3e, 0x40, 0x1e, 0x60,
- X 0x3e, 0x38, 0xfa, 0x1f, 0xe0, 0x07, 0x00, 0x00};
- END_OF_FILE
- if test 278 -ne `wc -c <'xcdplayer-2.2/cycle.xbm'`; then
- echo shar: \"'xcdplayer-2.2/cycle.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/cycle.xbm'
- fi
- if test -f 'xcdplayer-2.2/debug.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/debug.c'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/debug.c'\" \(1152 characters\)
- sed "s/^X//" >'xcdplayer-2.2/debug.c' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <X11/Intrinsic.h>
- X
- X# include <varargs.h>
- X# include <stdio.h>
- X
- X# include "debug.h"
- X
- X/* VARARGS */
- Xvoid
- Xdebug_printf(va_alist)
- X va_dcl
- X{
- X va_list args;
- X char *fmt;
- X
- X va_start(args);
- X
- X /*
- X * first arg is whether or not to print.
- X */
- X if ((va_arg(args, int) == 0) || (debug == False))
- X return;
- X
- X fmt = va_arg(args, char *);
- X vfprintf(stdout, fmt, args);
- X
- X fflush(stdout);
- X
- X va_end(args);
- X}
- END_OF_FILE
- if test 1152 -ne `wc -c <'xcdplayer-2.2/debug.c'`; then
- echo shar: \"'xcdplayer-2.2/debug.c'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/debug.c'
- fi
- if test -f 'xcdplayer-2.2/debug.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/debug.h'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/debug.h'\" \(798 characters\)
- sed "s/^X//" >'xcdplayer-2.2/debug.h' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- Xextern void debug_print();
- X
- Xextern char debug;
- END_OF_FILE
- if test 798 -ne `wc -c <'xcdplayer-2.2/debug.h'`; then
- echo shar: \"'xcdplayer-2.2/debug.h'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/debug.h'
- fi
- if test -f 'xcdplayer-2.2/eject.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/eject.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/eject.xbm'\" \(278 characters\)
- sed "s/^X//" >'xcdplayer-2.2/eject.xbm' <<'END_OF_FILE'
- X#define eject_width 16
- X#define eject_height 16
- Xstatic char eject_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x06, 0x60, 0x0c,
- X 0x30, 0x18, 0x18, 0x30, 0xf8, 0x3f, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00,
- X 0xf8, 0x3f, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 278 -ne `wc -c <'xcdplayer-2.2/eject.xbm'`; then
- echo shar: \"'xcdplayer-2.2/eject.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/eject.xbm'
- fi
- if test -f 'xcdplayer-2.2/ff.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/ff.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/ff.xbm'\" \(269 characters\)
- sed "s/^X//" >'xcdplayer-2.2/ff.xbm' <<'END_OF_FILE'
- X#define ff_width 16
- X#define ff_height 16
- Xstatic char ff_bits[] = {
- X 0x00, 0x00, 0xc6, 0x00, 0x8c, 0x01, 0x18, 0x03, 0x30, 0x06, 0x60, 0x0c,
- X 0xc0, 0x18, 0x80, 0x31, 0xc0, 0x18, 0x60, 0x0c, 0x30, 0x06, 0x18, 0x03,
- X 0x8c, 0x01, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 269 -ne `wc -c <'xcdplayer-2.2/ff.xbm'`; then
- echo shar: \"'xcdplayer-2.2/ff.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/ff.xbm'
- fi
- if test -f 'xcdplayer-2.2/leds.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/leds.c'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/leds.c'\" \(3496 characters\)
- sed "s/^X//" >'xcdplayer-2.2/leds.c' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <X11/Intrinsic.h>
- X# include <X11/StringDefs.h>
- X# include <X11/Xaw/Label.h>
- X
- X# include "cdrom_globs.h"
- X
- X# include "circle0a.xbm"
- X# include "circle0b.xbm"
- X# include "circle0c.xbm"
- X# include "circle0d.xbm"
- X# include "circle0e.xbm"
- X# include "circle0f.xbm"
- X# include "circle0g.xbm"
- X# include "circle0h.xbm"
- X# include "circle00.xbm"
- X
- Xstatic Widget leds_label_widget;
- X
- X# define NUM_LEDS 8
- X
- Xstatic Pixmap leds_pixmaps[NUM_LEDS];
- Xstatic Pixmap leds_pixmap;
- X
- Xvoid
- Xleds_update(Direction)
- Xint Direction;
- X{
- X static int ctr = 1;
- X Arg args[1];
- X Pixmap leds;
- X
- X
- X if (Direction == BACKWARDS)
- X leds = leds_pixmaps[(ctr += NUM_LEDS - 1) % NUM_LEDS];
- X else
- X leds = leds_pixmaps[ctr++ % NUM_LEDS];
- X
- X XtSetArg(args[0], XtNbitmap, (XtArgVal) leds);
- X XtSetValues(leds_label_widget, args, 1);
- X}
- X
- Xvoid
- Xleds_stop() {
- X Arg args[1];
- X
- X XtSetArg(args[0], XtNbitmap, (XtArgVal) leds_pixmap);
- X XtSetValues(leds_label_widget, args, 1);
- X}
- X
- Xvoid
- Xleds_label_setup(parent_widget)
- X Widget parent_widget;
- X{
- X Arg args[1];
- X
- X leds_label_widget = XtCreateManagedWidget("ledsLabel",
- X labelWidgetClass,
- X parent_widget,
- X (ArgList) NULL, 0);
- X
- X leds_pixmaps[0] = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle0a_bits,
- X circle0a_width, circle0a_height);
- X leds_pixmaps[1] = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle0b_bits,
- X circle0b_width, circle0b_height);
- X leds_pixmaps[2] = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle0c_bits,
- X circle0c_width, circle0c_height);
- X leds_pixmaps[3] = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle0d_bits,
- X circle0d_width, circle0d_height);
- X leds_pixmaps[4] = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle0e_bits,
- X circle0e_width, circle0e_height);
- X leds_pixmaps[5] = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle0f_bits,
- X circle0f_width, circle0f_height);
- X leds_pixmaps[6] = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle0g_bits,
- X circle0g_width, circle0g_height);
- X leds_pixmaps[7] = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle0h_bits,
- X circle0h_width, circle0h_height);
- X
- X leds_pixmap = XCreateBitmapFromData(XtDisplay(leds_label_widget),
- X rootwin(leds_label_widget),
- X circle00_bits,
- X circle00_width, circle00_height);
- X
- X XtSetArg(args[0], XtNbitmap, (XtArgVal) leds_pixmap);
- X XtSetValues(leds_label_widget, args, 1);
- X}
- END_OF_FILE
- if test 3496 -ne `wc -c <'xcdplayer-2.2/leds.c'`; then
- echo shar: \"'xcdplayer-2.2/leds.c'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/leds.c'
- fi
- if test -f 'xcdplayer-2.2/logo.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/logo.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/logo.xbm'\" \(1739 characters\)
- sed "s/^X//" >'xcdplayer-2.2/logo.xbm' <<'END_OF_FILE'
- X#define logo_width 56
- X#define logo_height 38
- Xstatic char logo_bits[] = {
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0x9f, 0xb3, 0x8b, 0x73, 0xc6, 0xff, 0x0f, 0x6c,
- X 0x2d, 0x69, 0xad, 0xed, 0xff, 0xef, 0xed, 0xad, 0x0a, 0xa1, 0xef, 0xff,
- X 0xef, 0x6d, 0xad, 0xeb, 0xad, 0xed, 0xff, 0xef, 0x9d, 0xb3, 0xeb, 0x6d,
- X 0xee, 0xff, 0xef, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xfd, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0xef, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0,
- X 0x0d, 0x3c, 0x00, 0x0f, 0xf0, 0xdf, 0xff, 0xed, 0xdd, 0x7f, 0xf7, 0xef,
- X 0xef, 0xff, 0xed, 0xed, 0x7f, 0xfb, 0xdf, 0xef, 0xf3, 0xed, 0xed, 0x7f,
- X 0x7b, 0xde, 0xef, 0xed, 0xed, 0xed, 0x00, 0xbb, 0xdd, 0xef, 0xed, 0xed,
- X 0x6d, 0xff, 0xbb, 0xdd, 0xef, 0xed, 0xed, 0xed, 0xc0, 0xbb, 0xc1, 0xef,
- X 0xed, 0xed, 0xed, 0xbf, 0xbb, 0xff, 0xef, 0xed, 0xed, 0xed, 0x7f, 0xbb,
- X 0xff, 0xef, 0xed, 0xed, 0xdd, 0x7f, 0xbb, 0xc1, 0xef, 0xed, 0xed, 0x3d,
- X 0x70, 0xbb, 0xdd, 0xef, 0xed, 0xed, 0xfd, 0x6f, 0xbb, 0xdd, 0xef, 0xed,
- X 0xed, 0x0d, 0x70, 0xbb, 0xdd, 0xef, 0xf3, 0xed, 0xed, 0x7f, 0x7b, 0xde,
- X 0xef, 0xff, 0xed, 0xed, 0x7f, 0xfb, 0xdf, 0xdf, 0xff, 0xed, 0xed, 0xbf,
- X 0xf7, 0xef, 0x3f, 0x00, 0x0c, 0x0c, 0xc0, 0x0f, 0xf0, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0x8d, 0x62, 0xf6, 0xb3, 0xc5,
- X 0xe6, 0x6f, 0xf5, 0xb6, 0xf5, 0xad, 0xb5, 0xda, 0x6f, 0x95, 0x36, 0xf4,
- X 0xa1, 0xb5, 0xda, 0x6f, 0xb5, 0xb6, 0xf5, 0xad, 0xb5, 0xda, 0x8f, 0x8d,
- X 0xb6, 0x85, 0x6d, 0xc6, 0xe6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- X 0xff, 0xff};
- END_OF_FILE
- if test 1739 -ne `wc -c <'xcdplayer-2.2/logo.xbm'`; then
- echo shar: \"'xcdplayer-2.2/logo.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/logo.xbm'
- fi
- if test -f 'xcdplayer-2.2/main.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/main.c'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/main.c'\" \(1660 characters\)
- sed "s/^X//" >'xcdplayer-2.2/main.c' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <stdio.h>
- X
- X# include <X11/Intrinsic.h>
- X# include <X11/StringDefs.h>
- X
- X# include "debug.h"
- X# include "cdrom_globs.h"
- X
- XWidget top_form;
- X
- Xvoid
- Xmain(argc, argv)
- X int argc;
- X char **argv;
- X{
- X static void chk_debug();
- X
- X chk_debug(argc, argv);
- X
- X /* gets resources, & creates main form */
- X top_form = top_setup(argc, argv);
- X
- X#if 0
- X if (cdrom_open() == -1) /* (uses a resource, so done after top_setup) */
- X exit(1); /* perhaps a bit drastic */
- X#endif
- X cdrom_open();
- X
- X logo_setup(top_form);
- X
- X button_setup(top_form);
- X
- X program_form_setup(top_form);
- X
- X top_start();
- X
- X update_status(NULL, NULL);
- X
- X XtAppMainLoop(appc);
- X
- X exit(0);
- X}
- X
- Xstatic void
- Xchk_debug(argc, argv)
- X int argc;
- X char **argv;
- X{
- X int i;
- X
- X /* ugly hack */
- X for (i = 1; i < argc; i++) {
- X if (strcmp(argv[i], "-debug") == 0) {
- X debug = True;
- X break;
- X }
- X }
- X}
- X
- Xvoid
- Xusage() {
- X (void) fprintf(stderr, "usage: xcdplayer [-debug]\n");
- X
- X exit(1);
- X}
- END_OF_FILE
- if test 1660 -ne `wc -c <'xcdplayer-2.2/main.c'`; then
- echo shar: \"'xcdplayer-2.2/main.c'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/main.c'
- fi
- if test -f 'xcdplayer-2.2/next.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/next.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/next.xbm'\" \(275 characters\)
- sed "s/^X//" >'xcdplayer-2.2/next.xbm' <<'END_OF_FILE'
- X#define next_width 16
- X#define next_height 16
- Xstatic char next_bits[] = {
- X 0x00, 0x60, 0xc6, 0x60, 0x8c, 0x61, 0x18, 0x63, 0x30, 0x66, 0x60, 0x6c,
- X 0xc0, 0x78, 0x80, 0x71, 0xc0, 0x78, 0x60, 0x6c, 0x30, 0x66, 0x18, 0x63,
- X 0x8c, 0x61, 0xc6, 0x60, 0x00, 0x60, 0x00, 0x00};
- END_OF_FILE
- if test 275 -ne `wc -c <'xcdplayer-2.2/next.xbm'`; then
- echo shar: \"'xcdplayer-2.2/next.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/next.xbm'
- fi
- if test -f 'xcdplayer-2.2/patchlevel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/patchlevel.h'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/patchlevel.h'\" \(21 characters\)
- sed "s/^X//" >'xcdplayer-2.2/patchlevel.h' <<'END_OF_FILE'
- X#define PATCHLEVEL 0
- END_OF_FILE
- if test 21 -ne `wc -c <'xcdplayer-2.2/patchlevel.h'`; then
- echo shar: \"'xcdplayer-2.2/patchlevel.h'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/patchlevel.h'
- fi
- if test -f 'xcdplayer-2.2/pause.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/pause.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/pause.xbm'\" \(278 characters\)
- sed "s/^X//" >'xcdplayer-2.2/pause.xbm' <<'END_OF_FILE'
- X#define pause_width 16
- X#define pause_height 16
- Xstatic char pause_bits[] = {
- X 0x00, 0x00, 0x30, 0x06, 0x30, 0x06, 0x30, 0x06, 0x30, 0x06, 0x30, 0x06,
- X 0x30, 0x06, 0x30, 0x06, 0x30, 0x06, 0x30, 0x06, 0x30, 0x06, 0x30, 0x06,
- X 0x30, 0x06, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 278 -ne `wc -c <'xcdplayer-2.2/pause.xbm'`; then
- echo shar: \"'xcdplayer-2.2/pause.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/pause.xbm'
- fi
- if test -f 'xcdplayer-2.2/pgm.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/pgm.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/pgm.xbm'\" \(272 characters\)
- sed "s/^X//" >'xcdplayer-2.2/pgm.xbm' <<'END_OF_FILE'
- X#define pgm_width 16
- X#define pgm_height 16
- Xstatic char pgm_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xd9,
- X 0x6b, 0xfb, 0x29, 0xa8, 0xaf, 0x8b, 0x61, 0x8b, 0xc1, 0x89, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 272 -ne `wc -c <'xcdplayer-2.2/pgm.xbm'`; then
- echo shar: \"'xcdplayer-2.2/pgm.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/pgm.xbm'
- fi
- if test -f 'xcdplayer-2.2/play.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/play.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/play.xbm'\" \(319 characters\)
- sed "s/^X//" >'xcdplayer-2.2/play.xbm' <<'END_OF_FILE'
- X#define play_width 16
- X#define play_height 16
- X#define play_x_hot -1
- X#define play_y_hot -1
- Xstatic char play_bits[] = {
- X 0x00, 0x00, 0xe0, 0x00, 0xe0, 0x01, 0xe0, 0x03, 0x60, 0x07, 0x60, 0x0e,
- X 0x60, 0x1c, 0x60, 0x38, 0x60, 0x1c, 0x60, 0x0e, 0x60, 0x07, 0xe0, 0x03,
- X 0xe0, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 319 -ne `wc -c <'xcdplayer-2.2/play.xbm'`; then
- echo shar: \"'xcdplayer-2.2/play.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/play.xbm'
- fi
- if test -f 'xcdplayer-2.2/prev.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/prev.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/prev.xbm'\" \(275 characters\)
- sed "s/^X//" >'xcdplayer-2.2/prev.xbm' <<'END_OF_FILE'
- X#define prev_width 16
- X#define prev_height 16
- Xstatic char prev_bits[] = {
- X 0x06, 0x00, 0x06, 0x63, 0x86, 0x31, 0xc6, 0x18, 0x66, 0x0c, 0x36, 0x06,
- X 0x1e, 0x03, 0x8e, 0x01, 0x1e, 0x03, 0x36, 0x06, 0x66, 0x0c, 0xc6, 0x18,
- X 0x86, 0x31, 0x06, 0x63, 0x06, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 275 -ne `wc -c <'xcdplayer-2.2/prev.xbm'`; then
- echo shar: \"'xcdplayer-2.2/prev.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/prev.xbm'
- fi
- if test -f 'xcdplayer-2.2/quit.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/quit.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/quit.xbm'\" \(240 characters\)
- sed "s/^X//" >'xcdplayer-2.2/quit.xbm' <<'END_OF_FILE'
- X#define quit_width 16
- X#define quit_height 16
- Xstatic char quit_bits[] = {
- X 0x80,0x1f,0x80,0x1f,0xc0,0x0f,0xc0,0x07,0xe0,0x03,0xe0,0x01,0xf0,0x0f,0xf0,
- X 0x07,0xc0,0x03,0xe0,0x01,0xf0,0x00,0x70,0x00,0x38,0x00,0x18,0x00,0x0c,0x00,
- X 0x04,0x00};
- END_OF_FILE
- if test 240 -ne `wc -c <'xcdplayer-2.2/quit.xbm'`; then
- echo shar: \"'xcdplayer-2.2/quit.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/quit.xbm'
- fi
- if test -f 'xcdplayer-2.2/rewind.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/rewind.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/rewind.xbm'\" \(281 characters\)
- sed "s/^X//" >'xcdplayer-2.2/rewind.xbm' <<'END_OF_FILE'
- X#define rewind_width 16
- X#define rewind_height 16
- Xstatic char rewind_bits[] = {
- X 0x00, 0x00, 0x00, 0x63, 0x80, 0x31, 0xc0, 0x18, 0x60, 0x0c, 0x30, 0x06,
- X 0x18, 0x03, 0x8c, 0x01, 0x18, 0x03, 0x30, 0x06, 0x60, 0x0c, 0xc0, 0x18,
- X 0x80, 0x31, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 281 -ne `wc -c <'xcdplayer-2.2/rewind.xbm'`; then
- echo shar: \"'xcdplayer-2.2/rewind.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/rewind.xbm'
- fi
- if test -f 'xcdplayer-2.2/shuffle.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/shuffle.c'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/shuffle.c'\" \(2670 characters\)
- sed "s/^X//" >'xcdplayer-2.2/shuffle.c' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <X11/Intrinsic.h>
- X# include <stdio.h>
- X
- X# include "debug.h"
- X# include "cdrom_globs.h"
- X#ifdef sun
- X# include "cdrom_sun.h"
- X#endif
- X#ifdef sgi
- X# include "cdrom_sgi.h"
- X#endif
- X
- X# define ran(min, max) ((random() % ((max) - (min))) + (min))
- X
- Xstatic unsigned char *random_tracks;
- X
- Xvoid
- Xshuffle_setup() {
- X extern char *malloc();
- X#ifdef sgi
- X extern time_t time(time_t *);
- X#else
- X extern long time();
- X#endif
- X extern long random();
- X unsigned long seed, now;
- X char state[128];
- X int try;
- X int i, j;
- X
- X#if 0
- X if (cdi.state & CDROM_STATE_EJECTED) {
- X return;
- X }
- X#endif
- X
- X if (cdi.maxtrack == cdi.mintrack) {
- X cdi.currand = -1;
- X return;
- X }
- X
- X cdi.ntracks = (cdi.maxtrack - cdi.mintrack) + 1;
- X
- X cdi.currand = 0;
- X
- X if (random_tracks != NULL) {
- X free(random_tracks);
- X random_tracks = NULL;
- X }
- X
- X if ((random_tracks = (unsigned char *) malloc(cdi.ntracks)) == NULL) {
- X perror("malloc");
- X exit(1);
- X }
- X
- X now = time((long *) 0);
- X seed = now & 0xfff;
- X
- X initstate(seed, state, sizeof(state));
- X
- X /*
- X * set up the random_tracks array
- X */
- X for (i = 0; i < cdi.ntracks; i++) {
- X for (;;) {
- X try = ran(cdi.mintrack, cdi.maxtrack+1);
- X
- X if (i == 0)
- X break;
- X
- X for (j = 0; j < i; j++) {
- X if (random_tracks[j] == try)
- X goto again;
- X }
- X
- X /* not a repeat */
- X break;
- X
- X again:;
- X }
- X
- X random_tracks[i] = try;
- X }
- X
- X if (debug == True) {
- X debug_printf(1, "shuffle_setup: ");
- X for (i = 0; i < cdi.ntracks; i++)
- X debug_printf(1, "%d ", random_tracks[i]);
- X debug_printf(1, "\n");
- X }
- X}
- X
- Xunsigned char
- Xshuffle_next_track() {
- X if (cdi.currand == -1)
- X return(cdi.mintrack);
- X
- X if (cdi.currand == cdi.ntracks) {
- X fprintf(stderr, "shuffle_get_track: ran off end\n");
- X return(cdi.mintrack);
- X }
- X
- X return(random_tracks[cdi.currand++]);
- X}
- X
- Xunsigned char
- Xshuffle_prev_track() {
- X if (cdi.currand == -1)
- X return(cdi.mintrack);
- X
- X cdi.currand -= 2;
- X
- X if (cdi.currand < 0)
- X cdi.currand = 0;
- X
- X return(random_tracks[cdi.currand++]);
- X}
- END_OF_FILE
- if test 2670 -ne `wc -c <'xcdplayer-2.2/shuffle.c'`; then
- echo shar: \"'xcdplayer-2.2/shuffle.c'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/shuffle.c'
- fi
- if test -f 'xcdplayer-2.2/shuffle.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/shuffle.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/shuffle.xbm'\" \(284 characters\)
- sed "s/^X//" >'xcdplayer-2.2/shuffle.xbm' <<'END_OF_FILE'
- X#define shuffle_width 16
- X#define shuffle_height 16
- Xstatic char shuffle_bits[] = {
- X 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x0c, 0x40, 0x0c, 0x00, 0x0c, 0x0e, 0x07,
- X 0x9f, 0x3b, 0xb3, 0x7d, 0x31, 0xcc, 0xb0, 0xc5, 0x9c, 0xc1, 0x0e, 0x70,
- X 0x06, 0x38, 0x00, 0x18, 0x06, 0x00, 0x06, 0x18};
- END_OF_FILE
- if test 284 -ne `wc -c <'xcdplayer-2.2/shuffle.xbm'`; then
- echo shar: \"'xcdplayer-2.2/shuffle.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/shuffle.xbm'
- fi
- if test -f 'xcdplayer-2.2/stop.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/stop.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/stop.xbm'\" \(275 characters\)
- sed "s/^X//" >'xcdplayer-2.2/stop.xbm' <<'END_OF_FILE'
- X#define stop_width 16
- X#define stop_height 16
- Xstatic char stop_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0xf8, 0x3f, 0x18, 0x30,
- X 0x18, 0x30, 0x18, 0x30, 0x18, 0x30, 0x18, 0x30, 0x18, 0x30, 0x18, 0x30,
- X 0xf8, 0x3f, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 275 -ne `wc -c <'xcdplayer-2.2/stop.xbm'`; then
- echo shar: \"'xcdplayer-2.2/stop.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/stop.xbm'
- fi
- if test -f 'xcdplayer-2.2/thumb.xbm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/thumb.xbm'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/thumb.xbm'\" \(278 characters\)
- sed "s/^X//" >'xcdplayer-2.2/thumb.xbm' <<'END_OF_FILE'
- X#define thumb_width 16
- X#define thumb_height 16
- Xstatic char thumb_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 278 -ne `wc -c <'xcdplayer-2.2/thumb.xbm'`; then
- echo shar: \"'xcdplayer-2.2/thumb.xbm'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/thumb.xbm'
- fi
- if test -f 'xcdplayer-2.2/top_setup.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/top_setup.c'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/top_setup.c'\" \(4576 characters\)
- sed "s/^X//" >'xcdplayer-2.2/top_setup.c' <<'END_OF_FILE'
- X/*
- X * Copyright (C) 1990 Regents of the University of California.
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and
- X * its documentation for any purpose is hereby granted without fee,
- X * provided that the above copyright notice appear in all copies and that
- X * both that copyright notice and this permission notice appear in
- X * supporting documentation, and that the name of the University of
- X * California not be used in advertising or publicity pertaining to
- X * distribution of the software without specific, written prior
- X * permission. the University of California makes no representations
- X * about the suitability of this software for any purpose. It is provided
- X * "as is" without express or implied warranty.
- X */
- X
- X# include <X11/Intrinsic.h>
- X# include <X11/StringDefs.h>
- X# include <X11/Shell.h>
- X# include <X11/Xaw/Form.h>
- X
- X# include <stdio.h>
- X# include <string.h>
- X
- X# include "cdrom_globs.h"
- X# include "debug.h"
- X# include "logo.xbm"
- X
- XXtAppContext appc;
- Xchar *file;
- Xchar *device;
- XBoolean debug = False;
- XBoolean display_timer = True;
- Xfloat volbase = 187.0;
- Xfloat volpcent = .267;
- Xint replayThreshold = 4;
- Xint pauseSkipInterval = 15;
- Xint scanSkipInterval = 1;
- Xfloat scanPauseInterval = .062;
- Xfloat pausePauseInterval = .500;
- Xchar *cdInfoDir = NULL;
- X
- Xextern char *getenv();
- X
- Xstatic Widget top_shell;
- XWidget top_form_widget;
- X
- Xstatic XrmOptionDescRec options[] = {
- X{ "-file", ".file", XrmoptionSepArg, (caddr_t) NULL },
- X{ "-device", ".device", XrmoptionSepArg, (caddr_t) NULL },
- X{ "-debug", ".debug", XrmoptionNoArg, (caddr_t) "True" },
- X{ "-displayTimer", ".displayTimer", XrmoptionNoArg, (caddr_t) "True" },
- X{ "-volBase", ".volBase", XrmoptionSepArg, (caddr_t) 0 },
- X{ "-volPcent", ".volPcent", XrmoptionSepArg, (caddr_t) 0 },
- X{ "-cdInfoDir", ".cdInfoDir", XrmoptionSepArg, (caddr_t) NULL },
- X};
- X
- Xstatic XtResource resources[] = {
- X { "file", "File", XtRString, sizeof(String), (Cardinal) &file,
- X XtRString, (caddr_t) NULL },
- X { "device", "Device", XtRString, sizeof(String), (Cardinal) &device,
- X XtRString, (caddr_t) NULL },
- X { "debug", "Debug", XtRBoolean, sizeof(Boolean), (Cardinal) &debug,
- X XtRBoolean, (caddr_t) &debug },
- X { "displayTimer", "DisplayTimer", XtRBoolean, sizeof(Boolean),
- X (Cardinal) &display_timer, XtRBoolean,
- X (caddr_t) &display_timer },
- X { "volBase", "VolBase", XtRFloat, sizeof(float),
- X (Cardinal) &volbase, XtRFloat, (caddr_t) &volbase },
- X { "volPcent", "VolPcent", XtRFloat, sizeof(float),
- X (Cardinal) &volpcent, XtRFloat, (caddr_t) &volpcent },
- X { "replayThreshold", "replayThreshold", XtRInt, sizeof(int),
- X (Cardinal) &replayThreshold, XtRInt,
- X (caddr_t) &replayThreshold },
- X { "scanSkipInterval", "scanSkipInterval", XtRInt, sizeof(int),
- X (Cardinal) &scanSkipInterval, XtRInt,
- X (caddr_t) &scanSkipInterval },
- X { "scanPauseInterval", "scanPauseInterval", XtRFloat, sizeof(float),
- X (Cardinal) &scanPauseInterval, XtRFloat,
- X (caddr_t) &scanPauseInterval },
- X { "pauseSkipInterval", "pauseSkipInterval", XtRInt, sizeof(int),
- X (Cardinal) &pauseSkipInterval, XtRInt,
- X (caddr_t) &pauseSkipInterval },
- X { "pausePauseInterval", "pausePauseInterval", XtRFloat, sizeof(float),
- X (Cardinal) &pausePauseInterval, XtRFloat,
- X (caddr_t) &pausePauseInterval },
- X { "cdInfoDir", "cdInfoDir", XtRString, sizeof(String),
- X (Cardinal) &cdInfoDir, XtRString, (caddr_t) NULL },
- X};
- X
- XWidget
- Xtop_setup(argc, argv)
- X int argc;
- X char **argv;
- X{
- X Display *dpy;
- X
- X Pixmap icon_pixmap;
- X Arg arg;
- X char *s;
- X
- X XtToolkitInitialize();
- X
- X appc = XtCreateApplicationContext();
- X
- X dpy = XtOpenDisplay(appc, NULL, "xcdplayer", "XCdplayer",
- X options, XtNumber(options),
- X (Cardinal *) &argc, argv);
- X
- X if (dpy == NULL) {
- X fprintf(stderr, "can't open display\n");
- X exit(1);
- X }
- X
- X top_shell = XtAppCreateShell("xcdplayer", "XCdplayer",
- X applicationShellWidgetClass,
- X dpy, (ArgList) NULL, 0);
- X
- X icon_pixmap = XCreateBitmapFromData(XtDisplay(top_shell),
- X RootWindowOfScreen(XtScreen(top_shell)),
- X logo_bits, logo_width, logo_height);
- X
- X XtSetArg(arg, XtNiconPixmap, icon_pixmap);
- X XtSetValues(top_shell, &arg, 1);
- X
- X
- X (void) XtGetApplicationResources(top_shell, (caddr_t) NULL,
- X resources, XtNumber(resources),
- X (ArgList) NULL, 0);
- X
- X if ((cdInfoDir == NULL) && ((s=getenv("XCDINFODIR")) != NULL))
- X cdInfoDir = strdup(s);
- X
- X top_form_widget = XtCreateWidget("mainForm", formWidgetClass,
- X top_shell,
- X (ArgList) NULL, 0);
- X
- X return(top_form_widget);
- X}
- X
- Xvoid
- Xtop_start() {
- X XtManageChild(top_form_widget);
- X XtRealizeWidget(top_shell);
- X}
- END_OF_FILE
- if test 4576 -ne `wc -c <'xcdplayer-2.2/top_setup.c'`; then
- echo shar: \"'xcdplayer-2.2/top_setup.c'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/top_setup.c'
- fi
- if test -f 'xcdplayer-2.2/version.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcdplayer-2.2/version.h'\"
- else
- echo shar: Extracting \"'xcdplayer-2.2/version.h'\" \(37 characters\)
- sed "s/^X//" >'xcdplayer-2.2/version.h' <<'END_OF_FILE'
- X#define VERSION "2.2"
- X#define BETA 0
- END_OF_FILE
- if test 37 -ne `wc -c <'xcdplayer-2.2/version.h'`; then
- echo shar: \"'xcdplayer-2.2/version.h'\" unpacked with wrong size!
- fi
- # end of 'xcdplayer-2.2/version.h'
- fi
- echo shar: End of archive 1 \(of 5\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 5 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- --
- Dan Rich | drich@lerc.nasa.gov | (216) 433-4000
- Sr. Systems Engineer | "Danger, you haven't seen the last of me!"
- RMS Technologies, Inc. | "No, but the first of you turns my stomach!"
- NASA Lewis Research Center | -- The Firesign Theatre's Nick Danger
-
-