Remove trailing whitespace in recently added dockapps.

This commit is contained in:
Doug Torrance 2016-12-23 18:28:17 -05:00 committed by Carlos R. Mafra
parent 8d4679e080
commit 1b4708cb92
257 changed files with 2411 additions and 2413 deletions

View file

@ -1,4 +1,4 @@
asbeats 0.2 by Martin Dahl <dahlm@vf.telia.no>
asbeats 0.2 by Martin Dahl <dahlm@vf.telia.no>
and Karl-Martin Skontorp <karl-ms@online.no>
WHAT IS IT?
@ -19,7 +19,7 @@ windowmaker dock.
INSTALLING
----------
To install, just do a 'make' and copy the generated 'asbeats'
To install, just do a 'make' and copy the generated 'asbeats'
program anywhere you like.

View file

@ -6,7 +6,7 @@ the best clock for the best X-windowmanager!
RELEASE 10
26 August 1996
by Beat Christen, bchriste@iiic.ethz.ch
by Beat Christen, bchriste@iiic.ethz.ch
VERSION 1.0
@ -26,9 +26,9 @@ INSTALL
HINTS
- If you are using 'Wharf', and only a part (48x48) of the clock is
- If you are using 'Wharf', and only a part (48x48) of the clock is
visible, then
you need AfterStep 0.98Beta Prerelease 4 and you have to set the
you need AfterStep 0.98Beta Prerelease 4 and you have to set the
'MaxSwallow' keyword for 'asclock'.
@ -48,8 +48,8 @@ CONTRIBUTORS
Shape Extensions Dan Weeks
and man page
language specific Carlos Canau
files Frank Larsen
language specific Carlos Canau
files Frank Larsen
Andy Lo A Foe
Dan Weeks
Emanuele Caratti
@ -60,9 +60,9 @@ CHANGES
26-Aug-96 - czech added
13-Aug-96 - french added
6-Aug-96 - spanish added (thanks to David Lazaro Saz khelekir@encomix.es)
- hungarian added
- hungarian added
(thanks to Gyula Matics mgyula@garfield.sch.bme.hu)
- breton added (thanks to Jean-Pierre.Messager@univ-brest.fr)
- breton added (thanks to Jean-Pierre.Messager@univ-brest.fr)
30-Jul-96 - ClassHints added (patch by Peter Parnes peppar@cdt.luth.se)
@ -72,9 +72,9 @@ CHANGES
- improved configure
21-Jun-96 - '-iconic' state added
- usleep did not exist on Solaris 2.4: changed to poll()
- better error messages
- usleep did not exist on Solaris 2.4: changed to poll()
- better error messages
8-Jun-96 - '-noblink' feature added
- final switch to imake
@ -86,12 +86,12 @@ CHANGES
- in AM/PM mode, no leading one was visible...
- '-led' command line option added
24-May-96 - asclock can start an executable: as default you get a
24-May-96 - asclock can start an executable: as default you get a
message on console
- command line options added (-exe, -geometry, -shape, -12, -24)
- Shape-Extension (by Dan Weeks)
- now it's a Build script
- dutch added (by Andy Lo A Foe <arloafoe@cs.vu.nl>)
- dutch added (by Andy Lo A Foe <arloafoe@cs.vu.nl>)
- norwegian added (by Frank Larsen <frankrl@stud.cs.uit.no>)
22-May-96 - obscure, not necessary XRaiseWindow removed :)

View file

@ -46,7 +46,7 @@ int main(int argc,char *argv[])
{
int i;
unsigned int borderwidth;
char *display_name=NULL;
char *display_name=NULL;
char *wname="asbeats";
XGCValues gcv;
unsigned long gcm;
@ -55,12 +55,12 @@ int main(int argc,char *argv[])
XClassHint classHint;
Pixmap pixmask;
char *Geometry="";
if (!(dpy = XOpenDisplay(display_name)))
{
fprintf(stderr,"asbeats: can't open display %s\n",
XDisplayName(display_name));
exit (1);
}
if (!(dpy = XOpenDisplay(display_name)))
{
fprintf(stderr,"asbeats: can't open display %s\n",
XDisplayName(display_name));
exit (1);
}
screen=DefaultScreen(dpy);
Root=RootWindow(dpy,screen);
d_depth=DefaultDepth(dpy,screen);
@ -73,7 +73,7 @@ int main(int argc,char *argv[])
fore_pix=GetColor("black");
XWMGeometry(dpy,screen,Geometry,NULL,(borderwidth =1),
&mysizehints,&mysizehints.x,&mysizehints.y,
&mysizehints.width,&mysizehints.height,&i);
&mysizehints.width,&mysizehints.height,&i);
mysizehints.width=wmclock.attributes.width;
mysizehints.height=wmclock.attributes.height;
win=XCreateSimpleWindow(dpy,Root,mysizehints.x,mysizehints.y,
@ -98,8 +98,8 @@ int main(int argc,char *argv[])
gcv.foreground = fore_pix;
gcv.background = back_pix;
gcv.graphics_exposures = FALSE;
NormalGC = XCreateGC(dpy, Root, gcm, &gcv);
pixmask = XCreateBitmapFromData(dpy, win, mask_bits, mask_width,
NormalGC = XCreateGC(dpy, Root, gcm, &gcv);
pixmask = XCreateBitmapFromData(dpy, win, mask_bits, mask_width,
mask_height);
XShapeCombineMask(dpy, win, ShapeBounding, 0, 0, pixmask, ShapeSet);
XShapeCombineMask(dpy, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet);
@ -110,7 +110,7 @@ int main(int argc,char *argv[])
mywmhints.window_group = win;
mywmhints.flags = StateHint | IconWindowHint |
IconPositionHint | WindowGroupHint;
XSetWMHints(dpy, win, &mywmhints);
XSetWMHints(dpy, win, &mywmhints);
XSetCommand(dpy, win, argv, argc);
XMapWindow(dpy,win);
InsertTime();
@ -134,9 +134,9 @@ int main(int argc,char *argv[])
break;
case DestroyNotify:
XCloseDisplay(dpy);
exit(0);
exit(0);
default:
break;
break;
}
}
XFlush(dpy);
@ -158,7 +158,7 @@ void GetXPM(void)
char led2[22];
int ret;
XGetWindowAttributes(dpy,Root,&attributes);
if(!XParseColor(dpy,attributes.colormap,LedColor,&col))
if(!XParseColor(dpy,attributes.colormap,LedColor,&col))
{
nocolor("parse",LedColor);
}
@ -178,7 +178,7 @@ void GetXPM(void)
CreatePixmap(dpy,Root,mask_xpm,&wmclock);
CreatePixmap(dpy,Root,mask_xpm,&visible);
CreatePixmap(dpy,Root,led_xpm,&led);
}
}
static void CreatePixmap(Display *dpy, Window Root, char **data, XpmIcon* icon)
{
@ -221,9 +221,9 @@ Pixel GetColor(char *name)
XWindowAttributes attributes;
XGetWindowAttributes(dpy,Root,&attributes);
color.pixel=0;
if (!XParseColor(dpy,attributes.colormap,name,&color))
if (!XParseColor(dpy,attributes.colormap,name,&color))
nocolor("parse",name);
else if(!XAllocColor (dpy,attributes.colormap,&color))
else if(!XAllocColor (dpy,attributes.colormap,&color))
nocolor("alloc",name);
return color.pixel;
}
@ -242,7 +242,7 @@ void Beat()
else
if (fTime < 0)
fTime+=1000;
XCopyArea(dpy,led.pixmap,visible.pixmap,NormalGC,
90,0,9,11,posx[0],15);
XCopyArea(dpy,led.pixmap,visible.pixmap,NormalGC,
@ -253,7 +253,7 @@ void Beat()
9*((int)fTime % 10),0,9,11,posx[3],15);
fTime = abs(((fTime - abs(fTime)) * 1000) + 0.5);
XCopyArea(dpy,led.pixmap,visible.pixmap,NormalGC,
99,0,9,11,posx[0],32);
XCopyArea(dpy,led.pixmap,visible.pixmap,NormalGC,
@ -262,7 +262,7 @@ void Beat()
9*((((int)fTime) / 10) % 10),0,9,11,posx[2],32);
XCopyArea(dpy,led.pixmap,visible.pixmap,NormalGC,
9*((int)fTime % 10),0,9,11,posx[3],32);
return;
}

View file

@ -14,7 +14,7 @@ Important note:
I changed two things in libworkman:
1) I added #under OSS_SUPPORT in plat_linux.c in order to definitly
1) I added #under OSS_SUPPORT in plat_linux.c in order to definitly
prevent libworkman to use the mixer.
2) I added wm_cddb.h in installed files as it was missing in the

View file

@ -43,7 +43,7 @@ OBJS = cdcontrol.o misc.o faktory.o handlers.o \
#ifdef WMK
WM_LIB = -lm -lz -lpng -ljpeg -ltiff -lgif -lPropList -lwraster -lWINGs
#else
WM_LIB =
WM_LIB =
#endif
AllTarget($(NAME))

View file

@ -31,7 +31,7 @@ AScd 0.1 -> 0.6
The original code was taken by Rob Malda from asclock (Afterstep wharf
module, by Beat Christen <bchriste@iiic.ethz.ch>) and from workbone (CD
driver).
driver).
AScd 0.7 -> 0.9
---------------
@ -52,7 +52,7 @@ AScd's archive. WorkMan's maintainer is Dirk Foersterling
AScd >= 0.12
------------
AScd no longer includes the pixmaps in the source files. It is now possible
AScd no longer includes the pixmaps in the source files. It is now possible
to change the pixmaps theme at run time. AScd now needs a directory where
to store the pixmaps. The default is /usr/local/share/AScd.
@ -68,7 +68,7 @@ installed by default in /usr/local/share/AScd/Themes.
You need to download, compile and install the WorkMan library. Please
use the 99/05/05 snapshot wish can be found on the AScd's home page or
on the primary ftp site for WorkMan:
on the primary ftp site for WorkMan:
ftp://ftp.midwinter.com/WorkMan/snapshots/
@ -91,16 +91,16 @@ everything in the AScd default directory (/usr/local/share/AScd) as the
theme files are *not* compatible.
make
- If you want to try the program, just type
./ascd
(try './ascd -help' to see the commandline options)
If everything is ok, you can install the program and the
man page:
make install
make install.man
@ -113,7 +113,7 @@ theme files are *not* compatible.
*Wharf - - Swallow "ascd" /usr/local/bin/ascd -device /dev/wcd0a &
(customized to your system settings of course!)
* installation for Window Maker
-----------------------------
@ -131,7 +131,7 @@ theme files are *not* compatible.
clock applet for Window Maker. Wmitime was written by Dave Clark
(clarkd@skynet.ca) More info at: http://www.neotokyo.org. I added the
lower case letters.
The new 0.13 default font is fully 8bit compatible! It has been drawn
by Stefan Zeiger (szeiger@novocode.com).
========================================================================

View file

@ -24,12 +24,12 @@
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL DENIS BOUREZ, ROB MALDA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ===========================================================================
*/
@ -179,7 +179,7 @@ char th_alpha2[FAK_CMAX];
char th_background[FAK_CMAX];
char th_icon_window[FAK_CMAX];
int th_no_minus = FALSE;
int th_no_minus = FALSE;
int th_no_icon_window = FALSE;
struct fak_button thdata[FAK_BMAX];
@ -200,7 +200,7 @@ struct fak_button thdata[FAK_BMAX];
/*****************************************************************************/
void mouse_events(XEvent Event)
void mouse_events(XEvent Event)
{
int i;
int j;
@ -244,13 +244,13 @@ void mouse_events(XEvent Event)
}
}
}
}
/* ------------------------------------------------------------------------
GUI control
------------------------------------------------------------------------ */
Pixel get_color(char *ColorName)
Pixel get_color(char *ColorName)
{
XColor Color;
XWindowAttributes Attributes;
@ -264,9 +264,9 @@ Pixel get_color(char *ColorName)
fprintf(stderr,"ascd: can't allocate %s\n", ColorName);
return Color.pixel;
}
}
void create_window(int argc, char **argv)
void create_window(int argc, char **argv)
{
int i;
unsigned int borderwidth ;
@ -345,7 +345,7 @@ void create_window(int argc, char **argv)
fore_pix,
back_pix);
} else {
Iconwin = XCreateSimpleWindow(Disp, Win,
Iconwin = XCreateSimpleWindow(Disp, Win,
SizeHints.x,
SizeHints.y,
iconXPM.attributes.width,
@ -366,7 +366,7 @@ void create_window(int argc, char **argv)
XSelectInput(Disp, Iconwin, (ExposureMask | ButtonPressMask |
StructureNotifyMask));
if (XStringListToTextProperty(&wname, 1, &name) ==0) {
fprintf(stderr, "ascd: can't allocate window name\n");
exit(-1);
@ -389,21 +389,21 @@ void create_window(int argc, char **argv)
WmHints.icon_y = SizeHints.y;
XSetWMHints(Disp, Win, &WmHints);
XSetCommand(Disp, Win, argv, argc);
XMapWindow(Disp, Win);
if (debug) fprintf(stderr, "-> calling fak_maskset() from create_window()...\n");
fak_maskset();
if (debug) fprintf(stderr, "-> calling fak_redraw() from create_window()...\n");
fak_redraw();
if (debug) fprintf(stderr, "-> Leaving create_window()\n");
}
}
void newtext(char *txt) {
void newtext(char *txt) {
strcpy(led_text, txt);
text_start = 0;
}
}
void show_icon_db_f() {
/* scroll the song title */
@ -434,7 +434,7 @@ void show_icon_db_f() {
}
if (track > cur_ntracks - 1) return;
if (cd->trk[track].songname != NULL) {
if (show_artist) {
if (cd->artist != NULL) {
@ -483,10 +483,10 @@ void show_db_f() {
if ((theme_select == 0) || (where == DB_PANEL)) {
/*
/*
there is a message to display, we'll wait for the message
to time-out before handling the track title... (but only if
there is no separate areas)
there is no separate areas)
*/
if ((strlen(led_text) > 0) && (where == MSG_PANEL)) return;
@ -505,7 +505,7 @@ void show_db_f() {
if (track > cur_ntracks - 1) return;
if (track < 0) return;
if (debug > 1) fprintf(stderr, "** Show DB TRACK = %d\n", track);
if (cd->trk[track].songname != NULL) {
@ -542,20 +542,20 @@ void show_db_f() {
Loooooooooooooooooping.........
------------------------------------------------------------------------ */
void main_loop()
void main_loop()
{
unsigned int no_disk = 0;
long int dodo = RDTIME;
XEvent Event;
while(1) {
if (debug > 1) fprintf(stderr, "** [Main Loop] mode = %02d track = %02d \n", cur_cdmode, cur_track);
if (cur_cdmode == WM_CDM_EJECTED) no_disk = 1;
slow_down++;
if (slow_down > 10) {
#ifdef WMK
@ -589,13 +589,13 @@ void main_loop()
fak_redraw();
}
}
/* The Loop Mode : */
if ( (cur_track == loop_end_track ) && (cur_pos_rel >= loop_2) && (loop_mode) ) {
cd_control(LOOP);
fak_redraw();
}
/* The Intro Scan Mode : */
if ( (cur_pos_rel > cue_time) && (intro_mode) ) {
cd_control(INTRONEXT);
@ -608,19 +608,19 @@ void main_loop()
}
/* Check events */
while (XPending(Disp))
{
XNextEvent(Disp, &Event);
#ifdef WMK
#ifdef WMK
if (!WMHandleEvent(&Event)) {
#endif
switch(Event.type) {
/* ---------------------- Redraw Window --------------------- */
case Expose:
if(Event.xexpose.count == 0) {
lasttime=01;
@ -630,17 +630,17 @@ void main_loop()
if (debug > 1) fprintf(stderr, "** XEVent - expose, not handled, count = %d\n", Event.xexpose.count);
}
break;
/* ----------------------- Mouse Click ---------------------- */
case ButtonPress:
wm_cd_status();
mouse_events(Event);
break;
/* ------------------------ Destroy Window ------------------- */
case DestroyNotify:
XFreeGC(Disp, WinGC);
XDestroyWindow(Disp, Win);
@ -653,34 +653,34 @@ void main_loop()
break;
}
#ifdef WMK
#ifdef WMK
}
#endif
XFlush(Disp);
} /* check event */
usleep(dodo);
/* ----------------- now we have to redraw the screen: ---------------- */
if ((slow_down > 10) || (has_clicked)) {
fak_redraw();
slow_down = 0;
has_clicked = FALSE;
}
}
}
}
/* ------------------------------------------------------------------------
So... let's go!
------------------------------------------------------------------------ */
int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
extern char *rcfile, *dbfiles;
extern char *rcfile, *dbfiles;
/*printf("AScd %s\n", VERSION);*/
/* CD device: */
#ifndef NO_D_DEVICE
@ -691,7 +691,7 @@ int main(int argc, char *argv[])
strcpy(led_text, "");
strcpy(theme, "default");
strcpy(xv, "xv");
/* the WorkMan database. It's still not used in ascd, but we need this
to start the WorkMan code
*/
@ -723,7 +723,7 @@ int main(int argc, char *argv[])
create_window(argc, argv);
if (debug) fprintf(stderr, "** checking CD status...\n");
wm_cd_status();
if (cur_cdmode != WM_CDM_EJECTED) {
if (debug) fprintf(stderr, "** reading CD initial volume...\n");
volume = wm_cd_read_initial_volume(max_volume);
@ -749,12 +749,12 @@ int main(int argc, char *argv[])
}
if (debug) fprintf(stderr, "** checking current CD volume in database\n");
if (((cur_cdmode == WM_CDM_PLAYING) || (cur_cdmode == WM_CDM_PAUSED)) && (cd->volume > 0)) {
volume=cd->volume;
cd_volume(volume, 10, max_volume);
}
fak_maskset();
if (debug) fprintf(stderr, "** Init passed. Entering main loop.\n");

View file

@ -94,7 +94,7 @@
.SH DESCRIPTION
\fBascd\fP is CD player written to play audio CD's integrated in
afterstep's Wharf module or WindowMaker's dock.
afterstep's Wharf module or WindowMaker's dock.
\fBascd\fP handles mounted volumes, and opens and closes the tray.
.SH CONFIGURATION OPTIONS
@ -120,7 +120,7 @@ afterstep's Wharf module or WindowMaker's dock.
you use ascd with WindowMaker.
.B -device <device>
specifies the CDROM device which should be used by
specifies the CDROM device which should be used by
ascd. If "-DNO_DEFAULT_DEVICE" was set at
compilation time this option will have no effect.
@ -138,7 +138,7 @@ afterstep's Wharf module or WindowMaker's dock.
.B +/-autoplay, +/-a
Turn on or off \fBautoplay mode\fP. When this is
turned on, ascd always wait for a CD, and play it
turned on, ascd always wait for a CD, and play it
automatically when inserted.
.B +/-autoprobe, +/-p
@ -161,7 +161,7 @@ afterstep's Wharf module or WindowMaker's dock.
.B -volume <value>
Set the CD driver volume, between 0 and maxvolume.
Note that the -volume option in independant from
Note that the -volume option in independant from
the mixer. It controls the drive, not the sound
card.
@ -199,7 +199,7 @@ afterstep's Wharf module or WindowMaker's dock.
.B -save
Save all the settings and exit. Usefull to 'make' a
new configuration file: set all the stuff you want
to set and put -save as last commandline option.
to set and put -save as last commandline option.
Example:
ascd +w +a -device /dev/cd0c -save

View file

@ -1,6 +1,6 @@
/* ===========================================================================
* AScd: cdcontrol.c
* This is cd_control() function: accept orders from the ui player and send
* This is cd_control() function: accept orders from the ui player and send
* the appropriate commands to libworkman.
*
* Please do *not* modify this function as it is used without changes by
@ -28,20 +28,20 @@
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL DENIS BOUREZ, ROB MALDA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ===========================================================================
*/
#define CD_C_VERSION "1.4"
#include "ext.h"
void
void
cd_control(int order)
{
static int pos_changed = FALSE;
@ -61,7 +61,7 @@ cd_control(int order)
if ((cur_ntracks == 1) && (cd->trk[cur_track - 1].data)) {
/* only one track, and it's a data track. We ignore
/* only one track, and it's a data track. We ignore
all commands to avoid some funny things. Only the EJECT
commands are allowed */
@ -70,7 +70,7 @@ cd_control(int order)
return;
}
}
switch(order) {
case PLAY:
@ -85,7 +85,7 @@ cd_control(int order)
if (cur_track < 1) cur_track = 1;
/* don't play data tracks: */
if (! cd->trk[cur_track - 1].data) {
if (cur_cdmode != WM_CDM_EJECTED) {
if (cur_cdmode != WM_CDM_PAUSED) {
@ -226,7 +226,7 @@ cd_control(int order)
/* if it's a data track, skip it */
while ((cd->trk[cur_track - 1].data) && (cur_track <= cur_ntracks)) cur_track++;
if (cur_cdmode == WM_CDM_PLAYING) {
wanna_play = TRUE;
wm_cd_play(cur_track, 0, cur_ntracks + 1);
@ -280,17 +280,17 @@ cd_control(int order)
case LOOP:
if ( (loop_2 > loop_1) ||
(loop_end_track > loop_start_track) ) {
if (loop_start_track == 0) loop_start_track = 1;
intro_mode = 0;
if ( ( loop_2 > loop_1 )
if ( ( loop_2 > loop_1 )
|| ( loop_start_track != loop_end_track ) )
currenttrack = loop_start_track;
else {
loop_end_track = cur_ntracks;
currenttrack = loop_start_track = 1;
loop_1 = 0;
loop_2 =
loop_2 =
thiscd.trk[ loop_end_track - 1 ].length - 1;
}
wm_cd_play(loop_start_track, loop_1, cur_ntracks + 1);
@ -327,7 +327,7 @@ cd_control(int order)
intro_mode = 0;
}
break;
case INTRONEXT:
wm_cd_pause();
currenttrack = cur_track;
@ -337,7 +337,7 @@ cd_control(int order)
cur_pos_rel = 0;
wm_cd_play(currenttrack, 0, cur_ntracks + 1);
break;
case LOCACCESS:
if ( (loop_1 > 0) && (loop_start_track > 0) ) {
intro_mode = 0;

14
ascd/ascd/configure vendored
View file

@ -64,7 +64,7 @@ printf "Bin directory? "
read BINDIR
echo
case $BINDIR in
case $BINDIR in
"") echo "#define CBINDIR /usr/local/bin" > dirs.h
echo "** Ascd will be /usr/local/bin/ascd"
;;
@ -85,9 +85,9 @@ echo "default value (/usr/local/man/man1)."
echo
printf "Man directory? "
read MANDIR
echo
echo
case $MANDIR in
case $MANDIR in
"") echo "#define CMANDIR /usr/local/man/man1" >> dirs.h
echo "** Man page will be installed in /usr/local/man/man1."
;;
@ -110,7 +110,7 @@ printf "Themes pixmaps directory? "
read THDIR
echo
case $THDIR in
case $THDIR in
"") echo "#define THDIR \"/usr/local/share/AScd\"" >> config.h
echo "#define CTHDIR /usr/local/share/AScd" >> dirs.h
echo "** Theme dir: /usr/local/share/AScd."
@ -139,9 +139,9 @@ echo "2) no WINGs support (DEFAULT)"
echo
printf "Type 1 or 2: "
read WINGS
echo
echo
case $WINGS in
case $WINGS in
1) echo "#define WMK" >> config.h
echo "** Compiling with WINGs support."
;;
@ -167,7 +167,7 @@ printf "Type 1 or 2: "
read WINGS
echo
case $WINGS in
case $WINGS in
1) echo "#define MIXER" >> config.h
echo "** Compiling with mixer support."
;;

View file

@ -55,13 +55,13 @@
- added "quick ref" support with quick_ref command and a button
in the WINGs main window
------------- 05/16/99:
------------- 05/16/99:
- added support for vertical sliders (CD direct access, volume and
mixer) via vprogress_bar, vvolume_bar and vmixer_bar.
- added support for inverted vertical sliders via iprogress_bar,
ivolume_bar and imixer_bar.
- mixer support (FreeBSD and Linux only. Please send me a mail if
- mixer support (FreeBSD and Linux only. Please send me a mail if
you compile mixer support on other platforms.)
- added -mixer commandline option to specify the mixer device
- themes manual updated
@ -79,21 +79,21 @@
- better WINGs handling. The WINGs window is no longer closed by
the program when CD is ejected.
- [fix] WINGs windows crashed when CD was stopped
- [fix] big bug in database code that oftent crashed the
- [fix] big bug in database code that oftent crashed the
program at startup time (cd_curtrack = -1)
- [fix] bug in the song title scrolling (hardcoded length)
------------- 05/11/99: 0.13pr6
- small updates in the man page (so outdated...)
- the theme manual (in PostScript) is now in the archive and
- the theme manual (in PostScript) is now in the archive and
installed in /usr/local/share/AScd
- added alt pixmap support for eject command
- added database panel which can now be different from message one
- changed the themes loading mechanism: themes are now installed in
/usr/local/share/AScd/Themes. There's also a Default/ dir that can
contain pixmaps. If a pixmap is not found in the theme dir, AScd
also search in the Default dir. By default, this dir contains
also search in the Default dir. By default, this dir contains
digits.xpm and digits2.xpm.
- the theme selectors now use dirent instead of the '.dir' file
- added alt pixmap support for mute command
@ -147,7 +147,7 @@ New features and fixes since 0.12.1:
0.13 fixes and additions:
- the buttons containing no command are no longuer parsed in
- the buttons containing no command are no longuer parsed in
case of mouse events
- support for introscan
- support for fade in/out
@ -158,11 +158,11 @@ New features and fixes since 0.12.1:
------------- 05/07/99: 0.13pr1 **** BACK TO ALPHA STAGE ****
It's the biggest change since I begun working on ascd. Everything
It's the biggest change since I begun working on ascd. Everything
that appears on the screen is now 100% configurable. Put the buttons
you want, where you want!
- major rewrite of AScd. The source code has been splitted in
- major rewrite of AScd. The source code has been splitted in
several smaller C files.
- [bug] the WINGs support shall *not* compile. I didn't have time
to update this code with the new features.
@ -178,7 +178,7 @@ pre-releases.
=====================================================================
------------- 05/02/99: 0.12.1
------------- 05/02/99: 0.12.1
- [fix WINGs] the themes popup didn't display the selected theme
- multiple-mask shape mode, to allow transparent background with
@ -193,7 +193,7 @@ pre-releases.
- added runtime visual themes management, with -theme cl option
- added a popup menu in configuration window to change the visual
theme *without* restarting the program
- [fix] there was a bug in the mouse routine that could eject CD
- [fix] there was a bug in the mouse routine that could eject CD
if the mouse click was outside the buttons
- [fix] a couple of typos in the WINGs windows.
@ -219,13 +219,13 @@ pre-releases.
------------- 04/14/99: 0.11.1
- added lowercase letters in (r)digits.xpm. I had to make a few
- added lowercase letters in (r)digits.xpm. I had to make a few
changes in the background pixmap to display the new letters. I
also added a conversion that remove accents.
- added 2 buttons in WINGs window to switch on/off song name and
artist scrolling in main window.
- added a field to edit the cd device in WINGs window
- [fix] with a songname <= 8 cars, the artist was not shown
- [fix] with a songname <= 8 cars, the artist was not shown
- [fix?] autorepeat
------------- 04/13/99: 0.11.0 RELEASE
@ -331,7 +331,7 @@ is gone again!
- [fix] 0.9 didn't compile if NO_D_DEVICE was defined. Thanks to
Gus Hartmann who found the bug.
- [fix] 0.9 entered a crazy loop at CD end when autorepeat
- [fix] 0.9 entered a crazy loop at CD end when autorepeat
was off.
------------- 01/27/99: 0.9 RELEASE
@ -346,7 +346,7 @@ is gone again!
- [fix] ascd crashed on launch with no cd in tray (since 01/22)
- [fix] up/down buttons didn't work when paused (since 01/22)
- [fix] track nbr was not properly redrawn when using up/down
- [fix] track nbr was not properly redrawn when using up/down
buttons when stopped (since 01/21)
- [fix] window was not properly redrawn when stopped (since 0.8-R)
- [fix] it was not possible to access the last track when stopped
@ -364,13 +364,13 @@ is gone again!
* Ascd:
- 100% new mixer section, with access to all the 17 mixing "sliders"
- 100% new mixer section, with access to all the 17 mixing "sliders"
of OSS.
- the back and foreground colors may now be different for the CD
- the back and foreground colors may now be different for the CD
player and the mixer.
- all the mixer settings can be saved in a ~/.ascdrc file. This file
can be loaded at startup.
- Total rewrite of the command line parse function. Added several
- Total rewrite of the command line parse function. Added several
new commands. See ascd -help for further details.
* Lib:
@ -385,25 +385,25 @@ is gone again!
- Almost total rewrite of cd_control() function. The code should be
more reliable (I hope!). Some clean-ups two.
- no more uses old ascd variables (currenttrack, maxtracks, playing,
- no more uses old ascd variables (currenttrack, maxtracks, playing,
paused). Only the WorkMan ones (cur_track, cur_ntracks, cur_cdmode)
are used.
- on launch, if autoplay is disabled, the track nbr panel displays
how tracks are on the CD instead of "01".
- when the time panel displays the global remaining time of the CD,
- when the time panel displays the global remaining time of the CD,
the track nbr panel displays the number of remaining tracks.
- new alpha pixmaps.
- adjusted timing for checking inserted CD in autoplay mode.
- Middle click on the display switch the mute mode. Muted/Unmuted
- Middle click on the display switch the mute mode. Muted/Unmuted
volumes can be set with 'm' and 'v' command line parameters.
- [fix] in autoplay mode, launching ascd with an inserted audio CD in
drive didn't play this one automatically.
drive didn't play this one automatically.
------------- 01/21/99: PR2
* Ascd:
- The mixer code was removed once again, due to the big XPM code
- The mixer code was removed once again, due to the big XPM code
changes.
- XPM code redesigned: each button has its own XPM file.
@ -412,15 +412,15 @@ is gone again!
* Lib:
- added O_RDONLY | O_NONBLOCK flagsto the cd_device opening function
in plat_linux.c and plat_freebsd.c. Thanks to Jens Axboe
in plat_linux.c and plat_freebsd.c. Thanks to Jens Axboe
(axboe@image.dk)
------------- 12/20/98: PR1
* Lib:
- using WorkMan 1.3b (BETA) code instead of WorkMan 1.3a
- patched plat_freebsd.c to compile under FreeBSD 3.0. Thanks to
- patched plat_freebsd.c to compile under FreeBSD 3.0. Thanks to
Stephane Marzloff (secrer@le-bar.fdn.fr)
- plat_openbsd.c added (WorkMan)
@ -456,7 +456,7 @@ is gone again!
------------- 11/29/98:
- lib should now compile on Solaris 7 with gcc, using a specific
Makefile.
Makefile.
- added NO_D_DEVICE option for Solaris Volume Manager.
------------- 12/01/97:
@ -472,13 +472,13 @@ is gone again!
- 'Config' file where all compilation options can be changed.
can be changed.
- now recognize WorkMan splited tracks. Try it with Prince's
- now recognize WorkMan splited tracks. Try it with Prince's
Lovesexy's album !!
* Ascd:
- ascd now includes asmixer!
- added a "mixer screen" based on asmixer 0.5: clic on
- added a "mixer screen" based on asmixer 0.5: clic on
time display with right button to switch to it.
- added -v, -1, -2, -3 command line parameters for the
mixer screen (same as asmixer). Removed the old -v option.
@ -490,12 +490,12 @@ is gone again!
- changed "-l" option to "-f" ([F]oreground color)
- when CD is ejected, track nbr shows "--".
- all the XPMs are now included in ascd.c, to allow to
define the bg color. I also fixed a few things in the
define the bg color. I also fixed a few things in the
"old and quick made" ascd+ buttons.
- when global time is displayed, clicking on the
progress bar give access to the whole disk.
- added a "#define VERSION" in ascd.c
- added the new options (since 0.7) in the man page
- added the new options (since 0.7) in the man page
=====================================================================
@ -524,7 +524,7 @@ from ascd 0.6
v0.6
- Most important: WindowMaker Dock support with the -w flag!
=====================================================================
03/25/97: 0.4+ release
@ -555,7 +555,7 @@ database code)
- added: 4th digit for songs longer than 10 minutes.
- added: -a command line option. Activates the autoplay mode: ascd
automatically plays the CD when it is inserted.
- added: -c command line option which sets the value, in seconds,
- added: -c command line option which sets the value, in seconds,
for the intro scan mode and the cue/review function.
- changed the indentation in the source code with the auto-
indentation in jed. Sorry ;-)
@ -594,4 +594,4 @@ v0.2
useful with ascdc.
- Now includes the correct README file. Thanks to the
Hundreds of you who caught that. It's nice to know
someone reads these files.
someone reads these files.

View file

@ -7,8 +7,8 @@ considering this code as beta stage one.)
* Visual Themes:
Visual themes are now 100% configurable. A theme consist in a description
file and various pixmaps. You can place any screen element anywhere in the
Visual themes are now 100% configurable. A theme consist in a description
file and various pixmaps. You can place any screen element anywhere in the
window and the icon. Available screen elements:
- pixmaps
@ -24,8 +24,8 @@ considering this code as beta stage one.)
buttons. AScd provides commands to control the general options, the CD
player and the mixer.
AScd is no longer restricted to a "dockable" size. More: In -w mode, it's
now possible to have different screen layouts for the main window and the
AScd is no longer restricted to a "dockable" size. More: In -w mode, it's
now possible to have different screen layouts for the main window and the
icon one
* Mixer support is back (FreeBSD and Linux are the only supported platforms)
@ -115,13 +115,13 @@ New features in ascd 0.9:
* REWRITE of the command line parsing function. Added a few
new options. See the man page or type ascd -help.
* ascd can save and load its settings in ~/.ascdrc file. It
is also possible to save the 17 mixer settings in this file. The
is also possible to save the 17 mixer settings in this file. The
.ascdrc settings can be overidden with the commandline options.
* added drive volume control with a "mute" switch (values
can be changed with commandline options). Note that mute
function controls the CD Drive Volume, and is independant
function controls the CD Drive Volume, and is independant
from the mixer module.
* The LED colors can be changed for the mixer (Config file,
* The LED colors can be changed for the mixer (Config file,
commandline & ~/.ascdrc)
* Autoplay and autorepeat modes redesigned. They should ok now.
(still a few little problems with autoplay detecting)

View file

@ -24,16 +24,16 @@
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL DENIS BOUREZ, ROB MALDA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ===========================================================================
*/
#include "ext.h"
#define MAX_LINE_NAME 16
@ -150,10 +150,10 @@ void fak_validate_pixmap(char *string, char *name)
}
}
void fak_init_theme(int upgrade)
void fak_init_theme(int upgrade)
{
/* re-init all the buttons structure and globals */
int i;
if (debug) fprintf(stderr, "** Init theme variables.\n Buttons...\n");
@ -163,7 +163,7 @@ void fak_init_theme(int upgrade)
thdata[i].panel = 0;
thdata[i].left = 0;
thdata[i].mid = 0;
thdata[i].right = 0;
thdata[i].right = 0;
thdata[i].x = 0;
thdata[i].y = 0;
thdata[i].w = 0;
@ -226,7 +226,7 @@ void fak_init_theme(int upgrade)
}
int fak_load_theme(char *th, int upgrade)
int fak_load_theme(char *th, int upgrade)
{
char txt[256];
char key[256];
@ -308,7 +308,7 @@ struct {
}
} else if (key[0] == '}') {
button = FALSE;
/* update the pointers to msg, counter and tracknbr: */
switch(thdata[but_max].type) {
@ -387,9 +387,9 @@ struct {
}
i = 0;
if ((strcmp(key, "left") == 0) ||
(strcmp(key, "middle") ==0) ||
(strcmp(key, "mid") ==0) ||
if ((strcmp(key, "left") == 0) ||
(strcmp(key, "middle") ==0) ||
(strcmp(key, "mid") ==0) ||
(strcmp(key, "right") == 0)) {
/* --------------- available commands: ---------------- */
@ -519,7 +519,7 @@ struct {
if ((Ret != XpmSuccess) && (debug)) fprintf(stderr, "*!* ");
/* the fonts: */
if (debug) fprintf(stderr, "alpha 1 ");
fak_validate_pixmap(txt, th_alpha1);
@ -533,7 +533,7 @@ struct {
Ret = XpmReadFileToPixmap(Disp, Root, txt, &ralphaXPM.pixmap,
&ralphaXPM.mask, &ralphaXPM.attributes);
if ((Ret != XpmSuccess) && (debug)) fprintf(stderr, "*!* ");
if (debug) fprintf(stderr, "\n-> Loading buttons pixmaps... ");
for (i = 1; i <= but_max; i++) {
if (strlen(thdata[i].xpm_file) > 0) {
@ -569,7 +569,7 @@ struct {
}
}
void fak_icon_text(char *string, unsigned int where, unsigned int col, unsigned int red)
void fak_icon_text(char *string, unsigned int where, unsigned int col, unsigned int red)
{
unsigned int x = 0;
unsigned int offset = 0;
@ -614,15 +614,15 @@ void fak_icon_text(char *string, unsigned int where, unsigned int col, unsigned
if ((strlen(txt) > thdata[icon_msg].w) && (where == MSG_PANEL)) {
txt[thdata[icon_msg].w] = 0;
}
if ((strcmp(txt, "") == 0) && (where == MSG_PANEL)) {
for (x = 1; x <= thdata[icon_msg].w; x++) {
strcat(txt, " ");
}
}
if (red) {
char_max = alphaXPM.attributes.width / 6;
@ -660,16 +660,16 @@ void fak_icon_text(char *string, unsigned int where, unsigned int col, unsigned
if (red) {
XCopyArea(Disp, ralphaXPM.pixmap, Iconwin, WinGC,
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
voffset);
} else {
XCopyArea(Disp, alphaXPM.pixmap, Iconwin, WinGC,
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
voffset);
}
}
}
@ -736,20 +736,20 @@ void fak_text(char *string, unsigned int where, unsigned int col, unsigned int r
if ((strlen(txt) > thdata[but_msg].w) && (where == MSG_PANEL)) {
txt[thdata[but_msg].w] = 0;
}
if ((strlen(txt) > thdata[but_db].w) && (where == DB_PANEL)) {
txt[thdata[but_msg].w] = 0;
}
if ((strcmp(txt, "") == 0) && (where == MSG_PANEL)) {
for (x = 1; x <= thdata[but_msg].w; x++) {
strcat(txt, " ");
}
}
if ((strcmp(txt, "") == 0) && (where == DB_PANEL)) {
for (x = 1; x <= thdata[but_db].w; x++) {
strcat(txt, " ");
@ -792,41 +792,41 @@ void fak_text(char *string, unsigned int where, unsigned int col, unsigned int r
if (red) {
XCopyArea(Disp, ralphaXPM.pixmap, Win, WinGC,
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
voffset);
if (!th_no_icon_window) {
XCopyArea(Disp, ralphaXPM.pixmap, Iconwin, WinGC,
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
voffset);
}
} else {
XCopyArea(Disp, alphaXPM.pixmap, Win, WinGC,
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
voffset);
if (!th_no_icon_window) {
XCopyArea(Disp, alphaXPM.pixmap, Iconwin, WinGC,
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
6 * offset, 0, 6, 9,
hoffset + (col * 6) + (x * 6),
voffset);
}
}
}
}
int fak_flush_expose(Window w)
int fak_flush_expose(Window w)
{
XEvent dummy;
int i=0;
while (XCheckTypedWindowEvent (Disp, w, Expose, &dummy))i++;
return i;
}
}
void fak_minus(void) {
if (th_no_minus) return;
@ -835,20 +835,20 @@ void fak_minus(void) {
if (!th_no_icon_window) {
if (but_counter == 0) return;
XCopyArea(Disp, alphaXPM.pixmap, Win, WinGC,
6 * (45 - 32), 0, 6, 7,
6 * (45 - 32), 0, 6, 7,
thdata[but_counter].x, thdata[but_counter].y);
XCopyArea(Disp, alphaXPM.pixmap, Iconwin, WinGC,
6 * (45 - 32), 0, 6, 7,
6 * (45 - 32), 0, 6, 7,
thdata[but_counter].x, thdata[but_counter].y);
} else {
if (but_counter > 0) {
XCopyArea(Disp, alphaXPM.pixmap, Win, WinGC,
6 * (45 - 32), 0, 6, 7,
6 * (45 - 32), 0, 6, 7,
thdata[but_counter].x, thdata[but_counter].y);
}
if (icon_counter > 0) {
XCopyArea(Disp, alphaXPM.pixmap, Iconwin, WinGC,
6 * (45 - 32), 0, 6, 7,
6 * (45 - 32), 0, 6, 7,
thdata[icon_counter].x, thdata[icon_counter].y);
}
}
@ -856,20 +856,20 @@ void fak_minus(void) {
if (!th_no_icon_window) {
if (but_counter == 0) return;
XCopyArea(Disp, alphaXPM.pixmap, Win, WinGC,
588, 0, 4, 7,
588, 0, 4, 7,
thdata[but_counter].x, thdata[but_counter].y);
XCopyArea(Disp, alphaXPM.pixmap, Iconwin, WinGC,
588, 0, 4, 7,
588, 0, 4, 7,
thdata[but_counter].x, thdata[but_counter].y);
} else {
if (but_counter > 0) {
XCopyArea(Disp, alphaXPM.pixmap, Win, WinGC,
588, 0, 4, 7,
588, 0, 4, 7,
thdata[but_counter].x, thdata[but_counter].y);
}
if (icon_counter > 0) {
XCopyArea(Disp, alphaXPM.pixmap, Iconwin, WinGC,
588, 0, 4, 7,
588, 0, 4, 7,
thdata[icon_counter].x, thdata[icon_counter].y);
}
}
@ -897,7 +897,7 @@ void fak_minus(void) {
582, 0, 4, 4,
thdata[icon_counter].x, thdata[icon_counter].y);
}
}
}
}
}
@ -908,16 +908,16 @@ void fak_singlemask(int i)
if (strlen(thdata[i].xpm_file) > 0) {
if (!th_no_icon_window) {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeSubtract);
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeSubtract);
} else {
if (thdata[i].icon) {
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeSubtract);
} else {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeSubtract);
}
}
@ -925,16 +925,16 @@ void fak_singlemask(int i)
if (strlen(thdata[i].altxpm_file) > 0) {
if (!th_no_icon_window) {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeSubtract);
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeSubtract);
} else {
if (thdata[i].icon) {
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeSubtract);
} else {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeSubtract);
}
}
@ -944,31 +944,31 @@ void fak_singlemask(int i)
if ((fak_use_alt(i)) && (strlen(thdata[i].altxpm_file) > 0)) {
if (!th_no_icon_window) {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeUnion);
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeUnion);
} else {
if (thdata[i].icon) {
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeUnion);
} else {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeUnion);
}
}
} else {
if (!th_no_icon_window) {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeUnion);
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeUnion);
} else {
if (thdata[i].icon) {
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeUnion);
} else {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeUnion);
}
}
@ -982,15 +982,15 @@ void fak_maskset()
if (debug) fprintf(stderr, "** Setting pixmaps mask\n");
if (debug) fprintf(stderr, "-> background\n");
XShapeCombineMask(Disp, Win, ShapeBounding, 0, 0,
XShapeCombineMask(Disp, Win, ShapeBounding, 0, 0,
backXPM.mask, ShapeSet);
if (!th_no_icon_window) {
XShapeCombineMask(Disp, Iconwin, ShapeBounding, 0, 0,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, 0, 0,
backXPM.mask, ShapeSet);
} else {
if (strlen(th_icon_window) > 0) {
XShapeCombineMask(Disp, Iconwin, ShapeBounding, 0, 0,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, 0, 0,
iconXPM.mask, ShapeSet);
}
}
@ -1001,31 +1001,31 @@ void fak_maskset()
if (debug) fprintf(stderr, "%d ", i);
if ((fak_use_alt(i)) && (strlen(thdata[i].altxpm_file) > 0)) {
if (!th_no_icon_window) {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeUnion);
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeUnion);
} else {
if (thdata[i].icon) {
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeUnion);
} else {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].altxpm.mask, ShapeUnion);
}
}
} else {
if (!th_no_icon_window) {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeUnion);
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeUnion);
} else {
if (thdata[i].icon) {
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Iconwin, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeUnion);
} else {
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
XShapeCombineMask(Disp, Win, ShapeBounding, thdata[i].x, thdata[i].y,
thdata[i].xpm.mask, ShapeUnion);
}
}
@ -1061,7 +1061,7 @@ void fak_redraw()
/* ============================================================== */
if (debug) fprintf(stderr, "** Entering redraw routine\n");
if (!blind_mode) {
if ((cur_cdmode == WM_CDM_PLAYING) || (wanna_play)) wm_cd_status();
}
@ -1089,7 +1089,7 @@ void fak_redraw()
cur_track = 0;
redraw = TRUE;
fak_maskset();
}
}
}
/* ======================================================= */
@ -1118,7 +1118,7 @@ void fak_redraw()
}
/* ======================================================================
Do we *really* need to update the counter? If the cur time is the same
Do we *really* need to update the counter? If the cur time is the same
as last time, we simply exit the redraw function
====================================================================== */
@ -1146,7 +1146,7 @@ void fak_redraw()
/* draw the text if we have a query */
/* ================================ */
/* but but but... If we see a "redraw" query,
/* but but but... If we see a "redraw" query,
we skip the text! It will be displayed next time
the function is called... 0.13 */
@ -1157,13 +1157,13 @@ void fak_redraw()
fak_text("", MSG_PANEL, 0, FALSE);
fak_text(led_text, MSG_PANEL, 0, FALSE);
}
if (time(NULL) - text_start > text_timeout) {
text_start = 0;
redraw = TRUE;
strcpy(led_text, "");
fak_text("", MSG_PANEL, 0, FALSE);
} else {
} else {
if (!fade_out) return;
}
}
@ -1201,43 +1201,43 @@ void fak_redraw()
}
}
}
/* the buttons: */
for (i = 1; i <= but_max; i++) {
use_alt = FALSE;
if ((thdata[i].panel == panel) || (thdata[i].panel == 0)) {
if (thdata[i].type == FAK_VCD_BAR) {
if ( (cur_cdmode != WM_CDM_STOPPED) && (cur_cdmode != WM_CDM_EJECTED) ) {
if ((time_mode == 2) || (time_mode == 3)) {
if (cur_cdlen > 0) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
thdata[i].y);
}
}
} else {
if (cur_tracklen > 0) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
thdata[i].y);
}
}
@ -1251,17 +1251,17 @@ void fak_redraw()
offset = (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.height);
offset = thdata[i].xpm.attributes.height - offset;
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
thdata[i].xpm.attributes.height - offset,
thdata[i].x,
thdata[i].x,
thdata[i].y +offset);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
thdata[i].xpm.attributes.height - offset,
thdata[i].x,
thdata[i].x,
thdata[i].y +offset);
}
}
@ -1270,17 +1270,17 @@ void fak_redraw()
offset = (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.height);
offset = thdata[i].xpm.attributes.height - offset;
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
thdata[i].xpm.attributes.height - offset,
thdata[i].x,
thdata[i].x,
thdata[i].y +offset);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
thdata[i].xpm.attributes.height - offset,
thdata[i].x,
thdata[i].x,
thdata[i].y +offset);
}
}
@ -1291,23 +1291,23 @@ void fak_redraw()
if ( (cur_cdmode != WM_CDM_STOPPED) && (cur_cdmode != WM_CDM_EJECTED) ) {
if ((time_mode == 2) || (time_mode == 3)) {
if (cur_cdlen > 0) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
0 + (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.width),
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
0 + (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.width),
thdata[i].xpm.attributes.height, thdata[i].x, thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
0 + (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.width),
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
0 + (int)((float)cur_pos_abs / (float)cur_cdlen * (float)thdata[i].xpm.attributes.width),
thdata[i].xpm.attributes.height, thdata[i].x, thdata[i].y);
}
}
} else {
if (cur_tracklen > 0) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
0 + (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.width),
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
0 + (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.width),
thdata[i].xpm.attributes.height, thdata[i].x, thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
0 + (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.width),
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
0 + (int)((float)cur_pos_rel / (float)cur_tracklen * (float)thdata[i].xpm.attributes.width),
thdata[i].xpm.attributes.height, thdata[i].x, thdata[i].y);
}
}
@ -1320,17 +1320,17 @@ void fak_redraw()
/* erase the old position : */
if (thdata[i].ox > 0) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC,
0, thdata[i].oy,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC,
0, thdata[i].oy,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].x,
thdata[i].x,
thdata[i].oy + thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC,
0, thdata[i].oy,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].x,
thdata[i].x,
thdata[i].oy + thdata[i].y);
}
}
@ -1345,17 +1345,17 @@ void fak_redraw()
/* and show it: */
XCopyArea(Disp, thdata[i].altxpm.pixmap, Win, WinGC,
0, 0,
XCopyArea(Disp, thdata[i].altxpm.pixmap, Win, WinGC,
0, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].x,
thdata[i].x,
thdata[i].y + fx);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].altxpm.pixmap, Iconwin, WinGC,
0, 0,
XCopyArea(Disp, thdata[i].altxpm.pixmap, Iconwin, WinGC,
0, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].x,
thdata[i].x,
thdata[i].y + fx);
}
@ -1367,17 +1367,17 @@ void fak_redraw()
/* erase the old position : */
if (thdata[i].ox > 0) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC,
thdata[i].ox, 0,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC,
thdata[i].ox, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].ox + thdata[i].x,
thdata[i].ox + thdata[i].x,
thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC,
thdata[i].ox, 0,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC,
thdata[i].ox, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].ox + thdata[i].x,
thdata[i].ox + thdata[i].x,
thdata[i].y);
}
}
@ -1392,17 +1392,17 @@ void fak_redraw()
/* and show it: */
XCopyArea(Disp, thdata[i].altxpm.pixmap, Win, WinGC,
0, 0,
XCopyArea(Disp, thdata[i].altxpm.pixmap, Win, WinGC,
0, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].x + fx,
thdata[i].x + fx,
thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].altxpm.pixmap, Iconwin, WinGC,
0, 0,
XCopyArea(Disp, thdata[i].altxpm.pixmap, Iconwin, WinGC,
0, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].x + fx,
thdata[i].x + fx,
thdata[i].y);
}
@ -1411,12 +1411,12 @@ void fak_redraw()
}
} else if (thdata[i].type == FAK_VOL_BAR) {
if ( (cur_cdmode != WM_CDM_STOPPED) && (cur_cdmode != WM_CDM_EJECTED) ) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
0 + (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.width),
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
0 + (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.width),
thdata[i].xpm.attributes.height, thdata[i].x, thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
0 + (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.width),
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
0 + (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.width),
thdata[i].xpm.attributes.height, thdata[i].x, thdata[i].y);
}
}
@ -1426,17 +1426,17 @@ void fak_redraw()
/* first erase the old position : */
if (thdata[i].ox > 0) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC,
thdata[i].ox, 0,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC,
thdata[i].ox, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].ox + thdata[i].x,
thdata[i].ox + thdata[i].x,
thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC,
thdata[i].ox, 0,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC,
thdata[i].ox, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].ox + thdata[i].x,
thdata[i].ox + thdata[i].x,
thdata[i].y);
}
}
@ -1450,17 +1450,17 @@ void fak_redraw()
/* and show it: */
XCopyArea(Disp, thdata[i].altxpm.pixmap, Win, WinGC,
0, 0,
XCopyArea(Disp, thdata[i].altxpm.pixmap, Win, WinGC,
0, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].x + fx,
thdata[i].x + fx,
thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].altxpm.pixmap, Iconwin, WinGC,
0, 0,
XCopyArea(Disp, thdata[i].altxpm.pixmap, Iconwin, WinGC,
0, 0,
thdata[i].altxpm.attributes.width, thdata[i].altxpm.attributes.height,
thdata[i].x + fx,
thdata[i].x + fx,
thdata[i].y);
}
@ -1469,16 +1469,16 @@ void fak_redraw()
}
} else if (thdata[i].type == FAK_VVOL_BAR) {
if ( (cur_cdmode != WM_CDM_STOPPED) && (cur_cdmode != WM_CDM_EJECTED) ) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
thdata[i].y);
}
}
@ -1486,42 +1486,42 @@ void fak_redraw()
if ( (cur_cdmode != WM_CDM_STOPPED) && (cur_cdmode != WM_CDM_EJECTED) ) {
offset = (int)((float)volume / (float)max_volume * (float)thdata[i].xpm.attributes.height);
offset = thdata[i].xpm.attributes.height - offset;
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, offset,
thdata[i].xpm.attributes.width,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, offset,
thdata[i].xpm.attributes.width,
thdata[i].xpm.attributes.height - offset,
thdata[i].x,
thdata[i].x,
thdata[i].y +offset);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, offset,
thdata[i].xpm.attributes.width,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, offset,
thdata[i].xpm.attributes.width,
thdata[i].xpm.attributes.height - offset,
thdata[i].x,
thdata[i].x,
thdata[i].y +offset);
}
}
} else if (thdata[i].type == FAK_MIXER_BAR) {
#ifdef MIXER
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
0 + (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.width),
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
0 + (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.width),
thdata[i].xpm.attributes.height, thdata[i].x, thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
0 + (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.width),
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
0 + (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.width),
thdata[i].xpm.attributes.height, thdata[i].x, thdata[i].y);
}
#endif
} else if (thdata[i].type == FAK_VMIXER_BAR) {
#ifdef MIXER
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
thdata[i].y);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, 0,
thdata[i].xpm.attributes.width,
0 + (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.height),
thdata[i].x,
thdata[i].y);
}
#endif
@ -1529,18 +1529,18 @@ void fak_redraw()
#ifdef MIXER
offset = (int)((float)getvol(thdata[i].arg) / 100.0 * (float)thdata[i].xpm.attributes.height);
offset = thdata[i].xpm.attributes.height - offset;
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC,
0,
offset,
thdata[i].xpm.attributes.width,
XCopyArea(Disp, thdata[i].xpm.pixmap, Win, WinGC,
0,
offset,
thdata[i].xpm.attributes.width,
thdata[i].xpm.attributes.height - offset,
thdata[i].x,
thdata[i].x,
thdata[i].y + offset);
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, offset,
thdata[i].xpm.attributes.width,
XCopyArea(Disp, thdata[i].xpm.pixmap, Iconwin, WinGC, 0, offset,
thdata[i].xpm.attributes.width,
thdata[i].xpm.attributes.height - offset,
thdata[i].x,
thdata[i].x,
thdata[i].y + offset);
}
#endif
@ -1549,7 +1549,7 @@ void fak_redraw()
if (strlen(thdata[i].xpm_file) > 0) {
if (strlen(thdata[i].altxpm_file) == 0) use_alt = FALSE;
else use_alt = fak_use_alt(i);
if (use_alt) {
if (!th_no_icon_window) {
XCopyArea(Disp, thdata[i].altxpm.pixmap, Win, WinGC, 0, 0, thdata[i].xpm.attributes.width, thdata[i].altxpm.attributes.height, thdata[i].x, thdata[i].y);
@ -1578,9 +1578,9 @@ void fak_redraw()
}
}
}
redraw = FALSE;
if (debug) fprintf(stderr, "-> Display [last section]\n");
/* The Track number */
@ -1611,7 +1611,7 @@ void fak_redraw()
fak_text("THEME", COUNTER_PANEL, 0, TRUE);
sprintf(cdtime, "%02d", theme_select);
fak_text(cdtime, TRACK_PANEL, 0, FALSE);
i = 0;
sprintf(txt, "%s/Themes", THDIR);

View file

@ -3,9 +3,9 @@ extern char *tes_xgets(char *, int , FILE *);
extern int fak_parse_line(char *, char *, char *);
extern int fak_use_alt(int);
extern void fak_validate_pixmap(char *, char *);
extern void fak_init_theme(int);
extern int fak_load_theme(char *, int);
extern void fak_icon_text(char *, unsigned int, unsigned int, unsigned int);
extern void fak_init_theme(int);
extern int fak_load_theme(char *, int);
extern void fak_icon_text(char *, unsigned int, unsigned int, unsigned int);
extern void fak_text(char *, unsigned int, unsigned int, unsigned int);
extern int fak_flush_expose(Window);
extern void fak_minus(void);

View file

@ -24,16 +24,16 @@
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL DENIS BOUREZ, ROB MALDA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ===========================================================================
*/
#include "ext.h"
#include "faktory_prot.h"
@ -52,7 +52,7 @@ void theme_select_init()
while((dir_pt = readdir(dir_fd)) != NULL) if (dir_pt->d_name[0] != '.') theme_select_nbr++;
closedir(dir_fd);
}
sprintf(txt, "%s/Themes", THDIR);
if ((dir_fd = opendir(txt)) != NULL) {
i = 0;
@ -290,7 +290,7 @@ void cd_event_handle(int event, XEvent Event)
newtext("Eject");
cd_control(EJECT);
redraw = TRUE;
fak_redraw();
fak_redraw();
break;
case FAK_CD_EJECTQUIT:
fast_track = 0;
@ -325,9 +325,9 @@ void cd_event_handle(int event, XEvent Event)
/* Direct Access:
we have to compute the offset to pass it to cd_control. We also have to
check if we want to move inside the current track or in the whole CD */
if (cur_track < 1) cur_track = 1;
if ((time_mode == 2) || (time_mode == 3)) {
if ((thdata[but_current].type == FAK_CD_BAR) || (thdata[but_current].type == FAK_CD_PIX)) {
direct_access = (int)((float)(Event.xbutton.x - thdata[but_current].x) / (float)thdata[but_current].xpm.attributes.width * (float)cur_cdlen);

View file

@ -24,12 +24,12 @@
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL DENIS BOUREZ, ROB MALDA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ===========================================================================
*/
@ -105,7 +105,7 @@ void save_rc_file()
fprintf(out, "#### generated by AScd version %s ####\n", VERSION);
#ifndef NO_D_DEVICE
fprintf(out, "CD_DEVICE=%s\n", cd_device);
#endif
#endif
fprintf(out, "THEME=%s\n", theme);
fprintf(out, "VISU=%s\n", xv);
fprintf(out, "AUTOREPEAT=%d\n", autorepeat);
@ -141,7 +141,7 @@ void save_rc_file()
}
}
void command_line_help()
void command_line_help()
{
fprintf(stderr, "ascd %s ", VERSION);
#ifdef WMK
@ -183,14 +183,14 @@ void command_line_help()
fprintf(stderr, "-debug Enable debug (verbose) messages on stderr\n");
fprintf(stderr, "-save Save settings and exit. Should be *last* command.\n\n");
exit(0);
}
}
void command_line_err()
void command_line_err()
{
fprintf(stderr, "ascd: bad command line syntax.\n");
fprintf(stderr, "Type 'ascd -help' for a list of command line options.\n");
exit(-1);
}
}
void themes_help()
{
@ -269,7 +269,7 @@ void command_line_parse(int argc, char *argv[]) {
if(++i >= argc) command_line_err();
Geometry = argv[i];
}
else if ((strcmp(Argument + 1, "d") == 0) || (strcmp(Argument + 1, "device") == 0)) {
if(++i >= argc) command_line_err();
cd_device = malloc(strlen(argv[i]) + 1);
@ -402,8 +402,8 @@ void command_line_parse(int argc, char *argv[]) {
}
}
}
}
void quick_reference(int nbr)
{

View file

@ -24,16 +24,16 @@
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL DENIS BOUREZ, ROB MALDA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ===========================================================================
*/
#include "ext.h"
#ifdef MIXER

View file

@ -24,12 +24,12 @@
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL DENIS BOUREZ, ROB MALDA OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ===========================================================================
*/
@ -64,7 +64,7 @@ void close_dbwin(WMWidget *self, void *data) {
strcpy(cd->cdname, WMGetTextFieldText(db_title));
if (strlen(WMGetTextFieldText(db_track)) > 0) {
cd->trk[db_curtrack - 1].songname = malloc(strlen(WMGetTextFieldText(db_track)) + 1);
strcpy(cd->trk[db_curtrack - 1].songname, WMGetTextFieldText(db_track));
strcpy(cd->trk[db_curtrack - 1].songname, WMGetTextFieldText(db_track));
}
save();
@ -76,19 +76,19 @@ void close_dbwin(WMWidget *self, void *data) {
} else {
strcpy(txt, "unknown artist");
}
strcat(txt, "\n");
if (cd->cdname != NULL) {
strcpy(txt2, cd->cdname);
if (strcmp(txt2, "") == 0) strcpy(txt2, "unknown album");
} else {
strcpy(txt2, "unknown album");
}
strcat(txt, txt2);
WMSetButtonText(b_title, txt);
db_en_vue = FALSE;
}
@ -424,8 +424,8 @@ void db_prev_cb(WMWidget *self, void *data) {
WMSetButtonSelected(db_avoid, TRUE);
} else {
WMSetButtonSelected(db_avoid, FALSE);
}
}
WMRealizeWidget(dbwin);
}
@ -460,7 +460,7 @@ void db_next_cb(WMWidget *self, void *data) {
} else {
WMSetButtonSelected(db_avoid, FALSE);
}
WMRealizeWidget(dbwin);
}
@ -682,7 +682,7 @@ void create_big_window(WMScreen *scr) {
WMSetPopUpButtonPullsDown(pop, True);
WMSetPopUpButtonText(pop, "Tracks");
WMAddPopUpButtonItem(pop, "1");
WMSetPopUpButtonAction(pop, track_select, NULL);
WMSetPopUpButtonAction(pop, track_select, NULL);
fr = WMCreateFrame(win);
WMMoveWidget(fr, 10, 75);
@ -750,7 +750,7 @@ void create_big_window(WMScreen *scr) {
WMMoveWidget(pop2, 140, 185);
WMSetPopUpButtonText(pop2, theme);
WMAddPopUpButtonItem(pop2, "1");
WMSetPopUpButtonAction(pop2, theme_pick, NULL);
WMSetPopUpButtonAction(pop2, theme_pick, NULL);
b_help = WMCreateButton(win, 0);
WMResizeWidget(b_help, 80, 18);
@ -887,7 +887,7 @@ void update_track() {
} else {
strcpy(txt, "unknown artist");
}
strcat(txt, "\n");
if (cd->cdname != NULL) {
@ -911,7 +911,7 @@ void update_track() {
}
pistes = cur_ntracks;
if (cur_track >= 1) {
if (cd->trk[cur_track - 1].songname != NULL) {
sprintf(txt, "%s", cd->trk[cur_track - 1].songname);
@ -955,7 +955,7 @@ void big_window(WMScreen *scr) {
WMSetTextFieldText(b_mutedvol, txt);
WMSetTextFieldText(b_device, cd_device);
WMSetSliderMinValue(b_volume, min_volume);
WMSetSliderMaxValue(b_volume, max_volume);
WMSetSliderValue(b_volume, volume);
@ -970,7 +970,7 @@ void big_window(WMScreen *scr) {
WMRemovePopUpButtonItem(pop2, i);
}
/* update the database stuff. AScd 0.13: I deleted all this
/* update the database stuff. AScd 0.13: I deleted all this
stuff from this function as update_track() do the same! */
update_track();

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -102,7 +102,7 @@ struct cdda_block {
#endif
/*
* The following code shouldn't take effect now.
* The following code shouldn't take effect now.
* In 1998, the WorkMan platforms don't support __PDP_ENDIAN
* architectures.
*
@ -111,7 +111,7 @@ struct cdda_block {
#if !WM_LITTLE_ENDIAN
# if !WM_BIG_ENDIAN
# error yet unsupported architecture
foo bar this is to stop the compiler.
foo bar this is to stop the compiler.
# endif
#endif
#endif /* WM_CDDA_H */

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Prototypes from cdinfo.c
*
*
* This is just one more step to a more modular and understandable code.
*/

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Prototypes from cdrom.c
*
*
* This is just one more step to a more modular and understandable code.
*/

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -31,7 +31,7 @@
* names listed below and then set your OS specific options there.
* Don't be surprised, if there are no options for your OS. They aren't
* needed in any case.
*
*
* The default values should produce a functional WorkMan on every
* platform.
*
@ -72,7 +72,7 @@
#define WORKMAN_NAME "LibWorkMan"
#define WORKMAN_VERSION "1.4.0"
/*
* If your CD-ROM drive closes its tray if the device is opened, then
* the next define can make WorkMans "Eject" button an "open/close"
@ -182,7 +182,7 @@
/*
* Uncomment the following line to have WorkMan send SCSI commands
* directly to the CD-ROM drive. If you have a SCSI drive you
* directly to the CD-ROM drive. If you have a SCSI drive you
* probably want this, but it will cause WorkMan to not work on IDE
* drives.
*/
@ -210,7 +210,7 @@
*/
/* #define CURVED_VOLUME */
/*
* Uncomment the following if you want to try out a better responding
* WorkMan, especially with IDE drives. This may work with non-IDE
@ -229,7 +229,7 @@
* fstat() should be used, but I'm too dumb to do so.
*/
#define BSD_MOUNTTEST
#define BSD_MOUNTTEST
#endif /* linux */
@ -353,5 +353,5 @@
#endif /* IBM AIX */
/******************************************************************/
/******************************************************************/
#endif /* WM_CONFIG_H */

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,14 +24,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Prototypes for WorkMan database
*
*
* This is just one more step to a more modular and understandable code.
*/
#define WM_DB_SAVE_ERROR 1
#define WM_DB_SAVE_DISABLED 2
int wm_db_get_playnew( void );
void split_workmandb( void );
int save( void );

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -32,7 +32,7 @@
/*
* LibWorkMan message levels. I'm not sure how to call them all and which
* use they should fulfill. This is not very urgent now, because there
* aren't many messages in LibWorkMan now.
* aren't many messages in LibWorkMan now.
*/
#define WM_MSG_LEVEL_NONE 0
#define WM_MSG_LEVEL_ERROR 1
@ -49,7 +49,7 @@
* Message classes. This is somehow a definition of
* the message's source.
*/
#define WM_MSG_CLASS_PLATFORM 0x010
#define WM_MSG_CLASS_SCSI 0x020
#define WM_MSG_CLASS_CDROM 0x040
@ -66,7 +66,7 @@ extern int wm_lib_verbosity;
#ifdef DEBUG
#define CHECKPOINT(t) fprintf(stderr, "%s (%d): %s\n", __FILE__, __LINE__, t );
#else
#define CHECKPOINT(t)
#define CHECKPOINT(t)
#endif
#ifndef TRUE

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Prototypes for wm_index.c
*
*
* This is just one more step to a more modular and understandable code.
*/

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* The platform interface
*
*
* This is just one more step to a more modular and understandable code.
*/

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,11 +24,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* SCSI prototypes (scsi.c)
*
*
* This is just one more step to a more modular and understandable code.
*/
#include "wm_struct.h"
#include "wm_struct.h"
#define WM_ERR_SCSI_INQUIRY_FAILED -1

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -31,7 +31,7 @@
* Structure for a single track. This is pretty much self-explanatory --
* one of these exists for each track on the current CD.
*/
struct wm_trackinfo
struct wm_trackinfo
{
char *songname; /* Name of song, dynamically allocated */
char *otherdb; /* Unrecognized info for this track */
@ -62,7 +62,7 @@ struct wm_trackinfo
* the total playing time of the playlist (which will usually be overestimated,
* since we don't play leadouts in some cases.)
*/
struct wm_play
struct wm_play
{
int start; /* Start track, or 0 if end of list */
int end; /* last track plus 1 */
@ -74,7 +74,7 @@ struct wm_play
* followed by a zero-terminated list of track numbers to play. The list
* is terminated by a NULL name.
*/
struct wm_playlist
struct wm_playlist
{
char *name; /* Name of this playlist */
int *list; /* List of tracks */
@ -104,7 +104,7 @@ extern struct wm_cdinfo *cd;
struct wm_playlist *new_list();
enum wm_cd_modes
enum wm_cd_modes
{
WM_CDM_UNKNOWN = -1,
WM_CDM_BACK = 0, WM_CDM_TRACK_DONE = 0,
@ -118,7 +118,7 @@ enum wm_cd_modes
/*
* Drive descriptor structure. Used for access to low-level routines.
*/
struct wm_drive
struct wm_drive
{
int fd; /* File descriptor, if used by platform */
char vendor[32]; /* Vendor name */
@ -126,7 +126,7 @@ struct wm_drive
char revision[32]; /* Revision of the drive */
void *aux; /* Pointer to optional platform-specific info */
void *daux; /* Pointer to optional drive-specific info */
int (*init)();
int (*get_trackcount)();
int (*get_cdlen)();

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -31,21 +31,21 @@
/*
* wm_config should always be included first
*/
#include "wm_config.h"
#include "wm_config.h"
#include "workman_defs.h"
#ifdef BUILD_CDDA
#include "wm_cdda.h"
#endif
#endif
#include "wm_cddb.h"
#include "wm_cdinfo.h"
#include "wm_cdrom.h"
#include "wm_database.h"
#include "wm_helpers.h"
#include "wm_index.h"
#include "wm_platform.h"
#include "wm_scsi.h"
#include "wm_struct.h"
#include "wm_cdinfo.h"
#include "wm_cdrom.h"
#include "wm_database.h"
#include "wm_helpers.h"
#include "wm_index.h"
#include "wm_platform.h"
#include "wm_scsi.h"
#include "wm_struct.h"
#endif /* WORKMAN_H */

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
* GNU General Public License for more details.
*
* #defined CONSTANTS
*
*
* Too bad this file seems to be so empty...
*
*/

View file

@ -133,7 +133,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an

View file

@ -6,7 +6,7 @@ XCOMM This file is part of LibWorkMan, the civilized CD player library
XCOMM (c) 1991-1997 by Steven Grimm (original author)
XCOMM (c) by Dirk Försterling (current 'author' = maintainer)
XCOMM The maintainer can be contacted by his e-mail address:
XCOMM milliByte@DeathsDoor.com
XCOMM milliByte@DeathsDoor.com
XCOMM
XCOMM This library is free software; you can redistribute it and/or
XCOMM modify it under the terms of the GNU Library General Public

View file

@ -6,7 +6,7 @@ XCOMM This file is part of LibWorkMan, the civilized CD player library
XCOMM (c) 1991-1997 by Steven Grimm (original author)
XCOMM (c) by Dirk Försterling (current 'author' = maintainer)
XCOMM The maintainer can be contacted by his e-mail address:
XCOMM milliByte@DeathsDoor.com
XCOMM milliByte@DeathsDoor.com
XCOMM
XCOMM This library is free software; you can redistribute it and/or
XCOMM modify it under the terms of the GNU Library General Public
@ -58,8 +58,8 @@ HEADERS= \
include/wm_struct.h \
include/wm_version.h \
include/workman.h \
include/workman_defs.h
include/workman_defs.h
#include <Library.tmpl>

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -27,7 +27,7 @@
*/
static char buildindex_id[] = "$Id: buildindex.c,v 1.2 1999/02/14 09:50:42 dirk Exp $";
#include <stdio.h>
#include <db.h>
#include <fcntl.h>
@ -140,7 +140,7 @@ main(argc, argv)
/* End of file? */
if (feof(fp))
break;
/* Nope. A read error. Unlink the database. */
perror(argv[i]);
(void) unlink(indname);
@ -149,7 +149,7 @@ main(argc, argv)
if (strncmp(buf, "tracks ", 7))
continue;
/*
* Found the start of a record. Figure out the start
* time of the last track and put an entry in the

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -45,7 +45,7 @@
#include "config.h"
#ifdef BUILD_CDDA
static char cddaslave_id[] = "$Id: cddaslave.c,v 1.3 1999/02/14 22:10:24 dirk Exp $";
#include <stdio.h>
@ -509,7 +509,7 @@ main(argc, argv)
*/
continue;
}
if (playing)
{
result = wmcdda_read(cd_fd, cddabuf, cddabuflen,

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -124,14 +124,14 @@ cddb_discid(void)
/* For backward compatibility this algorithm must not change */
for (i = 0; i < thiscd.ntracks; i++) {
n += cddb_sum(thiscd.trk[i].start / 75);
/*
/*
* Just for demonstration (See below)
*
*
* t += (thiscd.trk[i+1].start / 75) -
* (thiscd.trk[i ].start / 75);
*/
*/
}
/*
@ -174,10 +174,10 @@ void
string_makehello(char *line,char delim)
{
char mail[84],*host;
strcpy(mail,cddb.mail_adress);
host=string_split(mail,'@');
sprintf(line,"%shello%c%s%c%s%c%s%c%s",
delim == ' ' ? "cddb " : "&",
delim == ' ' ? ' ' : '=',
@ -197,13 +197,13 @@ connect_open(void)
struct hostent *hp;
struct sockaddr_in soc_in;
int port;
if(cddb.protocol == 3) /* http proxy */
host = strdup(cddb.proxy_server);
else
host = strdup(cddb.cddb_server);
/*
* t=string_split(host,':');
/*
* t=string_split(host,':');
*/
port=atoi(string_split(host,':'));
if(!port)
@ -211,7 +211,7 @@ connect_open(void)
printf("%s:%d\n",host,port);
hp =gethostbyname(host);
if (hp == NULL)
{
static struct hostent def;
@ -219,9 +219,9 @@ connect_open(void)
static char *alist[1];
static char namebuf[128];
int inet_addr();
defaddr.s_addr = inet_addr(host);
if (defaddr.s_addr == -1)
if (defaddr.s_addr == -1)
{
printf("unknown host: %s\n", host);
return (-1);
@ -238,19 +238,19 @@ connect_open(void)
bcopy(hp->h_addr, (char *)&soc_in.sin_addr, hp->h_length);
soc_in.sin_port = htons(port);
Socket = socket(hp->h_addrtype, SOCK_STREAM, 0);
if (Socket < 0)
{
if (Socket < 0)
{
perror("socket");
return (-1);
}
fflush(stdout);
if (connect(Socket, (struct sockaddr *)&soc_in, sizeof (soc_in)) < 0)
{
if (connect(Socket, (struct sockaddr *)&soc_in, sizeof (soc_in)) < 0)
{
perror("connect");
close(Socket);
return (-1);
}
Connection = fdopen(Socket, "r");
return (0);
} /* connect_open() */
@ -261,7 +261,7 @@ connect_open(void)
*/
void
connect_close(void)
{
{
(void)fclose(Connection);
close(Socket);
} /* connect_close() */
@ -273,7 +273,7 @@ void
connect_getline(char *line)
{
char c;
while ((c = getc(Connection)) != '\n')
{
*line = c;
@ -291,21 +291,21 @@ connect_read_entry(void)
{
char type;
int trknr;
char *t,*t2,tempbuf[2000];
while(strcmp(tempbuf,"."))
{
connect_getline(tempbuf);
t=string_split(tempbuf,'=');
if(t != NULL)
{
type=tempbuf[0];
if(strncmp("TITLE",tempbuf+1,5))
continue;
if('D' == type)
{
/*
@ -318,7 +318,7 @@ connect_read_entry(void)
if(*t2 == ' ')
t2++;
strcpy(cd->cdname,t2);
for(t2=t;*t2;t2++)
{
if((*t2 == ' ') && (*(t2+1) == 0))
@ -326,7 +326,7 @@ connect_read_entry(void)
}
strcpy(cd->artist,t);
}
if('T' == type)
{
trknr=atoi(tempbuf+6);
@ -370,7 +370,7 @@ void
http_send(char* line)
{
char tempbuf[2000];
write(Socket, "GET ", 4);
printf("GET ");
if(cddb.protocol == 3)
@ -413,18 +413,18 @@ cddb_request(void)
int i;
char tempbuf[2000];
extern int cur_ntracks;
int status;
char category[20];
unsigned int id;
strcpy(cddb.cddb_server,"localhost:888");
strcpy(cddb.mail_adress,"svolli@bigfoot.com");
/*
* cddb.protocol = 1;
*/
wipe_cdinfo();
switch(cddb.protocol)
{
case 1: /* cddbp */
@ -445,7 +445,7 @@ cddb_request(void)
cddbp_send(tempbuf);
connect_getline(tempbuf);
printf("[%s]\n",tempbuf);
printf("query\n");
sprintf(tempbuf, "cddb query %08x %d",thiscd.cddbid,thiscd.ntracks);
for (i = 0; i < cur_ntracks; i++)
@ -457,7 +457,7 @@ cddb_request(void)
cddbp_send(tempbuf);
connect_getline(tempbuf);
printf("[%s]\n",tempbuf);
status=atoi(tempbuf);
/*
* fprintf(stderr, "status:%d\n",status);
@ -470,7 +470,7 @@ cddb_request(void)
cddbp_read(category,id);
connect_read_entry();
}
if(status == 211) /* Unexact match, multiple possible
* Hack: always use first. */
{
@ -481,7 +481,7 @@ cddb_request(void)
cddbp_read(category,id);
connect_read_entry();
}
cddbp_send("quit");
connect_close();
printf("close\n");
@ -502,7 +502,7 @@ cddb_request(void)
http_send(tempbuf);
connect_getline(tempbuf);
printf("[%s]\n",tempbuf);
status=atoi(tempbuf);
/*
* fprintf(stderr, "status:%d\n",status);
@ -518,7 +518,7 @@ cddb_request(void)
http_read(category,id);
connect_read_entry();
}
if(status == 211) /* Unexact match, multiple possible
* Hack: always use first. */
{

View file

@ -1,11 +1,11 @@
/*
* $Id: cdinfo.c,v 1.6 1999/02/14 16:47:40 dirk Exp $
*
*
* This file is part of WorkMan, the civilized CD player library
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -169,7 +169,7 @@ split_trackinfo( int pos )
if (playlist[i].end > num)
playlist[i].end++;
}
/* Now adjust the information in cd->trk[]. */
cd->trk[num].start = pos;
if (num == cur_ntracks)
@ -194,7 +194,7 @@ split_trackinfo( int pos )
for (i = num + 1; i < cur_ntracks; i++)
if (cd->trk[i].track == cd->trk[num].track)
cd->trk[i].section++;
return (1);
}
@ -214,7 +214,7 @@ remove_trackinfo( int num )
if (num < 1 || num >= cur_ntracks || cd->trk[num].section < 2)
return (0);
cd->trk[num - 1].length += cd->trk[num].length;
for (i = num; i < cur_ntracks - 1; i++)
@ -226,7 +226,7 @@ remove_trackinfo( int num )
cur_firsttrack--;
if (cur_lasttrack > num)
cur_lasttrack--;
/* Update the user-defined playlists. */
if (cd->lists != NULL)
for (l = 0; cd->lists[l].name != NULL; l++)
@ -234,7 +234,7 @@ remove_trackinfo( int num )
for (i = 0; cd->lists[l].list[i]; i++)
if (cd->lists[l].list[i] > num)
cd->lists[l].list[i]--;
/* Update the internal playlist. */
if (playlist != NULL)
for (i = 0; playlist[i].start; i++)
@ -244,7 +244,7 @@ remove_trackinfo( int num )
if (playlist[i].end > num)
playlist[i].end--;
}
cur_ntracks--;
cur_nsections--;
@ -297,12 +297,12 @@ listentry( int num )
digits = 2;
sdigits = cur_nsections < 9 ? -1 : -2;
name = cd->trk[num].songname ? cd->trk[num].songname : "";
if (cur_nsections)
{
if (cd->trk[num].section > 9)
if (cd->trk[num].section > 9)
{
sprintf(tracknum, "%*d.%d", digits,
cd->trk[num].track,
@ -348,7 +348,7 @@ listentry( int num )
char *
trackname( int num )
{
if (num >= 0 && num < cur_ntracks)
if (num >= 0 && num < cur_ntracks)
{
if (cd->trk[num].songname)
{
@ -861,7 +861,7 @@ pl_find_track( int track )
cur_lasttrack = playlist[i].end - 1;
return;
}
/*
* Couldn't find the track in question. Make a special entry with
* just that track.

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -152,7 +152,7 @@ find_drive_struct(char *vendor, char *model, char *rev)
( (d->mod != NULL) && strncmp(d->mod, model, strlen(d->mod)) ) ||
( (d->rev != NULL) && strncmp(d->rev, rev, strlen(d->rev)) ) )
continue;
if (d->proto->vendor[0] == '\0')
strcpy(d->proto->vendor, vendor);
if (d->proto->model[0] == '\0')
@ -255,7 +255,7 @@ read_toc()
thiscd.length = thiscd.trk[thiscd.ntracks].length;
thiscd.cddbid = cddb_discid(drive);
return (&thiscd);
}
@ -404,13 +404,13 @@ wm_cd_status( void )
break;
case WM_CDM_FORWARD:
case WM_CDM_EJECTED:
break;
break;
}
return (ret);
}
#undef CLIF_VOL
#undef CLIF_VOL
#ifdef CLIF_VOL
/*
* cd_volume(vol, bal, max)
@ -432,7 +432,7 @@ cd_volume(vol, bal, max)
/* printf("Vol = %d, Bal = %d, Max = %d\n", vol, bal, max);
*/
vol = (vol * 100 + max - 16) / max;
vol = (vol * 100 + max - 16) / max;
scale = (vol + 5) / 10;
if (bal < 9)
@ -446,7 +446,7 @@ cd_volume(vol, bal, max)
}
else if (bal > 11)
{
#ifdef SYMETRIC_BALANCE
#ifdef SYMETRIC_BALANCE
right = vol + scale * (bal - 10);
#else
right = vol;
@ -536,7 +536,7 @@ wm_cd_pause( void )
wm_cd_play(cur_track, paused_pos,
playlist[cur_listno-1].end);
default: /* */
break;
break;
}
} /* wm_cd_pause() */
@ -559,7 +559,7 @@ wm_cd_stop( void )
cur_track = 1;
}
} /* wm_cd_stop() */
/*
* wm_cd_play_chunk(start, end)
*
@ -641,7 +641,7 @@ wm_cd_eject( void )
return (1);
}
}
if (exit_on_eject)
exit(0);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -107,7 +107,7 @@ split_workmandb( void )
int ndbs, i;
char *home, *wmdb;
int no_rc = 0, no_db = 0;
if (rcfile == NULL)
{
if ((home = getenv("HOME")) != NULL)
@ -115,7 +115,7 @@ split_workmandb( void )
rcfile = malloc(strlen(home) + sizeof(RCFILE));
if (rcfile == NULL)
{
nomem:
perror("split_workmandb()");
exit(1);
@ -149,7 +149,7 @@ nomem:
else
{
static char *emptydb = NULL;
databases = &emptydb;
no_db = 1;
}
@ -163,11 +163,11 @@ nomem:
*home = '\0';
ndbs++;
}
databases = malloc((ndbs + 1) * sizeof(databases[0]));
if (databases == NULL)
goto nomem;
for (i = 0; i < ndbs; i++)
{
databases[i] = wmdb;
@ -571,7 +571,7 @@ chomp:
if (scratch != cd->trk[track].start)
{
sizediff = abs(scratch - cd->trk[track].start);
if (sizediff > fuzz_frames ||
if (sizediff > fuzz_frames ||
(sizediff && scan))
break;
fudge += sizediff;
@ -615,7 +615,7 @@ chomp:
{
getc(fp);
i = getc(fp); /* only first letter is used */
cddb.protocol = i == 'c' ? 1 :
cddb.protocol = i == 'c' ? 1 :
i == 'h' ? 2 : 3 ;
do
i = getc(fp);
@ -631,7 +631,7 @@ chomp:
while (i != '\n' && i != EOF);
else
{
fgets(cddb.cddb_server,
fgets(cddb.cddb_server,
sizeof(cddb.cddb_server), fp);
if ((i = strlen(cddb.cddb_server)))
cddb.cddb_server[i - 1] = '\0';
@ -647,7 +647,7 @@ chomp:
while (i != '\n' && i != EOF);
else
{
fgets(cddb.mail_adress,
fgets(cddb.mail_adress,
sizeof(cddb.mail_adress), fp);
if ((i = strlen(cddb.mail_adress)))
cddb.mail_adress[i - 1] = '\0';
@ -663,7 +663,7 @@ chomp:
while (i != '\n' && i != EOF);
else
{
fgets(cddb.path_to_cgi,
fgets(cddb.path_to_cgi,
sizeof(cddb.path_to_cgi), fp);
if ((i = strlen(cddb.path_to_cgi)))
cddb.path_to_cgi[i - 1] = '\0';
@ -679,7 +679,7 @@ chomp:
while (i != '\n' && i != EOF);
else
{
fgets(cddb.proxy_server,
fgets(cddb.proxy_server,
sizeof(cddb.proxy_server), fp);
if ((i = strlen(cddb.proxy_server)))
cddb.proxy_server[i - 1] = '\0';
@ -705,7 +705,7 @@ chomp:
}
/* If we're searching, skip to the next "tracks" line. */
else if (((searching & 1)|| scan)
else if (((searching & 1)|| scan)
&& !(prefs && firstpos == -1))
SWALLOW_LINE(fp)
@ -759,7 +759,7 @@ chomp:
trackmap[i++] = track++;
else
trackmap[i++] = -1;
if (track == cur_ntracks)
break;
}
@ -838,7 +838,7 @@ chomp:
/*
* nasty bug was here. Was it? BUGBUGBUG
*
* wipe_cdinfo();
* wipe_cdinfo();
*/ trackmap = reset_tracks();
getc(fp); /* lose the space */
@ -853,11 +853,11 @@ chomp:
{
strcpy(cd->cdname, "Probably://");
fgets(cd->cdname + strlen(cd->cdname), sizeof(cd->cdname), fp);
}
else
}
else
{
fgets(cd->cdname, sizeof(cd->cdname), fp);
}
}
if ( (i = strlen(cd->cdname)) )
cd->cdname[i - 1] = '\0';
}
@ -1092,7 +1092,7 @@ load( void )
time(&t1);
printf("%s (%d): search start = %ld\n", __FILE__, __LINE__, t1);
fflush(stdout);
}
}
#endif
dbfile = databases;
@ -1139,7 +1139,7 @@ load( void )
time(&t2);
printf("%s (%d): db search end = %ld, elapsed = %ld\n", __FILE__, __LINE__, t2, t2 - t1);
fflush(stdout);
}
}
#endif
fp = rcfile ? open_rcfile(rcfile, "r") : NULL;
@ -1173,7 +1173,7 @@ load( void )
time(&t2);
printf("%s (%d): search end = %ld, elapsed = %ld\n", __FILE__, __LINE__, t2, t2 - t1);
fflush(stdout);
}
}
#endif
} /* load() */
@ -1242,7 +1242,7 @@ save_globals(FILE *fp)
break;
}
wm_strmcat(&globes, temp);
if(cddb.mail_adress[0])
{
sprintf(temp,"cddbmailadress %s\n",
@ -1340,7 +1340,7 @@ save_globals(FILE *fp)
wm_strmcat(&cdentry, temp);
curpos += strlen(temp);
}
}
}
if (cdentry != NULL)
{

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -128,7 +128,7 @@ unscale_volume(cd_vol, max)
else
bot = vol + 1;
}
/* Might have looked down too far for repeated scaled values */
if (cd_vol < scaled)
vol++;

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -123,7 +123,7 @@ unscale_volume(cd_vol, max)
else
bot = vol + 1;
}
/* Might have looked down too far for repeated scaled values */
if (cd_vol < scaled)
vol++;

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -102,7 +102,7 @@ struct cdda_block {
#endif
/*
* The following code shouldn't take effect now.
* The following code shouldn't take effect now.
* In 1998, the WorkMan platforms don't support __PDP_ENDIAN
* architectures.
*
@ -111,7 +111,7 @@ struct cdda_block {
#if !WM_LITTLE_ENDIAN
# if !WM_BIG_ENDIAN
# error yet unsupported architecture
foo bar this is to stop the compiler.
foo bar this is to stop the compiler.
# endif
#endif
#endif /* WM_CDDA_H */

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Prototypes from cdinfo.c
*
*
* This is just one more step to a more modular and understandable code.
*/

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Prototypes from cdrom.c
*
*
* This is just one more step to a more modular and understandable code.
*/

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -31,7 +31,7 @@
* names listed below and then set your OS specific options there.
* Don't be surprised, if there are no options for your OS. They aren't
* needed in any case.
*
*
* The default values should produce a functional WorkMan on every
* platform.
*
@ -72,7 +72,7 @@
#define WORKMAN_NAME "LibWorkMan"
#define WORKMAN_VERSION "1.4.0"
/*
* If your CD-ROM drive closes its tray if the device is opened, then
* the next define can make WorkMans "Eject" button an "open/close"
@ -182,7 +182,7 @@
/*
* Uncomment the following line to have WorkMan send SCSI commands
* directly to the CD-ROM drive. If you have a SCSI drive you
* directly to the CD-ROM drive. If you have a SCSI drive you
* probably want this, but it will cause WorkMan to not work on IDE
* drives.
*/
@ -210,7 +210,7 @@
*/
/* #define CURVED_VOLUME */
/*
* Uncomment the following if you want to try out a better responding
* WorkMan, especially with IDE drives. This may work with non-IDE
@ -229,7 +229,7 @@
* fstat() should be used, but I'm too dumb to do so.
*/
#define BSD_MOUNTTEST
#define BSD_MOUNTTEST
#endif /* linux */
@ -353,5 +353,5 @@
#endif /* IBM AIX */
/******************************************************************/
/******************************************************************/
#endif /* WM_CONFIG_H */

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,14 +24,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Prototypes for WorkMan database
*
*
* This is just one more step to a more modular and understandable code.
*/
#define WM_DB_SAVE_ERROR 1
#define WM_DB_SAVE_DISABLED 2
int wm_db_get_playnew( void );
void split_workmandb( void );
int save( void );

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -32,7 +32,7 @@
/*
* LibWorkMan message levels. I'm not sure how to call them all and which
* use they should fulfill. This is not very urgent now, because there
* aren't many messages in LibWorkMan now.
* aren't many messages in LibWorkMan now.
*/
#define WM_MSG_LEVEL_NONE 0
#define WM_MSG_LEVEL_ERROR 1
@ -49,7 +49,7 @@
* Message classes. This is somehow a definition of
* the message's source.
*/
#define WM_MSG_CLASS_PLATFORM 0x010
#define WM_MSG_CLASS_SCSI 0x020
#define WM_MSG_CLASS_CDROM 0x040
@ -66,7 +66,7 @@ extern int wm_lib_verbosity;
#ifdef DEBUG
#define CHECKPOINT(t) fprintf(stderr, "%s (%d): %s\n", __FILE__, __LINE__, t );
#else
#define CHECKPOINT(t)
#define CHECKPOINT(t)
#endif
#ifndef TRUE

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Prototypes for wm_index.c
*
*
* This is just one more step to a more modular and understandable code.
*/

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* The platform interface
*
*
* This is just one more step to a more modular and understandable code.
*/

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,11 +24,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* SCSI prototypes (scsi.c)
*
*
* This is just one more step to a more modular and understandable code.
*/
#include "wm_struct.h"
#include "wm_struct.h"
#define WM_ERR_SCSI_INQUIRY_FAILED -1

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -31,7 +31,7 @@
* Structure for a single track. This is pretty much self-explanatory --
* one of these exists for each track on the current CD.
*/
struct wm_trackinfo
struct wm_trackinfo
{
char *songname; /* Name of song, dynamically allocated */
char *otherdb; /* Unrecognized info for this track */
@ -62,7 +62,7 @@ struct wm_trackinfo
* the total playing time of the playlist (which will usually be overestimated,
* since we don't play leadouts in some cases.)
*/
struct wm_play
struct wm_play
{
int start; /* Start track, or 0 if end of list */
int end; /* last track plus 1 */
@ -74,7 +74,7 @@ struct wm_play
* followed by a zero-terminated list of track numbers to play. The list
* is terminated by a NULL name.
*/
struct wm_playlist
struct wm_playlist
{
char *name; /* Name of this playlist */
int *list; /* List of tracks */
@ -104,7 +104,7 @@ extern struct wm_cdinfo *cd;
struct wm_playlist *new_list();
enum wm_cd_modes
enum wm_cd_modes
{
WM_CDM_UNKNOWN = -1,
WM_CDM_BACK = 0, WM_CDM_TRACK_DONE = 0,
@ -118,7 +118,7 @@ enum wm_cd_modes
/*
* Drive descriptor structure. Used for access to low-level routines.
*/
struct wm_drive
struct wm_drive
{
int fd; /* File descriptor, if used by platform */
char vendor[32]; /* Vendor name */
@ -126,7 +126,7 @@ struct wm_drive
char revision[32]; /* Revision of the drive */
void *aux; /* Pointer to optional platform-specific info */
void *daux; /* Pointer to optional drive-specific info */
int (*init)();
int (*get_trackcount)();
int (*get_cdlen)();

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -31,21 +31,21 @@
/*
* wm_config should always be included first
*/
#include "wm_config.h"
#include "wm_config.h"
#include "workman_defs.h"
#ifdef BUILD_CDDA
#include "wm_cdda.h"
#endif
#endif
#include "wm_cddb.h"
#include "wm_cdinfo.h"
#include "wm_cdrom.h"
#include "wm_database.h"
#include "wm_helpers.h"
#include "wm_index.h"
#include "wm_platform.h"
#include "wm_scsi.h"
#include "wm_struct.h"
#include "wm_cdinfo.h"
#include "wm_cdrom.h"
#include "wm_database.h"
#include "wm_helpers.h"
#include "wm_index.h"
#include "wm_platform.h"
#include "wm_scsi.h"
#include "wm_struct.h"
#endif /* WORKMAN_H */

View file

@ -7,7 +7,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
* GNU General Public License for more details.
*
* #defined CONSTANTS
*
*
* Too bad this file seems to be so empty...
*
*/

View file

@ -1,11 +1,11 @@
/*
* $Id: index.c,v 1.2 1999/02/14 09:50:42 dirk Exp $
*
*
* This file is part of WorkMan, the civilized CD player library
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -143,7 +143,7 @@ idx_find_entry( char *file, int ntracks, int *tracks,
dbpos = ntohl(*((unsigned long *) data.data));
if (fseek(text, dbpos, 0))
break;
fgets(tracksline, sizeof(tracksline), text);
if (strncmp(tracksline, "tracks ", 7))
break;
@ -155,7 +155,7 @@ idx_find_entry( char *file, int ntracks, int *tracks,
break;
if (atoi(s) != ntracks)
continue;
for (i = 0; i < ntracks; i++)
{
s = strtok(NULL, " \t");
@ -174,7 +174,7 @@ idx_find_entry( char *file, int ntracks, int *tracks,
val = atoi(s);
if (val + fuzz / 75 < len / 75 || val + fuzz / 75 > len / 75)
continue;
/* XXX - add to sorted list! */
*pos = dbpos;
(index->close)(index);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -24,7 +24,7 @@
*
* plat_aix - AIX 4.x IDE and SCSI support 16 Dec 1998
*
* AIX 4.x Port: Erik O'Shaughnessy
* AIX 4.x Port: Erik O'Shaughnessy
* Original AIX IDE Code: Cloyce Spradling (xmcd libdi_d/aixioc.c )
*
* Taken from the ascd distribution.
@ -64,7 +64,7 @@ int max_volume = 255;
*
* FUNCTION:
*
* RETURNS:
* RETURNS:
*/
int gen_init(struct wm_drive *d){
@ -79,7 +79,7 @@ int gen_init(struct wm_drive *d){
* RETURNS:
*/
int gen_get_trackcount(struct wm_drive *d,int *tracks){
int gen_get_trackcount(struct wm_drive *d,int *tracks){
struct cd_audio_cmd cmd;
cmd.audio_cmds = CD_TRK_INFO_AUDIO;
@ -103,7 +103,7 @@ int gen_get_trackcount(struct wm_drive *d,int *tracks){
* RETURNS:
*/
int gen_get_cdlen(struct wm_drive *d,int *frames){
int gen_get_cdlen(struct wm_drive *d,int *frames){
int tmp;
return gen_get_trackinfo(d,LEADOUT,&tmp,frames);
@ -123,10 +123,10 @@ int gen_get_trackinfo(struct wm_drive *d,int track,int *data,int *startframe){
cmd.msf_flag = 1;
cmd.indexing.track_msf.track = track;
if( ioctl(d->fd,DKAUDIO,&cmd) < 0)
return -1;
*startframe = cmd.indexing.track_msf.mins * 60 * 75 +
cmd.indexing.track_msf.secs * 75 +
cmd.indexing.track_msf.frames;
@ -148,7 +148,7 @@ int gen_get_drive_status(struct wm_drive *d,
enum wm_cd_modes *mode,
int *pos,
int *track,
int *index){
int *index){
struct cd_audio_cmd cmd;
*mode = WM_CDM_EJECTED;
@ -216,7 +216,7 @@ int unscale_volume(int vol,int max){
* RETURNS:
*/
int gen_get_volume(struct wm_drive *d,int *left,int *right){
int gen_get_volume(struct wm_drive *d,int *left,int *right){
struct cd_audio_cmd cmd;
int l,r;
@ -239,12 +239,12 @@ int gen_get_volume(struct wm_drive *d,int *left,int *right){
* RETURNS:
*/
int gen_set_volume(struct wm_drive *d,int left,int right){
int gen_set_volume(struct wm_drive *d,int left,int right){
struct cd_audio_cmd cmd;
cmd.audio_cmds = CD_SET_VOLUME;
cmd.volume_type = CD_VOLUME_CHNLS;
cmd.out_port_0_vol = scale_volume(left,100);
cmd.out_port_1_vol = scale_volume(right,100);
@ -263,9 +263,9 @@ int gen_set_volume(struct wm_drive *d,int left,int right){
* RETURNS:
*/
int gen_pause(struct wm_drive *d){
int gen_pause(struct wm_drive *d){
struct cd_audio_cmd cmd;
cmd.audio_cmds = CD_PAUSE_AUDIO;
return ioctl(d->fd,DKAUDIO,&cmd);
@ -278,7 +278,7 @@ int gen_pause(struct wm_drive *d){
* RETURNS:
*/
int gen_resume(struct wm_drive *d){
int gen_resume(struct wm_drive *d){
struct cd_audio_cmd cmd;
cmd.audio_cmds = CD_RESUME_AUDIO;
@ -292,7 +292,7 @@ int gen_resume(struct wm_drive *d){
* RETURNS:
*/
int gen_stop(struct wm_drive *d){
int gen_stop(struct wm_drive *d){
struct cd_audio_cmd cmd;
cmd.audio_cmds = CD_STOP_AUDIO;
@ -306,7 +306,7 @@ int gen_stop(struct wm_drive *d){
* RETURNS:
*/
int gen_play(struct wm_drive *d,int start,int end){
int gen_play(struct wm_drive *d,int start,int end){
struct cd_audio_cmd cmd;
cmd.audio_cmds = CD_PLAY_AUDIO;
@ -335,7 +335,7 @@ int gen_play(struct wm_drive *d,int start,int end){
* RETURNS:
*/
int gen_eject(struct wm_drive *d){
int gen_eject(struct wm_drive *d){
return ioctl(d->fd,DKEJECT,NULL);
}
@ -408,7 +408,7 @@ int wmcd_open(struct wm_drive *d){
*d = *(find_drive_struct(vendor, model, rev));
wm_drive_settype(vendor, model, rev);
d->fd = fd;
d->init(d);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -49,7 +49,7 @@ static char plat_bsd386_id[] = "$Id: plat_bsd386.c,v 1.5 1999/03/07 08:36:40 dir
#else
/*
* this is for glibc 2.x which defines ust structure in
* ustat.h not stat.h.
* ustat.h not stat.h.
*/
#ifdef __GLIBC__
#include <sys/ustat.h>
@ -377,7 +377,7 @@ unscale_volume(int cd_vol, int max)
else
bot = vol + 1;
}
if (vol < 0)
vol = 0;
else if (vol > max)

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -370,15 +370,15 @@ gen_eject( struct wm_drive *d )
return (-3);
rval = ioctl(d->fd, CDIOCALLOW);
if (rval == 0)
rval = ioctl(d->fd, CDIOCEJECT);
if (rval == 0)
rval = ioctl(d->fd, CDIOCPREVENT);
(void) close(d->fd);
return rval;
}
@ -428,7 +428,7 @@ unscale_volume( int cd_vol, int max )
else
bot = vol + 1;
}
if (vol < 0)
vol = 0;
else if (vol > max)
@ -529,7 +529,7 @@ wmcd_open( struct wm_drive *d )
*d = *(find_drive_struct(vendor, model, rev));
wm_drive_settype(vendor, model, rev);
(d->init)(d);
d->fd = fd;

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -266,7 +266,7 @@ wmcd_open( struct wm_drive *d )
if (d->fd >= 0) /* Device already open? */
return (0);
if (cd_device == NULL)
cd_device = DEFAULT_CD_DEVICE;
@ -317,7 +317,7 @@ wmcd_open( struct wm_drive *d )
wm_scsi_get_drive_type(d, vendor, model, rev);
*d = *(find_drive_struct(vendor, model, rev));
wm_drive_settype(vendor, model, rev);
d->fd = fd;
(d->init)(d);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -32,7 +32,7 @@
*/
#ifdef sgi
static char plat_irix_id[] = "$Id: plat_irix.c,v 1.6 1999/03/07 08:36:40 dirk Exp $";
#include "include/wm_config.h"
@ -440,7 +440,7 @@ wmcd_reopen( struct wm_drive *d )
/*----------------------------------*
* Send a SCSI command out the bus.
*----------------------------------*/
int
int
wm_scsi(d, xcdb, cdblen, retbuf, retbuflen, getreply)
struct wm_drive *d;
unsigned char *xcdb;

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -75,7 +75,7 @@ static char plat_linux_id[] = "$Id: plat_linux.c,v 1.8 1999/06/17 06:48:03 dirk
#define max(a,b) ((a) > (b) ? (a) : (b))
#define WM_MSG_CLASS WM_MSG_CLASS_PLATFORM
#ifdef LINUX_SCSI_PASSTHROUGH
/* this is from <scsi/scsi_ioctl.h> */
# define SCSI_IOCTL_SEND_COMMAND 1
@ -218,10 +218,10 @@ gen_get_trackcount(struct wm_drive *d, int *tracks)
if (ioctl(d->fd, CDROMREADTOCHDR, &hdr))
return (-1);
*tracks = hdr.cdth_trk1;
return (0);
}
}
/*---------------------------------------------------------*
* Get the start time and mode (data or audio) of a track.
@ -236,12 +236,12 @@ gen_get_trackinfo(struct wm_drive *d, int track, int *data, int *startframe)
if (ioctl(d->fd, CDROMREADTOCENTRY, &entry))
return (-1);
*startframe = entry.cdte_addr.msf.minute * 60 * 75 +
entry.cdte_addr.msf.second * 75 +
entry.cdte_addr.msf.frame;
*data = entry.cdte_ctrl & CDROM_DATA_TRACK ? 1 : 0;
return (0);
}
@ -257,7 +257,7 @@ gen_get_cdlen(struct wm_drive *d, int *frames)
}
/* Alarm signal handler.
/* Alarm signal handler.
static void do_nothing(int x) { x++; }
*/
@ -275,7 +275,7 @@ gen_get_drive_status( struct wm_drive *d, enum wm_cd_modes oldmode,
#ifdef SBPCD_HACK
static int prevpos = 0;
#endif
/* If we can't get status, the CD is ejected, so default to that. */
*mode = WM_CDM_EJECTED;
@ -314,7 +314,7 @@ gen_get_drive_status( struct wm_drive *d, enum wm_cd_modes oldmode,
*mode = WM_CDM_TRACK_DONE;
}
}
prevpos = *pos;
#endif
break;
@ -361,10 +361,10 @@ scale_volume( int vol, int max )
{
#ifdef CURVED_VOLUME
return ((max * max - (max - vol) * (max - vol)) *
(max_volume - min_volume) / (max * max) + min_volume);
(max_volume - min_volume) / (max * max) + min_volume);
#else
return ((vol * (max_volume - min_volume)) / max + min_volume);
#endif
#endif
} /* scale_volume() */
#endif
@ -391,7 +391,7 @@ gen_set_volume( struct wm_drive *d, int left, int right )
perror( "MIXER_WRITE" );
return ( -1 );
}
return ( 0 );
return ( 0 );
#else
/* Adjust the volume to make up for the CD-ROM drive's weirdness. */
@ -400,9 +400,9 @@ gen_set_volume( struct wm_drive *d, int left, int right )
v.channel0 = v.channel2 = left < 0 ? 0 : left > 255 ? 255 : left;
v.channel1 = v.channel3 = right < 0 ? 0 : right > 255 ? 255 : right;
return (ioctl(d->fd, CDROMVOLCTRL, &v));
# endif
# endif
}
/*---------------*
@ -451,10 +451,10 @@ gen_play(struct wm_drive *d, int start, int end)
#ifndef FAST_IDE
if (ioctl(d->fd, CDROMSTART))
return (-1);
#endif
#endif
if (ioctl(d->fd, CDROMPLAYMSF, &msf))
return (-2);
return (0);
}
@ -471,7 +471,7 @@ gen_eject(struct wm_drive *d)
struct mntent *mnt;
FILE *fp;
#endif
if (fstat(d->fd, &stbuf) != 0)
return (-2);
@ -484,7 +484,7 @@ gen_eject(struct wm_drive *d)
* This is the same test as in the WorkBone interface.
* I should eliminate it there, because there is no need
* for it in the UI
*/
*/
/* check if drive is mounted (from Mark Buckaway's cdplayer code) */
/* Changed it again (look at XPLAYCD from ???? */
/* It's better to check the device name rather than one device is */
@ -517,7 +517,7 @@ gen_eject(struct wm_drive *d)
* (The tray closed just after ejecting because re-opening the
* device causes the tray to close)
*------------------*/
#ifdef foobar_one
#ifdef foobar_one
extern int intermittent_dev
/*
* Some drives (drivers?) won't recognize a new CD if we leave the
@ -527,9 +527,9 @@ extern int intermittent_dev
{
close(d->fd);
d->fd = -1;
}
}
#endif
return (0);
} /* gen_eject() */
@ -634,7 +634,7 @@ gen_get_volume( struct wm_drive *d, int *left, int *right )
*left = *right = -1;
}
*right = 0x007f & ( vol >> 8 );
*left = 0x007f & vol;
*left = 0x007f & vol;
#else
/* Suns, HPs, Linux, NEWS can't read the volume; oh well */
@ -738,7 +738,7 @@ wm_scsi( struct wm_drive *d, unsigned char *cdb, int cdblen,
else cmdsize += (cdblen + retbuflen);
}
else cmdsize += cdblen;
cmd = malloc(cmdsize);
if (cmd == NULL)
return (-1);
@ -749,7 +749,7 @@ wm_scsi( struct wm_drive *d, unsigned char *cdb, int cdblen,
memcpy(cmd + 2*sizeof(int), cdb, cdblen);
if (retbuf && !getreply)
memcpy(cmd + 2*sizeof(int) + cdblen, retbuf, retbuflen);
if (ioctl(d->fd, SCSI_IOCTL_SEND_COMMAND, cmd))
{
wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "%s: ioctl() failure\n", __FILE__);
@ -759,7 +759,7 @@ wm_scsi( struct wm_drive *d, unsigned char *cdb, int cdblen,
free(cmd);
return (-1);
}
if (retbuf && getreply)
memcpy(retbuf, cmd + 2*sizeof(int), retbuflen);
@ -781,7 +781,7 @@ wmcd_open( struct wm_drive *d )
static int warned = 0;
int retval = 0;
char vendor[32], model[32], rev[32];
if (cd_device == NULL)
cd_device = DEFAULT_CD_DEVICE;
@ -790,7 +790,7 @@ wmcd_open( struct wm_drive *d )
wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "wmcd_open(): [device is open (fd=%d)]\n", d->fd);
return (0);
}
d->fd = open(cd_device, O_RDONLY | O_NONBLOCK);
if (d->fd < 0)
{
@ -830,7 +830,7 @@ wmcd_open( struct wm_drive *d )
/* Can we figure out the drive type? */
wm_scsi_get_drive_type(d, vendor, model, rev);
#endif
*d = *(find_drive_struct(vendor, model, rev));
*d = *(find_drive_struct(vendor, model, rev));
wm_drive_settype(vendor, model, rev);
d->fd = fd;

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -77,7 +77,7 @@ extern int playing;
static int aufd, aucfd;
static int raw_audio = 1; /* Can /dev/audio take 44.1KHz stereo? */
/*
/*
* For fast linear-to-ulaw mapping, we use a lookup table that's generated
* at startup.
*/
@ -408,7 +408,7 @@ wmaudio_state(struct cdda_block *blk)
#define ZEROTRAP /* turn on the trap as per the MIL-STD */
#define BIAS 0x84 /* define the add-in bias for 16 bit samples */
#define CLIP 32635
unsigned char
linear_to_ulaw( sample )
int sample;
@ -431,12 +431,12 @@ int sample;
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7};
int sign, exponent, mantissa;
unsigned char ulawbyte;
/* Get the sample into sign-magnitude. */
sign = (sample >> 8) & 0x80; /* set aside the sign */
if ( sign != 0 ) sample = -sample; /* get magnitude */
if ( sample > CLIP ) sample = CLIP; /* clip the magnitude */
/* Convert from 16 bit linear to ulaw. */
sample = sample + BIAS;
exponent = exp_lut[( sample >> 7 ) & 0xFF];
@ -445,7 +445,7 @@ int sample;
#ifdef ZEROTRAP
if ( ulawbyte == 0 ) ulawbyte = 0x02; /* optional CCITT trap */
#endif
return ulawbyte;
}

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -26,7 +26,7 @@
*/
#include "include/wm_config.h"
#if defined(linux) && defined(BUILD_CDDA) /* { */
static char plat_linux_cdda_id[] = "$Id: plat_linux_cdda.c,v 1.3 1999/03/07 08:36:40 dirk Exp $";
@ -133,7 +133,7 @@ wmcdda_open(char *devname)
{
int fd;
fd = open(devname, 0);
fd = open(devname, 0);
if (fd == -1)
fd = open("/dev/rdsk/c0t6d0s2", 0);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -438,7 +438,7 @@ wmcd_open(d)
wm_scsi_get_drive_type(d, vendor, model, rev);
*d = *(find_drive_struct(vendor, model, rev));
wm_drive_settype(vendor, model, rev);
d->fd = fd;
(d->init)(d);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -21,7 +21,7 @@
* License along with this library; if not, write to the Free
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*
* OpenBSD-specific drive control routines. (Based on plat_freebsd.c)
*
* Michael Shalayeff, 7/24/96
@ -398,7 +398,7 @@ unscale_volume(int cd_vol, int max)
else
bot = vol + 1;
}
if (vol < 0)
vol = 0;
else if (vol > max)
@ -494,7 +494,7 @@ wmcd_open(struct wm_drive *d)
*d = *(find_drive_struct(vendor, model, rev));
wm_drive_settype(vendor, model, rev);
(d->init)(d);
d->fd = fd;

View file

@ -3,7 +3,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -475,7 +475,7 @@ unscale_volume(cd_vol, max)
else
bot = vol + 1;
}
if (vol < 0)
vol = 0;
else if (vol > max)

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -267,7 +267,7 @@ gen_get_trackcount( struct wm_drive *d, int *tracks )
if (ioctl(d->fd, CDROMREADTOCHDR, &hdr))
return (-1);
*tracks = hdr.cdth_trk1;
return (0);
}
@ -285,12 +285,12 @@ gen_get_trackinfo( struct wm_drive *d, int track, int *data, int *startframe)
if (ioctl(d->fd, CDROMREADTOCENTRY, &entry))
return (-1);
*startframe = entry.cdte_addr.msf.minute * 60 * 75 +
entry.cdte_addr.msf.second * 75 +
entry.cdte_addr.msf.frame;
*data = entry.cdte_ctrl & CDROM_DATA_TRACK ? 1 : 0;
return (0);
}
@ -487,7 +487,7 @@ gen_get_drive_status( struct wm_drive *d,
*mode = WM_CDM_TRACK_DONE; /* waiting for next track. */
break;
default:
default:
*mode = WM_CDM_UNKNOWN;
break;
}
@ -509,7 +509,7 @@ gen_set_volume( struct wm_drive *d, int left, int right )
last_right = right;
thecd = d;
#endif
if (cdda_slave > -1)
{
int bal, vol;
@ -854,13 +854,13 @@ wm_scsi( struct wm_drive *d,
cmd.uscsi_flags = USCSI_ISOLATE | USCSI_SILENT;
if (getreply)
cmd.uscsi_flags |= USCSI_READ;
if (ioctl(d->fd, USCSICMD, &cmd))
return (-1);
if (cmd.uscsi_status)
return (-1);
return (0);
}
#else
@ -886,7 +886,7 @@ wmcd_open( struct wm_drive *d )
if (d->fd >= 0) /* Device already open? */
return (0);
d->fd = open(cd_device, 0);
if (d->fd < 0)
{
@ -1050,7 +1050,7 @@ codec_init( void )
ctl_fd = -1;
return(0);
}
if (!(devname = getenv("AUDIODEV"))) devname = "/dev/audio";
ctlname = strcat(strcpy(malloc(strlen(devname) + 4), devname), "ctl");
if ((ctl_fd = open(ctlname, O_WRONLY, 0)) < 0) {
@ -1099,7 +1099,7 @@ codec_init( void )
/*
* now set it up to use it. See audio(7I)
*/
AUDIO_INITINFO(&foo);
foo.record.port = port;
foo.record.balance = foo.play.balance = AUDIO_MID_BALANCE;
@ -1119,7 +1119,7 @@ codec_init( void )
*/
foo.record.gain = (AUDIO_MAX_GAIN * 80) / 100;
foo.play.gain = (AUDIO_MAX_GAIN * 40) / 100;
ioctl(ctl_fd, AUDIO_SETINFO, &foo);
return 0;
}
@ -1133,7 +1133,7 @@ static kick_codec( void ) {
* Open the audio device, not the control device. This
* will fail if someone else has taken it.
*/
if ((dev_fd = open(devname, O_WRONLY|O_NDELAY, 0)) < 0) {
perror(devname);
return -1;
@ -1142,13 +1142,13 @@ static kick_codec( void ) {
AUDIO_INITINFO(&foo);
foo.record.port = port;
foo.monitor_gain = AUDIO_MAX_GAIN;
/* These can only be set on the real device */
foo.play.sample_rate = 44100;
foo.play.channels = 2;
foo.play.precision = 16;
foo.play.encoding = AUDIO_ENCODING_LINEAR;
if ((retval = ioctl(dev_fd, AUDIO_SETINFO, &foo)) < 0)
perror(devname);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -26,7 +26,7 @@
*/
#include "include/wm_config.h"
#if defined(sun) && defined(SYSV) && defined(BUILD_CDDA)
#if defined(sun) && defined(SYSV) && defined(BUILD_CDDA)
static char plat_sun_audio_id[] = "$Id: plat_sun_audio.c,v 1.3 1999/03/07 08:36:41 dirk Exp $";
@ -76,7 +76,7 @@ extern int playing;
static int aufd, aucfd;
static int raw_audio = 1; /* Can /dev/audio take 44.1KHz stereo? */
/*
/*
* For fast linear-to-ulaw mapping, we use a lookup table that's generated
* at startup.
*/
@ -407,7 +407,7 @@ wmaudio_state(struct cdda_block *blk)
#define ZEROTRAP /* turn on the trap as per the MIL-STD */
#define BIAS 0x84 /* define the add-in bias for 16 bit samples */
#define CLIP 32635
unsigned char
linear_to_ulaw( sample )
int sample;
@ -430,12 +430,12 @@ int sample;
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7};
int sign, exponent, mantissa;
unsigned char ulawbyte;
/* Get the sample into sign-magnitude. */
sign = (sample >> 8) & 0x80; /* set aside the sign */
if ( sign != 0 ) sample = -sample; /* get magnitude */
if ( sample > CLIP ) sample = CLIP; /* clip the magnitude */
/* Convert from 16 bit linear to ulaw. */
sample = sample + BIAS;
exponent = exp_lut[( sample >> 7 ) & 0xFF];
@ -444,7 +444,7 @@ int sample;
#ifdef ZEROTRAP
if ( ulawbyte == 0 ) ulawbyte = 0x02; /* optional CCITT trap */
#endif
return ulawbyte;
}

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -133,7 +133,7 @@ wmcdda_open(char *devname)
{
int fd;
fd = open(devname, 0);
fd = open(devname, 0);
if (fd == -1)
fd = open("/dev/rdsk/c0t6d0s2", 0);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -222,7 +222,7 @@ create_cdrom_node(char *dev_name)
}
ccode = access(pass_through, F_OK);
if (ccode < 0)
{
if ((file_des = open(dev_name, O_RDONLY)) < 0)
@ -258,7 +258,7 @@ create_cdrom_node(char *dev_name)
return -1;
}
}
file_des = open( pass_through, O_RDWR);
err = errno;
@ -286,7 +286,7 @@ wmcd_open(d)
if (d->fd >= 0) /* Device already open? */
return (0);
if (cd_device == NULL)
cd_device = DEFAULT_CD_DEVICE;
@ -329,7 +329,7 @@ wmcd_open(d)
}
*d = *(find_drive_struct(vendor, model, rev));
wm_drive_settype(vendor, model, rev);
d->fd = fd;
return (0);
@ -366,7 +366,7 @@ wmcd_reopen( struct wm_drive *d )
/*
* Send a SCSI command out the bus.
*/
int
int
wm_scsi(d, xcdb, cdblen, retbuf, retbuflen, getreply)
struct wm_drive *d;
unsigned char *xcdb;
@ -382,7 +382,7 @@ wm_scsi(d, xcdb, cdblen, retbuf, retbuflen, getreply)
int errno_save;
/* getreply == 1 is read, == 0 is write */
struct sb sb;
struct scs scs;

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -51,7 +51,7 @@ int gen_init(struct wm_drive *d)
*/
int gen_get_trackcount(struct wm_drive *d,int *tracks)
{
{
return (0);
}
@ -66,7 +66,7 @@ int gen_get_cdlen(struct wm_drive *d,int *frames)
return (0);
}
/*
/*
* gen_get_trackinfo()
*
*/
@ -77,7 +77,7 @@ gen_get_trackinfo(struct wm_drive *d,int track,int *data,int *startframe)
return (0);
}
/*
/*
* gen_get_drive_status()
*
*/
@ -88,7 +88,7 @@ int gen_get_drive_status(struct wm_drive *d,
int *pos,
int *track,
int *index)
{
{
return (0);
}
@ -115,7 +115,7 @@ int gen_get_volume(struct wm_drive *d,int *left,int *right)
return (0);
}
/*
/*
* gen_set_volume()
*
*/
@ -125,7 +125,7 @@ int gen_set_volume(struct wm_drive *d,int left,int right)
return (0);
}
/*
/*
* gen_pause()
*
*/
@ -150,7 +150,7 @@ int gen_resume(struct wm_drive *d)
*
*/
int gen_stop(struct wm_drive *d){
int gen_stop(struct wm_drive *d){
return (0);
}
@ -234,7 +234,7 @@ int wmcd_open(struct wm_drive *d)
*d = *(find_drive_struct(vendor, model, rev));
wm_drive_settype(vendor, model, rev);
d->fd = fd;
d->init(d);

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -473,7 +473,7 @@ unscale_volume(cd_vol, max)
else
bot = vol + 1;
}
if (vol < 0)
vol = 0;
else if (vol > max)

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -101,7 +101,7 @@ sendscsi( struct wm_drive *d, void *buf,
case 0:
cdblen = 6;
break;
case 5:
cdb[10] = a10;
cdb[11] = a11;
@ -140,7 +140,7 @@ wm_scsi_mode_sense( struct wm_drive *d, unsigned char page, unsigned char *buf )
page, 0, sizeof(pagebuf), 0,0,0,0,0,0,0);
if (status < 0)
return (status);
/*
* The first byte of the returned data is the transfer length. Then
* two more bytes and the length of whatever header blocks are in
@ -218,7 +218,7 @@ wm_scsi_get_drive_type( struct wm_drive *d, char *vendor,
rev[4] = '\0';
wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "SCSI Inquiry result: [%s|%s|%s]\n", vendor, model, rev);
/* Remove "CD-ROM " from the model. */
if (! strncmp(model, "CD-ROM", 6))
{
@ -288,7 +288,7 @@ wm_scsi2_get_trackinfo(d, track, data, startframe)
0, 0, 0, 0, track, sizeof(buf) / 256,
sizeof(buf) % 256, 0,0,0))
return (-1);
*data = buf[5] & 4 ? 1 : 0;
*startframe = buf[9] * 60 * 75 + buf[10] * 75 + buf[11];
@ -329,12 +329,12 @@ wm_scsi2_get_drive_status(d, oldmode, mode, pos, track, index)
{
/*
* stupid somehow, but necessary this time
*/
*/
switch( wmcd_open( d ) ) {
case -1: /* error */
return (-1);
case 1: /* retry */
return (0);
}
@ -345,7 +345,7 @@ wm_scsi2_get_drive_status(d, oldmode, mode, pos, track, index)
if (sendscsi(d, buf, sizeof(buf), 1, SCMD_READ_SUBCHANNEL, 2, 64, 1,
0, 0, 0, sizeof(buf) / 256, sizeof(buf) % 256, 0,0,0))
return (0);
switch (buf[1]) {
case SUBQ_STATUS_PLAY:
*mode = WM_CDM_PLAYING;
@ -399,11 +399,11 @@ wm_scsi2_get_drive_status(d, oldmode, mode, pos, track, index)
default:
*mode = WM_CDM_UNKNOWN;
#ifdef DEBUG
#ifdef DEBUG
if( getenv( "WORKMAN_DEBUG" ) != NULL )
printf("wm_scsi2_get_drive_status: status is 0x%x\n",
buf[1]);
#endif
#endif
break;
}
@ -521,7 +521,7 @@ wm_scsi2_set_volume(d, left, right)
/* Get the current audio parameters first. */
if (wm_scsi_mode_sense(d, PAGE_AUDIO, mode))
return (-1);
/* Tweak the volume part of the parameters. */
mode[9] = (left * 255) / 100;
mode[11] = (right * 255) / 100;

View file

@ -5,7 +5,7 @@
* (c) 1991-1997 by Steven Grimm (original author)
* (c) by Dirk Försterling (current 'author' = maintainer)
* The maintainer can be contacted by his e-mail address:
* milliByte@DeathsDoor.com
* milliByte@DeathsDoor.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -41,7 +41,7 @@ static char wm_helpers_id[] = "$Id: wm_helpers.c,v 1.7 1999/03/07 08:36:41 dirk
int wm_lib_verbosity = WM_MSG_LEVEL_NONE;
/*
/*
* Some seleced functions of version reporting follow...
*/
@ -52,7 +52,7 @@ int wm_libver_pl( void ){return WM_LIBVER_PL;}
char *wm_libver_name( void )
{
char *s = NULL;
wm_strmcat(&s, WM_LIBVER_NAME);
return s;
} /* wm_libver_name() */
@ -78,9 +78,9 @@ char *wm_libver_string( void )
{
char *s = NULL;
wm_strmcat( &s, wm_libver_name() );
wm_strmcat( &s, " " );
wm_strmcat( &s, wm_libver_number() );
wm_strmcat( &s, wm_libver_name() );
wm_strmcat( &s, " " );
wm_strmcat( &s, wm_libver_number() );
return s;
} /* wm_libver_string() */
@ -203,7 +203,7 @@ void wm_lib_message( unsigned int level, char *fmt, ... )
}
/*
* print it only if level and class are allowed.
*/
*/
if( (level <= vlevel) && (vclass != 0) )
{
va_start(ap, fmt);

View file

@ -1,5 +1,5 @@
#!/bin/sh
echo "Image courtesy of Clemens Krammer <drk@pollux.ikn.tuwien.ac.at>"
echo "Image courtesy of Clemens Krammer <drk@pollux.ikn.tuwien.ac.at>"
echo
cmd='../src/pclock -B../XPM/rolexgmt.xpm -H grey80 --hands-width=2 --hour-hand-length=12 --second-hand-length=18'

View file

@ -101,9 +101,9 @@ CreateWindow(int ac, char *av[])
attributes.valuemask = XpmSize;
result = XpmReadFileToPixmap(display, root, option.background_pixmap,
&back_pm, &mask_pm, &attributes);
if (result != XpmSuccess)
fprintf(stderr, "ERR: trouble loading pixmap\n");
fprintf(stderr, "ERR: trouble loading pixmap\n");
else if (attributes.width != SIZE || attributes.height != SIZE)
fprintf(stderr, "ERR: pixmap must be %dx%d\n", SIZE, SIZE);
else

View file

@ -16,7 +16,7 @@ Some features are:
* Command line options (-h for help)
* Customize the program through config file, command line
options, or on the fly
Files
--------------------------------------------------------------
@ -24,7 +24,7 @@ README This file.
INSTALL Installation instructions.
Changelog Description of changes.
COPYING GNU General Public License Version 2.
Program Usage
--------------------------------------------------------------

View file

@ -1,5 +1,5 @@
LIBDIR = -L/usr/X11R6/lib -L/usr/lib -L/opt/gnome/lib
LIBS = -lXpm -lXext -lX11 -lm -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl
LIBS = -lXpm -lXext -lX11 -lm -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl
CFLAGS = -I/usr/X11R6/include -I/usr/lib/glib/include -I/opt/gnome/include/gtk-1.2 -I/opt/gnome/include/glib-1.2 -I/opt/gnome/lib/glib/include
OBJS = washerDryer.o \
../wmgeneral/wmgeneral.o \

View file

@ -43,7 +43,7 @@ int wdryer_mask_width = 64;
int wdryer_mask_height = 64;
int wInCommandMode = 0; // 0 = default/bell 1 = command
int dInCommandMode = 0;
int dInCommandMode = 0;
int tmp_wInCmdMode = 0;
int tmp_dInCmdMode = 0;
@ -184,7 +184,7 @@ int main (int argc, char *argv[])
//clickable regions
AddMouseRegion (0, 8, 6, 28, 24); //0: washer
AddMouseRegion (1, 32, 6, 52, 24); //1: dryer
AddMouseRegion (1, 32, 6, 52, 24); //1: dryer
AddMouseRegion (2, 6, 26, 57, 57); //2: main area
starttime = time (0);
@ -209,7 +209,7 @@ int main (int argc, char *argv[])
//decrement timer, draw status
if (oldsec < time_struct->tm_sec)
DecrementTimer ();
oldsec = (time_struct->tm_sec);
oldsec = (time_struct->tm_sec);
RedrawWindow ();
@ -275,7 +275,7 @@ int main (int argc, char *argv[])
break;
/***************
* click on main
***************/
***************/
case 2: // main area
//open GUI
configure_washerdryer ();
@ -354,7 +354,7 @@ void DrawStatus(int intProcNum, int intStatus)
copyXPMArea (intXPMx, 64,
3, 30,
8 + intProcNum*5, 27);
intPrevStatus[intProcNum] = intXPMx;
}
}
@ -668,7 +668,7 @@ void destroyAndReloadConfig(GtkWidget* widget)
configure_washerdryer();
}
//destroys window
//destroys window
void destroy (GtkWidget * widget, gpointer data)
{
gtk_main_quit ();
@ -786,7 +786,7 @@ int configure_washerdryer ()
// Add vertical box to main window
gtk_container_add (GTK_CONTAINER (frame), sub_vbox);
gtk_widget_show (sub_vbox);
box2 = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (sub_vbox), box2, TRUE, TRUE, 2);
@ -897,7 +897,7 @@ int configure_washerdryer ()
gtk_box_pack_start (GTK_BOX(innerHbox), buttonChange, FALSE, FALSE, 2);
gtk_widget_show (buttonChange);
sprintf(buffer, " min remaining");
sprintf(buffer, " min remaining");
label = gtk_label_new (buffer);
gtk_misc_set_alignment (GTK_MISC (label), 2, 2);
gtk_box_pack_start (GTK_BOX (innerHbox), label, FALSE, FALSE, 2);
@ -964,7 +964,7 @@ int configure_washerdryer ()
gtk_box_pack_start (GTK_BOX (innerHbox), button, FALSE, FALSE, 4);
gtk_widget_show (button);
}
} //end for

View file

@ -1,4 +1,4 @@
/* Generic single linked list to keep various information
/* Generic single linked list to keep various information
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
@ -61,7 +61,7 @@ INLINE int list_length (LinkedList * list)
return i;
}
/* Return the Nth element of LIST, where N count from zero. If N
/* Return the Nth element of LIST, where N count from zero. If N
larger than the list length, NULL is returned */
INLINE void * list_nth (int index, LinkedList * list)

View file

@ -1,4 +1,4 @@
/* Generic single linked list to keep various information
/* Generic single linked list to keep various information
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Author: Kresten Krab Thorup

View file

@ -1,9 +1,9 @@
/* dock.c- built-in Dock module for WindowMaker
* WindowMaker window manager
*
*
* Copyright (c) 1997 Alfredo K. Kojima
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@ -28,7 +28,7 @@
*----------------------------------------------------------------------
* parse_command--
* Divides a command line into a argv/argc pair.
*----------------------------------------------------------------------
*----------------------------------------------------------------------
*/
#define PRC_ALPHA 0
#define PRC_BLANK 1

View file

@ -17,7 +17,7 @@
* Now supports >256 colors
11/09/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Removed a bug from parse_rcfile. You could
not use "start" in a command if a label was
not use "start" in a command if a label was
also start.
* Changed the needed geometry string.
We don't use window size, and don't support

View file

@ -166,7 +166,7 @@ Description:
cmd-line option : -c <string>
rc-file statement: Window.Button.Command = "<string>"
default value : "xterm -e mail"
item : your mailbox (file => mbox, directory => Maildir)
cmd-line option : -mb <string>
rc-file statement: Mail.MailBox = "<string>"
@ -308,7 +308,7 @@ Porting:
- Sun Solaris 4.0 on Sparc Station 4 and 10
- Sun Solaris 6, 7 and 8 (thanx to Kristian Borum!)
- SunOs 5.7 on Ultra Sparc 5 (thanx to Alessandro!)
...together with Window Maker v0.60.0 or better (or standalone of course) and
libdockapp v0.4.0.

8
wmail/configure vendored
View file

@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@ -1122,7 +1122,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
@ -2088,7 +2088,7 @@ fi
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
cat >> confdefs.h <<\EOF
#define const
#define const
EOF
fi
@ -2331,7 +2331,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi

View file

@ -4,7 +4,7 @@
//
// Copyright 2000~2002, Sven Geisenhainer <sveng@informatik.uni-jena.de>.
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
@ -15,7 +15,7 @@
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@ -46,7 +46,7 @@ void TRACE( const char *fmt, ... )
}
#endif
void ABORT( const char *fmt, ... )
void ABORT( const char *fmt, ... )
{
va_list args;
va_start( args, fmt );
@ -78,7 +78,7 @@ char *MakePathName( const char *dir, const char *file )
fullName = malloc( len1 + len2 + 2 );
else
fullName = malloc( len1 + len2 + 1 );
memcpy( fullName, dir, len1 );
if( dir[len1-1] != '/' )
fullName[len1++] = '/';

View file

@ -4,7 +4,7 @@
//
// Copyright 2000~2002, Sven Geisenhainer <sveng@informatik.uni-jena.de>.
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
@ -15,7 +15,7 @@
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.

View file

@ -4,7 +4,7 @@
//
// Copyright 2000~2002, Sven Geisenhainer <sveng@informatik.uni-jena.de>.
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
@ -15,7 +15,7 @@
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@ -38,7 +38,7 @@
///////////////////////////////////////////////////////////////////////////////
// wmailrc file format
//
//
// # - comment-lines
// Window.Display = "string"
// Window.NonShaped = On|Off
@ -107,7 +107,7 @@ config_t config = {
};
// enumeration names for ticker mode
enumList_t tickerEnum[] =
enumList_t tickerEnum[] =
{
{ "address", TICKER_ADDRESS },
{ "familyname", TICKER_FAMILYNAME },
@ -134,7 +134,7 @@ bool Tokenize( const char *line, const char **id, const char **value )
{
*id = token1;
*value = token2;
return true;
}
}
@ -153,7 +153,7 @@ void AddSenderToSkipList( char *sender )
{
if( !strcmp( *skipName, sender ))
return;
numNames++;
}
@ -228,7 +228,7 @@ void PostProcessConfiguration()
config.display = strdup( WMAIL_DISPLAY );
if( config.runCmd == NULL )
config.runCmd = strdup( WMAIL_CLIENT_CMD );
config.runCmd = strdup( WMAIL_CLIENT_CMD );
if( config.mailBox == NULL )
{
@ -245,12 +245,12 @@ void ReadConfigFile( bool resetConfigStrings )
// free all config strings and reset their pointers if required
if( resetConfigStrings )
ResetConfigStrings();
if(( usersHome = getenv( "HOME" )) != NULL )
{
char *fileName = MakePathName( usersHome, WMAIL_RC_FILE );
FILE *f = fopen( fileName, "rt" );
if( f != NULL )
{
char buf[1024];
@ -260,7 +260,7 @@ void ReadConfigFile( bool resetConfigStrings )
{
const char *id, *value;
unsigned int len;
if( fgets( buf, 1024, f ) == NULL )
break;
@ -268,7 +268,7 @@ void ReadConfigFile( bool resetConfigStrings )
for( len = strlen( buf );
len > 0 && IsWhiteSpace(buf+(--len)); )
*(buf+len) = '\0';
if( !Tokenize( buf, &id, &value ))
continue;
@ -332,7 +332,7 @@ void ReadConfigFile( bool resetConfigStrings )
} else
WARNING( "cfg-file(%i): unrecognized: \"%s\"\n", line, buf );
}
fclose( f );
} else {
TRACE( "unable to open config-file \"%s\"\n", fileName );
@ -355,7 +355,7 @@ bool ReadString( const char *from, unsigned int line, char **to )
{
if( *(trailingQuote-1) != '\\' )
break;
++trailingQuote;
}
@ -367,7 +367,7 @@ bool ReadString( const char *from, unsigned int line, char **to )
// disposing of "to" is up to the caller...
*to = malloc( trailingQuote - from + 1 );
to_c = *to;
for( c = from; c != trailingQuote; ++c ) {
if( *c == '\\' ) {
switch( *(++c) ) {
@ -394,17 +394,17 @@ bool ReadString( const char *from, unsigned int line, char **to )
}
} else
*to_c = *c;
++to_c;
}
*to_c = '\0';
TRACE( "ReadString read \"%s\"\n", *to );
return true;
}
}
WARNING( "cfg-file(%i): invalid string\n" );
return false;
}
@ -428,7 +428,7 @@ bool ReadBool( const char *from, unsigned int line, bool *to )
bool ReadInt( const char *from, unsigned int line, int *to )
{
int value = 0;
if( *from == '0' && (*(from+1) == 'x' || *(from+1) == 'X') ) {
for( from += 2; *from != '\0' && !IsWhiteSpace( from ); ++from )
{
@ -460,7 +460,7 @@ bool ReadInt( const char *from, unsigned int line, int *to )
return false;
}
}
*to = value;
TRACE( "ReadInt read \"%i\"\n", *to );
@ -482,7 +482,7 @@ bool ReadEnum( const char *from, unsigned int line, int *to, const enumList_t *e
}
WARNING( "cfg-file(%i): unknown modifier: \"%s\"\n", line, from );
return false;
}
@ -494,9 +494,9 @@ bool IsWhiteSpace( const char *chr )
const char *SkipWhiteSpaces( const char *str )
{
const char *c;
for( c = str; IsWhiteSpace( c ); ++c )
;
return c;
}

View file

@ -4,7 +4,7 @@
//
// Copyright 2000~2002, Sven Geisenhainer <sveng@informatik.uni-jena.de>.
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
@ -15,7 +15,7 @@
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.

View file

@ -7,7 +7,7 @@
//
// Copyright 2000~2002, Sven Geisenhainer <sveng@informatik.uni-jena.de>.
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
@ -18,7 +18,7 @@
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@ -226,7 +226,7 @@ int main( int argc, char **argv )
if(( usersHome = getenv( "HOME" )) == NULL ) {
WARNING( "HOME environment-variable is not set, placing %s in current directory!\n", WMAIL_CHECKSUM_FILE );
config.checksumFileName = WMAIL_CHECKSUM_FILE;
} else
} else
config.checksumFileName = MakePathName( usersHome, WMAIL_CHECKSUM_FILE );
}
@ -312,7 +312,7 @@ int main( int argc, char **argv )
XStringListToTextProperty( &name, 1, &windowName );
XSetWMName( DADisplay, DAWindow, &windowName );
UpdatePixmap( false );
DAShow();
SetTimer();
@ -421,7 +421,7 @@ void PreparePixmaps( bool freeMem )
DAMakePixmapFromData( chars_xpm, &charsPixmap, NULL, &dummy, &dummy );
DAMakePixmapFromData( numbers_xpm, &numbersPixmap, NULL, &dummy, &dummy );
DAMakePixmapFromData( button_xpm, &buttonPixmap, NULL, &dummy, &dummy );
if( config.useX11Font != NULL )
{
XRectangle clipRect;
@ -445,7 +445,7 @@ void PreparePixmaps( bool freeMem )
XSetClipRectangles( DADisplay, tickerGC, 0, 0, &clipRect, 1, Unsorted );
}
if( config.noshape ) // non-shaped dockapp ?
DASetShape( None );
else
@ -455,7 +455,7 @@ void PreparePixmaps( bool freeMem )
void MarkName( unsigned long checksum )
{
name_t *name;
for( name = names; name != NULL; name = name->next ) {
if( name->checksum == checksum ) {
name->flag |= FLAG_READ;
@ -469,18 +469,18 @@ void MarkName( unsigned long checksum )
void DetermineState()
{
name_t *name;
for( name = names; name != NULL; name = name->next )
if(!( name->flag & FLAG_READ )) {
state = STATE_NEWMAIL;
if( config.cmdOnMail != NULL ) {
int ret = system( config.cmdOnMail );
if( ret == 127 || ret == -1 )
WARNING( "execution of command \"%s\" failed.\n", config.cmdOnMail );
}
break;
}
}
@ -496,7 +496,7 @@ void ReadChecksumFile()
MarkName( checksum );
} else
return;
fclose( f );
}
@ -517,15 +517,15 @@ void WriteChecksumFile( bool writeAll )
return;
TRACE( "\n" );
fclose( f );
fclose( f );
}
void UpdateChecksum( unsigned long *checksum, const char *buf )
{
if( buf != NULL ) {
unsigned int i, len = strlen( buf );
for( i = 0; i < len; ++i )
*checksum += buf[i] << (( i % sizeof(long) ) * 8 );
}
@ -558,7 +558,7 @@ void TimerHandler( int dummy )
else
CheckMBox();
}
UpdatePixmap( checkMail % config.fps < config.fps/2 );
if( ++checkMail >= config.fps * config.checkInterval )
@ -727,7 +727,7 @@ char *FileNameConcat( const char *path, const char *fileName )
name_t *GetMail( unsigned long checksum )
{
name_t *name;
for( name = names; name != NULL; name = name->next )
if( name->checksum == checksum )
return name;
@ -746,7 +746,7 @@ void UpdatePixmap( bool flashMailSymbol )
XCopyArea( DADisplay, mainPixmap, outPixmap, DAGC,
0, 0, 64, 64, 0, 0 );
if( numMails > 999 )
{
XCopyArea( DADisplay, numbersPixmap, outPixmap, DAGC,
@ -879,7 +879,7 @@ void ParseMaildirFile( const char *fileName, unsigned long checksum,
timeStruct.actime = fileStat->st_atime;
timeStruct.modtime = fileStat->st_mtime;
utime( fileName, &timeStruct );
utime( fileName, &timeStruct );
}
char *ParseFromField( char *buf )
@ -918,7 +918,7 @@ char *ParseFromField( char *buf )
state = STATE_QUOTED_FULLNAME;
continue;
case '<':
if( fullName[0] != '\0' &&
if( fullName[0] != '\0' &&
fullName[ strlen( fullName ) - 1 ] == ' ' )
fullName[ strlen( fullName ) - 1 ] = '\0';
state = STATE_ADDRESS;
@ -941,9 +941,9 @@ char *ParseFromField( char *buf )
fullName[ strlen( fullName ) ] = *c;
}
continue;
case STATE_QUOTED_FULLNAME:
switch( *c ) {
case '\\':
fullName[ strlen( fullName ) ] = *(++c);
@ -1064,7 +1064,7 @@ bool SkipSender( char *address )
skipName != NULL && *skipName != NULL; skipName++ )
{
TRACE( "comparing \"%s\" and \"%s\"\n", *skipName, address );
// call libc-fnmatch (wildcard-match :-) !
if( !fnmatch( *skipName, address, 0 )) {
TRACE( "skipping sender \"%s\"\n", *skipName );
@ -1103,7 +1103,7 @@ void RemoveLastName()
void ClearAllNames()
{
name_t *name, *nextName;
for( name = names; name != NULL; name = nextName ) {
nextName = name->next;
@ -1120,7 +1120,7 @@ void ClearAllNames()
void SetMailFlags( flag_t flag )
{
name_t *name;
for( name = names; name != NULL; name = name->next )
name->flag |= flag;
}
@ -1174,7 +1174,7 @@ void DrawTickerBuildinFont()
int leftSpace;
int drawTo;
unsigned char *currentChar;
if( names == NULL )
return;
@ -1201,13 +1201,13 @@ void DrawTickerBuildinFont()
int outChar = (*currentChar < 32 || *currentChar >= 128) ? '?' :
*currentChar;
int charWidth = 57-drawTo >= 14 ? 14 - leftSpace : 57-drawTo;
XCopyArea( DADisplay, charsPixmap, outPixmap, DAGC,
(outChar-32)*14+leftSpace, 0, charWidth, 21, drawTo, 20 );
leftSpace = 0;
drawTo += charWidth;
if( drawTo > 57 )
break;
}
@ -1229,7 +1229,7 @@ void DrawTickerBuildinFont()
}
}
}
void ButtonPressed( int button, int state, int x, int y )
{
if( x >= 35 && x <= 59 && y >= 47 && y <= 59 ) {
@ -1247,7 +1247,7 @@ void ButtonReleased( int button, int state, int x, int y )
if( x >= 35 && x <= 59 && y >= 47 && y <= 59 ) {
int ret = system( config.runCmd );
if( ret == 127 || ret == -1 )
WARNING( "execution of command \"%s\" failed.\n", config.runCmd );
}
@ -1271,7 +1271,7 @@ char *XpmColorLine( const char *colorName, char *colorLine, bool disposeLine )
{
char *newLine = strdup( colorLine );
char *from = strrchr( newLine, '#' );
if( from == NULL && !strcasecmp( &colorLine[ strlen( colorLine ) - 4 ], "none" )) {
// if no # found, it should be a None-color line
free( newLine );
@ -1283,9 +1283,9 @@ char *XpmColorLine( const char *colorName, char *colorLine, bool disposeLine )
if( disposeLine )
free( colorLine );
GetHexColorString( colorName, from+1 );
return newLine;
}

View file

@ -5,6 +5,6 @@ wmAppKill - Changelog
added support for mouse wheel (thanks to Mathieu)
some code cleaning
- 09/28/2000 - v0.1
- 09/28/2000 - v0.1
initial release

View file

@ -1,5 +1,5 @@
wmAppKill requires the libGtop.
wmAppKill requires the libGtop.
Download it at: http://www.home-of-linux.org/gnome/libgtop/
To install wmAppKill :

View file

@ -12,9 +12,9 @@ wmAppKill : wmAppKill.c
install: wmAppKill
install -m 755 wmAppKill /usr/bin/wmAppKill
clean:
$(RM) *.o core tst *~ \#*

View file

@ -2,7 +2,7 @@
wmAppKill v0.2
--------------
wmAppKill is a Window Maker dock applet that lists all your running processes.
wmAppKill is a Window Maker dock applet that lists all your running processes.
You can kill any of them by doubleclicking on their names.
You can specify wich process will be the oldest one of the list.
@ -11,10 +11,10 @@ Type "wmAppKill -h" to get command line options.
Please send comments, bugs, modifications to : rozange@club-internet.fr
Future releases will be holded at:
Future releases will be holded at:
http://internettrash.com/users/beuz/wmappkill.html
Hope you'll enjoy it...
Hope you'll enjoy it...
You might want to check this other cool dockapp from which i started :
wmNetscapeKiller at http://pblumo.free.fr/wmNetscapeKiller

View file

@ -1,7 +1,7 @@
/*
/*
* wmAppKill v0.2 - S.Rozange
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
@ -14,19 +14,19 @@
*
* You should have received a copy of the GNU General Public License
* along with this program (see the file COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA
*
*/
#include <unistd.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/xpm.h>
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
@ -43,15 +43,15 @@
#include <time.h>
#include <signal.h>
#include "fond.xbm"
#include "wmAppKill.xpm"
#include "fond.xbm"
#include "wmAppKill.xpm"
#include "wmAppKill.h"
Display *dpy; /* xlib global vars */
GC gc;
Window win;
Window iconWin;
Pixmap XPM;
Pixmap XPM;
int screen;
_zone *fZone = NULL;
@ -69,7 +69,7 @@ struct timeval timev; /* to detect double-click */
void ZoneCreate(int x, int y, int width, int height, char no)
{
_zone *last;
if (!fZone) {
fZone = (_zone *)malloc(sizeof(_zone));
last = fZone;
@ -93,23 +93,23 @@ char CheckZone(void)
unsigned int mask;
Window root_ret, child_ret;
_zone *curseur = fZone;
XQueryPointer(dpy, iconWin, &root_ret, &child_ret, &popo, &popo, &x, &y, &mask); /* mouse position */
do {
if ((x >= curseur -> x) && (x <= curseur -> x + curseur -> width) && (y >= curseur -> y) && (y <= curseur -> y + curseur -> height))
return curseur -> no;
}
while ((curseur = curseur -> next));
return 0;
}
void GarbageCollector(_desc *garb)
{
_desc *next;
while (garb) {
next = garb -> next;
free(garb);
@ -121,12 +121,12 @@ int CheckProc(pid_t pid)
{
glibtop_proclist bof;
unsigned int *n;
if ((n = glibtop_get_proclist (&bof, GLIBTOP_KERN_PROC_PID , (int64_t)pid)) == NULL) {
glibtop_free(n);
return -1;
}
glibtop_free(n);
return 0;
}
@ -140,43 +140,43 @@ _desc *GetProcList(void) /* create a double linked list */
_desc *lastOne;
_desc *glump;
_desc *res;
if ((n = glibtop_get_proclist (&buf, GLIBTOP_KERN_PROC_UID, (int64_t)getuid())) == NULL) {
fprintf(stderr, "Problem using libgtop\n");
exit(1);
};
nbPr = (int)buf.number;
glump = (_desc *)malloc(sizeof(_desc));
res = glump;
lastOne = NULL;
for (i = nbPr; i; i--){
char *bof;
glibtop_proc_state buf;
glump -> previous = lastOne;
glump -> next = (_desc *)malloc(sizeof(_desc));
glibtop_get_proc_state(&buf, glump -> pid = n[i - 1]);
strcpy(glump -> name, bof = buf.cmd);
if (strlen(glump -> name) > MAX_CHAR)
if (strlen(glump -> name) > MAX_CHAR)
glump -> name[MAX_CHAR] = 0;
lastOne = glump;
glump = glump -> next;
if (procBaseName && !strcmp(bof, procBaseName)) {
procBasePos = i - 1;
procBasePid = n[i - 1];
break;
break;
}
}
lastOne -> next = NULL;
lastProcPid = n[nbPr - 1];
lastProcPid = n[nbPr - 1];
glibtop_free(n);
if (procBaseName && i) gNbProc = nbPr - i + 1; /* procBase has been found */
else { /* procBaseName is null or hasn't been found */
procBaseName = NULL;
@ -184,9 +184,9 @@ _desc *GetProcList(void) /* create a double linked list */
procBasePid = n[0];
gNbProc = nbPr;
}
gNbProcTotal = nbPr;
return res;
}
@ -194,21 +194,21 @@ int CheckProcToRemove(unsigned int *procList, unsigned int procListSize)
{
_desc *curseur = pList, *temp;
int nbProcRemoved = 0, i;
while (curseur) {
for (i = procListSize; i; i--)
if (curseur -> pid == procList[i - 1]) break;
temp = curseur;
curseur = curseur -> next;
if (!i) { /* we didn't find it in proclist, let's remove it */
RemoveProc(temp);
RemoveProc(temp);
gNbProc--;
nbProcRemoved++;
}
}
return nbProcRemoved;
}
@ -217,73 +217,73 @@ int CheckProcToAdd(int pos, unsigned int *procList, unsigned int procListSize)
_desc *glump;
int i, compteur = 0;
glibtop_proc_state buf;
for (i = pos; i < procListSize ; i++){
compteur++;
glump = (_desc *)malloc(sizeof(_desc));
usleep(20000); /* libgtop seems to need a little bit of time */
if (CheckProc(procList[i])) continue; /* checking if the process isn't already dead */
glibtop_get_proc_state(&buf, glump -> pid = procList[i]);
strcpy(glump -> name, buf.cmd);
if (strlen(glump -> name) > MAX_CHAR)
if (strlen(glump -> name) > MAX_CHAR)
glump -> name[MAX_CHAR] = 0;
pList -> previous = glump;
glump -> next = pList;
glump -> previous = NULL;
if (posProc == pList) posProc = glump;
pList = glump;
gNbProc++;
gNbProc++;
gNbProcTotal++;
lastProcPid = glump -> pid;
}
return compteur;
}
int CheckProcChange(void)
{
glibtop_proclist buf;
unsigned int *n;
unsigned int nbPr;
int diffNbProc;
if ((n = glibtop_get_proclist (&buf, GLIBTOP_KERN_PROC_UID, (int64_t)getuid())) == NULL) return -1;
nbPr = (int)buf.number;
if ((nbPr == gNbProcTotal) && (n[nbPr - 1] == lastProcPid)) return 0; /* nothing changed */
if (procBaseName && (n[procBasePos] != procBasePid)) /* some proc killed before the baseproc (=oldest proc) */
{
{
if (CheckProc(procBasePid)) { /* baseproc doesn't exist anymore */
GarbageCollector(pList);
pList = GetProcList(); /* so we create a whole new list */
posProc = pList;
return 1;
}
else
else
while (n[--procBasePos] != procBasePid); /* here we find what's the new pos. of baseproc */
}
diffNbProc = (nbPr - procBasePos) - gNbProc; /* nb of changes after baseproc */
if (diffNbProc == 0 && (n[nbPr - 1] == lastProcPid)){ /* only changes before baseproc */
gNbProcTotal = nbPr;
glibtop_free(n);
return 0;
}
if (diffNbProc > 0 && n[nbPr - diffNbProc - 1] == lastProcPid) /* only proc to add */
CheckProcToAdd(nbPr - diffNbProc, n, nbPr);
else { /* to remove [and to add] */
int nb;
nb = CheckProcToRemove(n, nbPr);
if (nb != -diffNbProc)
if (nb != -diffNbProc)
CheckProcToAdd(nbPr - diffNbProc - 1, n, nbPr);
}
@ -294,15 +294,15 @@ int CheckProcChange(void)
void RemoveProc(_desc *cible)
{
_desc *temp1, *temp2;
_desc *curseur;
int i;
temp1 = cible -> previous;
temp2 = cible -> next;
for (curseur = cible, i = 0; curseur && i != NB_LINE + 1; curseur = curseur -> next, ++i);
for (curseur = cible, i = 0; curseur && i != NB_LINE + 1; curseur = curseur -> next, ++i);
if (!(gNbProc - 1 < NB_LINE) && (i == 2 || i == 3)) { /* the killed proc is near the start of the list */
for (--i, curseur = posProc; i && curseur -> previous; curseur = curseur -> previous, --i);
posProc = curseur;
@ -310,11 +310,11 @@ void RemoveProc(_desc *cible)
else if ((cible == posProc) && (cible -> previous)) {
posProc = cible -> previous;
}
else if ((cible == posProc) && (cible -> next)) {
else if ((cible == posProc) && (cible -> next)) {
posProc = cible -> next;
}
if (temp1) temp1 -> next = temp2;
if (temp1) temp1 -> next = temp2;
else {
pList = temp2;
temp2 -> previous = NULL;
@ -323,14 +323,14 @@ void RemoveProc(_desc *cible)
free(cible);
return;
}
if (temp2) temp2 -> previous = temp1;
else
else
temp1 -> next = NULL;
free(cible);
gNbProcTotal--;
}
void ShowString (int x, int y, char *doudou)
@ -339,7 +339,7 @@ void ShowString (int x, int y, char *doudou)
char c;
while ((c = tolower(doudou[i++]))){
if (c >= 'a' && c <= 'z') {
if (c >= 'a' && c <= 'z') {
XCopyArea(dpy,XPM, win,gc, 1 + (c - 'a') * 6, 10, 5, 8, x, y) ;
XCopyArea(dpy,XPM, iconWin,gc, 1 + (c - 'a') * 6, 10, 5, 8, x, y) ;
x += 6;
@ -348,10 +348,10 @@ void ShowString (int x, int y, char *doudou)
}
void DoExp(){
XClearWindow(dpy, win);
XClearWindow(dpy, iconWin);
XCopyArea(dpy, XPM ,win, gc, 1 + (26) * 6, 10, 6, 8, 5, 51);
XCopyArea(dpy, XPM, iconWin, gc, 1 + (26) * 6, 10, 6, 8, 5, 51);
XCopyArea(dpy, XPM, win, gc, 1 + (27) * 6, 10, 6, 8, 53, 51);
@ -359,12 +359,12 @@ void DoExp(){
XCopyArea(dpy, XPM, win, gc, 106, 0, 28, 8, 17, 50);
XCopyArea(dpy, XPM, iconWin, gc, 106, 0, 28, 8, 17, 50);
DoExpose();
}
void DoExpose() {
int i;
_desc *curseur;
@ -379,7 +379,7 @@ void DoExpose() {
for (y = NB_LINE; y != gNbProc; y--) tabNoProc[y - 1] = -1;
}
else i = NB_LINE;
for (curseur = posProc; i; curseur = curseur -> next, i--)
{
ShowString(X_PROC + 1, Y_PROC + (i - 1) * 10, curseur -> name);
@ -393,36 +393,36 @@ void DoClick(XEvent ev)
static unsigned char firstClick = 0;
_desc *curseur;
char zone, i;
zone = CheckZone();
if (ev.xbutton.button == CLICK_TWO) {
if (ev.xbutton.button == CLICK_TWO) {
DoExpose() ;
}
/* Mouse wheel patch by Mathieu Cuny */
if (ev.xbutton.button == WHEEL_UP && gNbProc > NB_LINE) {
for (i = NB_LINE, curseur = posProc; i; curseur = curseur -> next, i--);
if (curseur) posProc = posProc -> next;
DoExpose();
}
if (ev.xbutton.button == WHEEL_DOWN && posProc -> previous && gNbProc > NB_LINE) {
posProc = posProc -> previous;
DoExpose();
}
/* Mouse wheel patch end */
if (ev.xbutton.button == CLICK_ONE) {
struct timeval temp;
long long nms1;
gettimeofday(&temp, NULL);
nms1 = temp.tv_sec - timev.tv_sec; /* nb sec since last click */
if ((!nms1 || nms1 == 1)){
long long yop = (nms1 * 1000000L) + (temp.tv_usec - timev.tv_usec); /* nb mlsec since last click */
if (firstClick && (yop < DOUBLE_CLICK_DELAY)){ /* we got double click */
@ -430,62 +430,62 @@ void DoClick(XEvent ev)
firstClick = 0;
} else firstClick = 1;
} else firstClick = 1;
timev = temp;
if (zone == UP && !doubleClick && gNbProc > NB_LINE)
{
for (i = NB_LINE, curseur = posProc; i; curseur = curseur -> next, i--);
if (curseur) posProc = posProc -> next;
DoExpose();
}
else if (zone == DOWN && posProc -> previous && !doubleClick && gNbProc > NB_LINE)
{
posProc = posProc -> previous;
DoExpose();
}
else if (zone == UP && doubleClick && gNbProc > NB_LINE)
else if (zone == UP && doubleClick && gNbProc > NB_LINE)
{
for (curseur = pList; curseur -> next; curseur = curseur -> next); /* curseur = end of list */
for (i = NB_LINE - 1; i; curseur = curseur -> previous, i--);
posProc = curseur;
DoExpose();
}
else if (zone == DOWN && doubleClick && gNbProc > NB_LINE)
else if (zone == DOWN && doubleClick && gNbProc > NB_LINE)
{
posProc = pList;
DoExpose();
}
else if (zone > 0 && zone <= NB_LINE && doubleClick && tabNoProc[zone - 1] != -1)
{
kill(tabNoProc[zone - 1], SIGKILL); /* let's kill the mofo */
waitpid(tabNoProc[zone - 1], NULL, 0);
}
if (doubleClick) doubleClick = 0;
}
}
void DoEvents() {
unsigned long long compteur = 0;
XEvent ev ;
XEvent ev ;
for (;;){
if (!compteur){
if (CheckProcChange()) DoExpose();
compteur = UPDATE_NB * DELAY;
}
while(XPending(dpy)){
XNextEvent(dpy,&ev);
while(XPending(dpy)){
XNextEvent(dpy,&ev);
switch(ev.type) {
case Expose : DoExp(); break;
case ButtonPress : DoClick(ev); break;
@ -507,13 +507,13 @@ void PrintUsage(void)
void GetArg(int argc, char *argv[])
{
if (argc == 1) return;
else if (argc == 3 && !strcmp(argv[1], "-n") && argv[2][0] != '-')
procBaseName = strdup(argv[2]);
else if (argc == 2 && !strcmp(argv[1], "-a"))
procBaseName = NULL;
else if (argc == 2 && !strcmp(argv[1], "-h"))
{
PrintUsage();
@ -524,11 +524,11 @@ void GetArg(int argc, char *argv[])
exit(1);
}
}
void CreateDock(int argc, char *argv[]) /* this part comes from http://www.linuxmag-france.org/ */
{
Window root;
XWMHints wmHints;
XWMHints wmHints;
XSizeHints sizeHints;
XClassHint classHint;
Pixmap pixmask;
@ -536,34 +536,34 @@ void CreateDock(int argc, char *argv[]) /* this part comes from http://www.li
unsigned long p_noir;
unsigned int borderWidth = 2;
char *wname = argv[0] ;
dpy = XOpenDisplay(NULL) ;
if(dpy == NULL)
{
fprintf(stderr, "Can't open display\n") ;
exit(1) ;
}
root = RootWindow(dpy,screen);
p_blanc = WhitePixel(dpy,screen) ;
p_noir = BlackPixel(dpy,screen) ;
gc = XDefaultGC(dpy,screen) ;
XSetForeground(dpy, gc, p_noir);
XSetBackground(dpy, gc,p_noir);
sizeHints.x = 0 ;
sizeHints.y = 0 ;
sizeHints.width = 64 ;
sizeHints.height = 64 ;
win = XCreateSimpleWindow(dpy,root,sizeHints.x,sizeHints.y , sizeHints.width, sizeHints.height, borderWidth, p_noir,p_noir) ;
iconWin = XCreateSimpleWindow(dpy,root,sizeHints.x,sizeHints.y,sizeHints.width, sizeHints.height, borderWidth, p_noir,p_noir ) ;
sizeHints.flags = USSize | USPosition ;
XSetWMNormalHints(dpy,win,&sizeHints) ;
wmHints.initial_state = WithdrawnState ;
wmHints.icon_window = iconWin ;
wmHints.icon_window = iconWin ;
wmHints.icon_x = sizeHints.x ;
wmHints.icon_y = sizeHints.y ;
wmHints.window_group = win ;
@ -571,41 +571,41 @@ void CreateDock(int argc, char *argv[]) /* this part comes from http://www.li
XSetWMHints(dpy, win, &wmHints) ;
classHint.res_name = wname ;
classHint.res_class = wname ;
XSetClassHint(dpy, win, &classHint) ;
XSetCommand(dpy,win, argv, argc) ;
pixmask = XCreateBitmapFromData(dpy,win,fond_bits, fond_width, fond_height) ;
XShapeCombineMask(dpy,win,ShapeBounding,0,0,pixmask,ShapeSet) ;
XShapeCombineMask(dpy,iconWin,ShapeBounding, 0, 0, pixmask, ShapeSet) ;
XpmCreatePixmapFromData(dpy,root,wmAppKill_xpm, &XPM, NULL,NULL) ;
XSelectInput(dpy,win, ExposureMask | ButtonPressMask) ;
XSelectInput(dpy,iconWin, ExposureMask | ButtonPressMask) ;
XMapWindow(dpy,win) ;
}
int main(int argc, char *argv[])
{
int i;
GetArg(argc, argv);
glibtop_init();
CreateDock(argc, argv);
gettimeofday(&timev, NULL);
pList = GetProcList();
gettimeofday(&timev, NULL);
pList = GetProcList();
posProc = pList;
ZoneCreate(4, 50, 8, 8, UP);
ZoneCreate(54, 50, 8, 8, DOWN);
for (i = NB_LINE; i; i--)
ZoneCreate(X_PROC + 1, Y_PROC + (i - 1) * 10 + 2, 48, 7, i);
DoEvents();
return 0;
}

View file

@ -1,4 +1,4 @@
#define PROC_DEF "wmaker"
#define PROC_DEF "wmaker"
#define MAX_CHAR 8
#define NB_LINE 4

View file

@ -1,6 +1,6 @@
/* readln.c - Edward H. Flora - ehflora@ksu.edu */
/* Last Modified: 2/24/98 */
/*
/*
* This function reads a string from a file pointed to by fp until a
* new line (EOLN) or an end of file is encountered. It returns a pointer
* to the string. The new line character is included in the string returned
@ -8,10 +8,10 @@
*/
/* EXTERNALS:
******************
******************
* Functions Called:
* Standard Libraries.
*
*
* Header Files Included:
* Standard Includes only.
*/
@ -34,7 +34,7 @@
char *readln(FILE *fp){
char *tmp, *t1, *t2;
int count = 0, s1 = SIZE1;
if((tmp = malloc(SIZE1*sizeof(char))) == NULL)return NULL;
/* If cannot allocate memory */
if((t1 = fgets(tmp, SIZE1, fp)) == NULL){

Some files were not shown because too many files have changed in this diff Show more