[Pkg-wmaker-commits] [wmrack] 22/97: removed cdctrl and mixctrl
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sat Aug 22 02:42:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmrack.
commit dbc118e466fbffea8cbda943c5df418dec4963b3
Author: Chris Waters <xtifr.w at gmail.com>
Date: Thu Mar 8 17:31:31 2012 -0800
removed cdctrl and mixctrl
---
CHANGES | 6 +-
Makefile.in | 12 +---
README.ctrl | 10 ----
cdctrl.c | 188 -----------------------------------------------------------
configure.in | 14 +----
mixctrl.c | 141 --------------------------------------------
6 files changed, 8 insertions(+), 363 deletions(-)
diff --git a/CHANGES b/CHANGES
index ab61a09..82a36aa 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,7 +3,11 @@
(mostly cosmetic changes, but extensive, and critical in a couple of cases)
- added some new mixer device short names to match the new names added
by the kernel developers; no longer segfaults w/ linux 2.4
-- various minor code cleanups.
+- removed the cdctrl and mixctrl standalone program code; the code no longer
+ worked, and I didn't ever use them anyway. (If you *did* use/like these,
+ let me know, and I'll see what I can do about restoring them.)
+- changed default to no-debug build
+- various minor code cleanups
1.0b5 -> 1.1
- changed the version number, even though there are few changes to the code
diff --git a/Makefile.in b/Makefile.in
index a34ae2d..0d43e08 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -13,10 +13,8 @@ RM = rm -f
SOURCES = xpmicon.c library.c cdrom.c mixer.c wmrack.c \
cdctrl.c mixctrl.c
OBJECTS = xpmicon.o library.o cdrom.o mixer.o wmrack.o
-CD_CTRL_OBJS = cdrom.o cdctrl.o
-MIXER_CTRL_OBJS = mixer.o mixctrl.o
-TARGETS = wmrack @CTRL@
+TARGETS = wmrack
MANPAGES = wmrack.1
@@ -36,12 +34,6 @@ standart.style:
wmrack: $(OBJECTS)
$(CC) $(OBJECTS) -o $@ $(LIBS)
-cdctrl: $(CD_CTRL_OBJS)
- $(CC) $(CD_CTRL_OBJS) -o $@ $(LIBS)
-
-mixctrl: $(MIXER_CTRL_OBJS)
- $(CC) $(MIXER_CTRL_OBJS) -o $@ $(LIBS)
-
install: $(TARGETS) install-bin install-man install-lib
install-bin:
@@ -63,7 +55,7 @@ clean:
$(RM) *.o core
binclean: clean
- $(RM) wmrack cdctrl mixctrl
+ $(RM) wmrack
distclean: binclean
$(RM) Makefile config.h .depend config.status config.log config.cache \
diff --git a/README.ctrl b/README.ctrl
deleted file mode 100644
index 2e5bef4..0000000
--- a/README.ctrl
+++ /dev/null
@@ -1,10 +0,0 @@
-cdctrl and mixctrl are test programs for the cdrom.* and mixer.*
-stuff.
-
-To compile it you must give configure the --with-ctrl switch.
-
-Without the DEBUG and gdb stuff it also gives a useful command-line
-interface to your cdrom and mixer.
-
------
-$Id: README.ctrl,v 1.1.1.1 2001/02/12 22:25:31 xtifr Exp $
diff --git a/cdctrl.c b/cdctrl.c
deleted file mode 100644
index 6d2064e..0000000
--- a/cdctrl.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * $Id: cdctrl.c,v 1.2 2003/10/01 22:44:19 xtifr Exp $
- *
- * Part of WMRack
- *
- * command line tool to control the cdrom
- * created to test the cdrom control stuff
- *
- * Copyright (c) 1997 by Oliver Graf <ograf at fga.de>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include "cdrom.h"
-
-char *commands[]={"info", "status", "play", "pause", "skip", "stop", "eject", "playlist"};
-#define NUM_CMD 8
-
-void usage()
-{
- fprintf(stderr,"Usage: cdctrl [-d DEVICE] [info|status|play|pause|skip|stop|eject|playlist] PARAMS\n");
-}
-
-int main(int argc, char **argv)
-{
- CD *cd;
- int fa=1, i, s=0, e=0xaa, status;
- char *device="/dev/cdrom";
- struct timeval tm;
-
- gettimeofday(&tm,NULL);
- srandom(tm.tv_usec^tm.tv_sec);
-
- if (argc<2)
- {
- usage();
- exit(EXIT_FAILURE);
- }
-
- if (strcmp(argv[1],"-d")==0)
- {
- device=argv[2];
- fa=3;
- argc-=2;
- }
-
- if (argc<2)
- {
- usage();
- exit(EXIT_FAILURE);
- }
-
- for (i=0; i<NUM_CMD; i++)
- if (strcmp(argv[fa],commands[i])==0)
- break;
- if (i==NUM_CMD)
- {
- usage();
- exit(EXIT_FAILURE);
- }
-
- cd=cd_open(device,0);
- if (cd->status==-1)
- printf("No CDROM in drive\n");
- else
- status=cd_getStatus(cd,0,1);
-
- switch (i)
- {
- case 0:
- printf("discid: %08lX\n",cd->info.discid);
- printf("Tracks: %d\n",cd->info.tracks);
- for (i=0; i<cd->info.tracks; i++)
- {
- printf("%2d[%2d]: start(%02d:%02d:%02d) end(%02d:%02d:%02d) len(%02d:%02d:%02d) %s\n",i,
- cd->info.track[i].num,
- cd->info.track[i].start.minute,
- cd->info.track[i].start.second,
- cd->info.track[i].start.frame,
- cd->info.track[i].end.minute,
- cd->info.track[i].end.second,
- cd->info.track[i].end.frame,
- cd->info.track[i].length.minute,
- cd->info.track[i].length.second,
- cd->info.track[i].length.frame,
- cd->info.track[i].data?"DATA":"");
- }
- showlist:
- printf("PlayList: %d length(%02d:%02d:%02d)\n",
- cd->info.list.tracks,
- cd->info.list.length.minute,
- cd->info.list.length.second,
- cd->info.list.length.frame);
- for (i=0; i<cd->info.list.tracks; i++)
- {
- printf("%2d[%2d]: start(%02d:%02d:%02d) end(%02d:%02d:%02d) len(%02d:%02d:%02d) %s\n",i,
- cd->info.list.track[i].num,
- cd->info.list.track[i].start.minute,
- cd->info.list.track[i].start.second,
- cd->info.list.track[i].start.frame,
- cd->info.list.track[i].end.minute,
- cd->info.list.track[i].end.second,
- cd->info.list.track[i].end.frame,
- cd->info.list.track[i].length.minute,
- cd->info.list.track[i].length.second,
- cd->info.list.track[i].length.frame,
- cd->info.list.track[i].data?"DATA":"");
- }
- break;
- case 1:
- printf("status is %d\n",status);
- printf("mode %d track %d\n",
- cd->info.current.mode,cdinfo.current.track);
- if (cd->info.current.track!=-1)
- printf("%d[%d]: %02d:%02d:%02d->%02d:%02d:%02d len(%02d:%02d:%02d) d%d\n",
- cd->info.current.track,
- cd->info.list.track[cd->info.current.track].num,
- cd->info.list.track[cd->info.current.track].start.minute,
- cd->info.list.track[cd->info.current.track].start.second,
- cd->info.list.track[cd->info.current.track].start.frame,
- cd->info.list.track[cd->info.current.track].end.minute,
- cd->info.list.track[cd->info.current.track].end.second,
- cd->info.list.track[cd->info.current.track].end.frame,
- cd->info.list.track[cd->info.current.track].length.minute,
- cd->info.list.track[cd->info.current.track].length.second,
- cd->info.list.track[cd->info.current.track].length.frame,
- cd->info.list.track[cd->info.current.track].data);
- else
- printf("no current track\n");
- printf("rel %02d:%02d:%02d abs %02d:%02d:%02d\n",
- cd->info.current.relmsf.minute,
- cd->info.current.relmsf.second,
- cd->info.current.relmsf.frame,
- cd->info.current.absmsf.minute,
- cd->info.current.absmsf.second,
- cd->info.current.absmsf.frame);
- break;
- case 2:
- if (argc>2)
- s=atoi(argv[fa+1]);
- cd_doPlay(cd,s);
- break;
- case 3:
- cd_doPause(cd);
- break;
- case 4:
- if (argc!=3)
- {
- fprintf(stderr,"skip needs only one arg (seconds)\n");
- exit(EXIT_FAILURE);
- }
- s=atoi(argv[fa+1]);
- cd_doSkip(cd,s);
- break;
- case 5:
- cd_doStop(cd);
- break;
- case 6:
- cd_doEject(cd);
- break;
- case 7:
- if (argc==2)
- cd_randomize(cd);
- else
- {
- CDPlayList *list=cdpl_new();
- int t;
- for (i=fa+1; i<argc+fa-1; i++)
- {
- t=cd_findtrack(cd,atoi(argv[i]));
- if (t>=0)
- cdpl_add(list,cd,t);
- }
- cd_setpl(cd,list);
- }
- cd_doPlay(cd,0);
- fprintf(stderr,"\nWARNING: cdctrl CAN ONLY SET PLAYLIST, BUT PLAYING IS LINEAR\n\n");
- goto showlist;
- default:
- usage();
- exit(EXIT_FAILURE);
- }
- cd_close(cd);
- return EXIT_SUCCESS;
-}
diff --git a/configure.in b/configure.in
index 1dc5fa1..c1e0c29 100644
--- a/configure.in
+++ b/configure.in
@@ -11,10 +11,7 @@ dnl package switches
dnl
dnl AC_ARG_WITH(cdplayer,[ --with-cdplayer Include cdplayer support.])
dnl AC_ARG_WITH(mixer, [ --with-mixer Include mixer support.])
-AC_ARG_WITH(ctrl, \
-[ --without-ctrl Compile without command line tools.],[],[with_ctrl="yes"])
-AC_ARG_WITH(debug, \
-[ --without-debug Compile without extra debug messages.],[],[with_debug="yes"])
+AC_ARG_WITH(debug, [ --with-debug Compile with extra debug messages.])
AC_ARG_WITH(gnustep, \
[ --without-gnustep Don't use GNUstep style library paths.])
@@ -81,15 +78,6 @@ dnl check for extra package options
dnl
echo
-dnl command line tools
-if test "x${with_ctrl}" = "xyes"; then
- echo "compiling the extra command line tools"
- CTRL="cdctrl mixctrl"
-else
- CTRL=""
-fi
-AC_SUBST(CTRL)
-
dnl DEBUG
if test "x${with_debug}" = "xyes"; then
echo "adding extra DEBUG output"
diff --git a/mixctrl.c b/mixctrl.c
deleted file mode 100644
index 2386945..0000000
--- a/mixctrl.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * $Id: mixctrl.c,v 1.1.1.1 2001/02/12 22:25:47 xtifr Exp $
- *
- * Part of WMRack
- *
- * command line tool to control the mixer
- * created to test the mixer control stuff
- *
- * Copyright (c) 1997 by Oliver Graf <ograf at fga.de>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "mixer.h"
-
-void usage()
-{
- fprintf(stderr,"Usage: mixctrl [-d DEVICE] [CHANNELNAME|CHANNELNUM] [0-100|0-100:0-100|src|nosrc|exsrc]\n");
-}
-
-int main(int argc, char **argv)
-{
- MIXER *mix;
- int fa=1, i, volid, left=0, right=0, command=0;
- char *device="/dev/mixer", *d1;
-
- if (argc<1)
- {
- usage();
- exit(EXIT_FAILURE);
- }
-
- if (argc>2 && strcmp(argv[1],"-d")==0)
- {
- device=argv[2];
- argc-=2;
- fa=3;
- }
-
- if (argc>2)
- {
- volid=strtol(argv[fa],&d1,10);
- if (*d1!=0)
- {
- for (volid=0; volid<mixer_devices; volid++)
- if (strcmp(argv[fa],mixer_names[volid])==0)
- break;
- }
- d1=strchr(argv[fa+1],':');
- if (d1)
- {
- *d1++=0;
- left=atoi(argv[fa+1]);
- right=atoi(d1);
- command=1;
- }
- else
- {
- if (strcmp(argv[fa+1],"src")==0)
- command=2;
- else if (strcmp(argv[fa+1],"nosrc")==0)
- command=3;
- else if (strcmp(argv[fa+1],"exsrc")==0)
- command=4;
- else
- {
- left=atoi(argv[fa+1]);
- command=0;
- }
- }
- }
-
- mix=mixer_open(device);
- if (mix==NULL)
- printf("Can't open mixer\n");
- else
- {
- printf("Mixer initialized\n");
- printf("Mixer id %s, Mixer name %s\n",mix->id,mix->name);
- printf("Supported devices:\n");
- for (i=0; i<mixer_devices; i++)
- if (mixer_isdevice(mix,i))
- {
- if (mixer_isstereo(mix,i))
- printf(" %2d - %-8s (%3d:%3d) %s%s\n",i,mixer_names[i],
- mixer_volleft(mix,i),mixer_volright(mix,i),
- (mixer_isrecdev(mix,i)?"REC":""),
- (mixer_isrecsrc(mix,i)?"SRC":""));
- else
- printf(" %2d - %-8s ( %3d ) %s%s\n",i,mixer_names[i],
- mixer_volmono(mix,i),
- (mixer_isrecdev(mix,i)?"REC":""),
- (mixer_isrecsrc(mix,i)?"SRC":""));
- }
- }
-
- if (volid<mixer_devices)
- {
- switch (command)
- {
- case 0:
- printf("Setting %s to volume %d\n",mixer_names[volid],left);
- mixer_setvol(mix,volid,left);
- break;
- case 1:
- printf("Setting %s to volume %d:%d\n",mixer_names[volid],left,right);
- mixer_setvols(mix,volid,left,right);
- break;
- case 2:
- printf("Setting %s as recsrc\n",mixer_names[volid]);
- mixer_setrecsrc(mix,volid,1,0);
- break;
- case 3:
- printf("Clearing recsrc of %s\n",mixer_names[volid]);
- mixer_setrecsrc(mix,volid,0,0);
- break;
- case 4:
- printf("Setting %s as exclusive recsrc\n",mixer_names[volid]);
- mixer_setrecsrc(mix,volid,1,1);
- break;
- }
- if (mixer_isdevice(mix,volid))
- {
- if (mixer_isstereo(mix,volid))
- printf(" %2d - %-8s (%3d:%3d) %s%s\n",volid,mixer_names[volid],
- mixer_volleft(mix,volid),mixer_volright(mix,volid),
- (mixer_isrecdev(mix,volid)?"REC":""),
- (mixer_isrecsrc(mix,volid)?"SRC":""));
- else
- printf(" %2d - %-8s ( %3d ) %s%s\n",volid,mixer_names[volid],
- mixer_volmono(mix,volid),
- (mixer_isrecdev(mix,volid)?"REC":""),
- (mixer_isrecsrc(mix,volid)?"SRC":""));
- }
- }
-
- mixer_close(mix);
- printf("Mixer closed\n");
- return EXIT_SUCCESS;
-}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmrack.git
More information about the Pkg-wmaker-commits
mailing list