Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / audio / xcdplayer / patches / patch-ai
blob576cf637e82c468fbbf42c0d1808d0bc3228f559
1 $NetBSD: patch-ai,v 1.3 1999/09/06 16:37:43 tron Exp $
3 --- logo_setup.c.orig   Tue Jan 12 19:59:46 1993
4 +++ logo_setup.c        Mon Sep  6 18:37:05 1999
5 @@ -28,6 +28,9 @@
6  # include <stdio.h>
7  
8  # include "cdrom_globs.h"
9 +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
10 +# include "cdrom_freebsd.h"
11 +#endif
12  #ifdef sun
13  # include "cdrom_sun.h"
14  #endif
15 @@ -43,6 +46,8 @@
17  void   Done();
19 +extern AppData app_data;
21  static Widget  track_button_widget;
22  static Widget  timer_button_widget;
23  static Widget  volume_scroll_widget;
24 @@ -55,19 +60,19 @@
25  Widget         title_done_widget;
27  static int     vol;
28 +extern void     leds_label_setup();
29 +static void     cb_track_button();
30 +static void     cb_timer_button();
31 +static void     volume_jump_proc();
32 +static void     volume_scroll_proc();
33 +static void     popup_title_dialog();
34 +static void     popdown_title_dialog();
37  void
38  logo_setup(parent_widget)
39         Widget          parent_widget;
40  {
41 -       extern void     leds_label_setup();
42 -       extern void     cb_track_button();
43 -       extern void     cb_timer_button();
44 -       extern void     volume_jump_proc();
45 -       extern void     volume_scroll_proc();
46 -       extern void     popup_title_dialog();
47 -       extern void     popdown_title_dialog();
49         Widget          version_label_widget;
50         char            version_string[80];
52 @@ -126,15 +131,16 @@
54         track_button_update();
56 -       if (display_timer == True)
57 +       if (app_data.display_timer == True) {
58                 timer_button_widget = XtCreateManagedWidget("timerButton",
59                                                            toggleWidgetClass,
60                                                            logo_form_widget,
61                                                            (ArgList) NULL, 0);
63 -       XtAddCallback(timer_button_widget, XtNcallback, cb_timer_button, 0);
65 -       timer_button_update();
66 +               XtAddCallback(timer_button_widget, XtNcallback, 
67 +                            cb_timer_button, 0);
68 +               timer_button_update();
69 +       }
70         thumb_pixmap = XCreateBitmapFromData(XtDisplay(logo_form_widget),
71                                                   rootwin(logo_form_widget),
72                                                   thumb_bits,
73 @@ -171,10 +177,10 @@
75  #ifdef sgi
76         if ((vol = cdrom_get_volume()) == 0) {
77 -               vol = (int) ((MAXVOL - volbase) * 0.75) + volbase;
78 +               vol = (int) ((MAXVOL - app_data.volbase) * 0.75) + app_data.volbase;
79         }
80  #else
81 -       vol = (int) ((MAXVOL - volbase) * 0.75) + volbase;
82 +       vol = (int) ((MAXVOL - app_data.volbase) * 0.75) + app_data.volbase;
83  #endif
84         cdrom_volume(vol, vol); 
85  #ifdef sgi
86 @@ -356,7 +362,7 @@
87         Arg             args[1];
88         Boolean         state;
90 -       if (display_timer == False)
91 +       if (app_data.display_timer == False)
92                 return;
94             if ((cdi.state & CDROM_STATE_PAUSE) == 0)
95 @@ -413,7 +419,7 @@
96         vol = PCT2VAL(*(float *)percent);
97  #else
98         vol = (*(float *) percent) * MAXVOL;
99 -       vol = (vol * volpcent) + volbase;
100 +       vol = (vol * app_data.volpcent) + app_data.volbase;
101  #endif
103         if (vol > MAXVOL)