Репозитории ALT
D: | 2.4.0.cvs20070519-alt0.3 |
5.1: | 2.4.1-alt11.cvs20080708.4 |
4.1: | 2.4.0-alt11.cvs20070909.3 |
4.0: | 2.4.0-alt10.cvs20070909.M40.1 |
Группа :: Видео
Пакет: xdtv
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: xdtv-2.4.cvs20070909-tv_debug.patch
Скачать
Скачать
diff -uNr xawdecode/alevt/alevt_main.c xawdecode-new/alevt/alevt_main.c
--- xawdecode/alevt/alevt_main.c 2007-02-16 01:12:31 +0300
+++ xawdecode-new/alevt/alevt_main.c 2007-09-10 00:47:14 +0400
@@ -29,12 +29,12 @@
// pour de l'analogique un /dev/vbi
// On ne rouvre pas le peripherique on prend celui
// decouvert par XdTV
-//extern int vbifd;
-extern int subtit_fd;
-#define vbifd subtit_fd
+#define mod_vbifd 1;
+int vbifd=mod_vbifd; //bag
+int subtit_fd; //bag
-extern int debug;
+int tv_debug;
// Voir aussi si ceci est adapte pour le DVB. Recuperation des sous titres
// en provenance du DVB et inscustation de ceux ci en (X)OSD sur la chaine courante
@@ -478,7 +478,7 @@
int ret;
request_alevt_stop=0;
ret = pthread_create (&alevt_thread, NULL, alevt_main, (void *) arg);
- if (debug)
+ if (tv_debug)
{
if (ret == 0)
printf ("Alevt started.\n");
@@ -494,7 +494,7 @@
if (grand_father == 0)
{
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Alevt seems to already have been closed !\n");
}
else
@@ -502,12 +502,12 @@
request_alevt_stop = 1;
}
- if (debug)
+ if (tv_debug)
fprintf(stderr, "stop_alevt: waiting for thread to terminate\n");
pthread_join (alevt_thread, &ret);
- if (debug)
+ if (tv_debug)
printf ("Alevt stopped.\n");
}
diff -uNr xawdecode/alevt/capture_sub.c xawdecode-new/alevt/capture_sub.c
--- xawdecode/alevt/capture_sub.c 2006-06-26 11:57:16 +0400
+++ xawdecode-new/alevt/capture_sub.c 2007-09-10 00:47:14 +0400
@@ -48,7 +48,7 @@
static int subno, subtitles_all;
static struct export *fmt;
static char tmpname[] = "/tmp/xdtv_sub_XXXXXX";
-extern int do_command_single(char *);
+extern int do_command_single(char * cmd) {return 0;} // bag
extern int vbifd;
static pthread_t sub_thread;
static int request_sub_stop;
diff -uNr xawdecode/alevt/xdtv_alevt-capall.c xawdecode-new/alevt/xdtv_alevt-capall.c
--- xawdecode/alevt/xdtv_alevt-capall.c 2006-07-01 00:57:37 +0400
+++ xawdecode-new/alevt/xdtv_alevt-capall.c 2007-09-10 00:47:14 +0400
@@ -11,7 +11,7 @@
#include "vbi.h"
#include "export.h"
-int debug = 0;
+int tv_debug = 0;
int vbifd = -1;
/* dummy command to allow compilation... */
diff -uNr xawdecode/alevt/xdtv_alevt-cap.c xawdecode-new/alevt/xdtv_alevt-cap.c
--- xawdecode/alevt/xdtv_alevt-cap.c 2006-06-26 11:57:16 +0400
+++ xawdecode-new/alevt/xdtv_alevt-cap.c 2007-09-10 00:47:14 +0400
@@ -14,11 +14,11 @@
#include "export.h"
int vbifd = -1;
-int debug = 0;
+int tv_debug = 0;
static volatile int timed_out = 0;
/* dummy command to allow compilation... */
-int do_command_single(char * cmd) {return 0;}
+extern int do_command_single(char * cmd) {return 0;}
struct req
{
@@ -107,7 +107,7 @@
static void
sig_handler(int sig)
{
- if (debug)
+ if (tv_debug)
write(2, "*BREAK*\r\n", 9);
timed_out = 1;
}
@@ -199,7 +199,7 @@
if (req->pgno == vtp->pgno)
if (req->subno == ANY_SUB || req->subno == vtp->subno)
{
- if (debug)
+ if (tv_debug)
printf("captured page %x.%02x\n", vtp->pgno,
vtp->subno);
*req->vtp = *vtp;
@@ -253,7 +253,7 @@
printf("Copyright 2000 by E. Toernig, froese@gmx.de\n");
exit(0);
case 4: // debug
- debug++;
+ tv_debug++;
break;
case 5: // vbi
vbi_name = arg;
diff -uNr xawdecode/alevt/xdtv_alevt-date.c xawdecode-new/alevt/xdtv_alevt-date.c
--- xawdecode/alevt/xdtv_alevt-date.c 2006-06-26 11:57:16 +0400
+++ xawdecode-new/alevt/xdtv_alevt-date.c 2007-09-10 00:47:14 +0400
@@ -15,7 +15,7 @@
#include "misc.h"
int vbifd = -1;
-int debug = 0;
+int tv_debug = 0;
/* dummy command to allow compilation... */
int do_command_single(char * cmd) {return 0;}
diff -uNr xawdecode/src/alevtparams_ui.c xawdecode-new/src/alevtparams_ui.c
--- xawdecode/src/alevtparams_ui.c 2007-02-25 20:49:07 +0300
+++ xawdecode-new/src/alevtparams_ui.c 2007-09-10 00:47:14 +0400
@@ -70,7 +70,7 @@
extern Widget app_shell, c_alevt;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
extern int xawpopup;
extern int real_alevt_in_use;
@@ -153,7 +153,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (alevtparams_shell), XtWindow (alevtparams_shell), NULL, 0);
return;
@@ -217,7 +217,7 @@
ALI(LAB_WIDTH3,translate("Finetune Mode")),
int_to_str (alevt_finetune_mode, auto_manual_list));
XtVaSetValues (c_finetune_mode, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Finetune mode: %d\n",alevt_finetune_mode);
if (int_to_str (alevt_finetune_mode, auto_manual_list) == translate("Auto") || int_to_str (alevt_finetune_mode, auto_manual_list) == translate("None"))
diff -uNr xawdecode/src/aop-common.c xawdecode-new/src/aop-common.c
--- xawdecode/src/aop-common.c 2006-02-14 18:48:38 +0300
+++ xawdecode-new/src/aop-common.c 2007-09-10 00:47:14 +0400
@@ -18,7 +18,7 @@
#include "audio.h"
#include "memcpy.h"
#include "mixer.h"
-extern int debug;
+extern int tv_debug;
extern divx_t divx;
aop2 *last_aop=NULL;
@@ -167,7 +167,7 @@
#else
ret = pthread_create (&aop_thread, NULL, aop_main, NULL);
#endif
- if (debug) fprintf(stderr, "aop thread started\n");
+ if (tv_debug) fprintf(stderr, "aop thread started\n");
}
/* function run to quit properly */
@@ -269,7 +269,7 @@
}
free(cmdline);
- if(debug) {
+ if(tv_debug) {
aop2 *a=last_aop;
fprintf(stderr, "AUDIO_OPERATIONS : ");
while(a!=NULL) {
diff -uNr xawdecode/src/aop.h xawdecode-new/src/aop.h
--- xawdecode/src/aop.h 2004-09-19 18:15:39 +0400
+++ xawdecode-new/src/aop.h 2007-09-10 00:47:14 +0400
@@ -33,6 +33,6 @@
int is_aop_running(void);
void aop_wait_write_audio(void);
void aop_close(void);
-extern int aop_sizebuffer, debug;
+extern int aop_sizebuffer, tv_debug;
#endif
diff -uNr xawdecode/src/aop-test.c xawdecode-new/src/aop-test.c
--- xawdecode/src/aop-test.c 2005-08-12 03:25:01 +0400
+++ xawdecode-new/src/aop-test.c 2007-09-10 00:47:14 +0400
@@ -5,12 +5,12 @@
#include "audio.h"
#include "aop.h"
#include "memcpy.h"
-extern int debug;
+extern int tv_debug;
/********* AOP COPY ***************************************/
static void treat_copy(unsigned char *dest, unsigned char *src, int l) {
- if(debug>1) fprintf(stderr, "audio_treat_copy %p %p\n", dest, src);
+ if(tv_debug>1) fprintf(stderr, "audio_treat_copy %p %p\n", dest, src);
fast_memcpy(dest, src, l);
}
@@ -29,7 +29,7 @@
static void treat_demo(unsigned char *dest, unsigned char *src, int l) {
unsigned short *d,*s;
int i,j;
- if(debug>1) fprintf(stderr, "audio_treat_copy %p %p\n", dest, src);
+ if(tv_debug>1) fprintf(stderr, "audio_treat_copy %p %p\n", dest, src);
for(i=0;i+N<=l;i+=N) {
d=(unsigned short*)(dest+i);
s=(unsigned short *)(src+i);
diff -uNr xawdecode/src/audio-alsa.c xawdecode-new/src/audio-alsa.c
--- xawdecode/src/audio-alsa.c 2006-12-25 19:34:13 +0300
+++ xawdecode-new/src/audio-alsa.c 2007-09-10 00:47:14 +0400
@@ -21,7 +21,7 @@
#include <stdio.h>
#include "audio.h"
-extern int debug;
+extern int tv_debug;
/* "default" (in general equivalent to "hw:0,0")
depends on /usr/share/alsa/alsa.conf:/etc/asound.conf:~/.asoundrc
@@ -115,7 +115,7 @@
}
if(mode==AUDIO_RW) {
if(rate_in != rate_out) {
- if(debug)
+ if(tv_debug)
fprintf(stderr, "ALSA RATE_IN=%d RATE_OUT=%d\n",rate_in, rate_out);
if(rate_out != freq) {
rate_in = rate_out;
@@ -128,7 +128,7 @@
fprintf(stderr,"call to alsa_configure() failed\n");
}
}
- if(debug)
+ if(tv_debug)
fprintf(stderr, "ALSA RATE_IN=%d RATE_OUT=%d\n",rate_in, rate_out);
}
}
@@ -145,7 +145,7 @@
else
sizefmt=2*nchannels;
- if(debug) {
+ if(tv_debug) {
snd_output_t *log;
snd_output_stdio_attach(&log, stderr, 0);
if(mode&AUDIO_RO) {
@@ -178,17 +178,17 @@
nbframes= n/sizefmt;
while (1) {
snd_pcm_state_t state = snd_pcm_state(handle_in);
- if(debug>=2) fprintf(stderr,"state read=%d\n", state);
+ if(tv_debug>=2) fprintf(stderr,"state read=%d\n", state);
if (state == SND_PCM_STATE_XRUN ||
state == SND_PCM_STATE_SUSPENDED) {
- if(debug) fprintf(stderr, "alsa_read: snd_pcm_prepare\n");
+ if(tv_debug) fprintf(stderr, "alsa_read: snd_pcm_prepare\n");
ret = snd_pcm_prepare(handle_in);
- if(debug>=2) fprintf(stderr, "ret_prepare ret=%d\n", ret);
+ if(tv_debug>=2) fprintf(stderr, "ret_prepare ret=%d\n", ret);
if (ret < 0)
break;
}
ret = snd_pcm_readi (handle_in, buf, nbframes);
- if(debug>=2) fprintf(stderr,"ret_readi=%d\n",ret);
+ if(tv_debug>=2) fprintf(stderr,"ret_readi=%d\n",ret);
if (ret != -EPIPE && ret != -ESTRPIPE)
break;
}
@@ -207,17 +207,17 @@
while (1) {
snd_pcm_state_t state = snd_pcm_state(handle_out);
- if(debug>=2) fprintf(stderr,"state write=%d\n", state);
+ if(tv_debug>=2) fprintf(stderr,"state write=%d\n", state);
if (state == SND_PCM_STATE_XRUN ||
state == SND_PCM_STATE_SUSPENDED) {
- if(debug) fprintf(stderr, "alsa_write: snd_pcm_prepare\n");
+ if(tv_debug) fprintf(stderr, "alsa_write: snd_pcm_prepare\n");
ret = snd_pcm_prepare(handle_out);
- if(debug>=2) fprintf(stderr, "ret_prepare write=%d\n",ret);
+ if(tv_debug>=2) fprintf(stderr, "ret_prepare write=%d\n",ret);
if (ret < 0)
break;
}
ret = snd_pcm_writei(handle_out, buf, nbframes);
- if(debug>=2) fprintf(stderr, "ret_writei=%d\n",ret);
+ if(tv_debug>=2) fprintf(stderr, "ret_writei=%d\n",ret);
if (ret != -EPIPE && ret != -ESTRPIPE)
break;
}
diff -uNr xawdecode/src/channel.c xawdecode-new/src/channel.c
--- xawdecode/src/channel.c 2007-04-30 21:25:12 +0400
+++ xawdecode-new/src/channel.c 2007-09-10 00:47:14 +0400
@@ -1254,10 +1254,10 @@
else if (0 == count && 0 == strcmp (tag, "xosd_main_font"))
{
font = strdup(val);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Main font = %s\n",font);
get_font_infos (font, main_font, main_size);
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"Main font type = %s\n",main_font);
fprintf(stderr,"Main font size = %s\n",main_size);
}
@@ -1265,10 +1265,10 @@
else if (0 == count && 0 == strcmp (tag, "xosd_vtx_font"))
{
font_vtx = strdup(val);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Teletext font = %s\n",font_vtx);
get_font_infos (font_vtx, vtx_font, vtx_size);
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"Teletext font type = %s\n",vtx_font);
fprintf(stderr,"Teletext font size = %s\n",vtx_size);
}
@@ -1281,14 +1281,14 @@
fprintf(stderr, "ev config event:%s\n", tag);
sscanf(tag, "%s", mytag);
strcpy(map, val);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "map:%s\n", map);
event_register(mytag, map, 0);
}
else if (0 == count && 0 == strcmp (tag, "repeat"))
{
sscanf(val, "%d", &rate);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "repeat_rate:%d\n", rate);
change_repeat_last_registered(rate);
}
diff -uNr xawdecode/src/colorspace.c xawdecode-new/src/colorspace.c
--- xawdecode/src/colorspace.c 2005-08-12 03:25:01 +0400
+++ xawdecode-new/src/colorspace.c 2007-09-10 00:47:14 +0400
@@ -31,7 +31,7 @@
#include "colorspace.h"
#include "memcpy.h"
#include "strtab.h"
-extern int debug;
+extern int tv_debug;
struct STRTAB video_fmt_names[] = {
{VIDEO_RGB03,"rgb3"},
@@ -676,7 +676,7 @@
void* convert1(char *src, video_fmt f_src, video_fmt f_dest,
int width, int height) {
static void *bufs[MAX_VIDEO_FMT];
- if(debug>=2)
+ if(tv_debug>=2)
fprintf(stderr, "convert1 %s -> %s %dx%d\n",
int_to_str (f_src,video_fmt_names),
int_to_str (f_dest,video_fmt_names), width, height);
@@ -793,7 +793,7 @@
}
} while(i0!=-1);
}
- if(debug>=2) {
+ if(tv_debug>=2) {
fprintf(stderr, "conversion costs:\n");
for(i=1;i<MAX_VIDEO_FMT;i++)
for(j=1;j<MAX_VIDEO_FMT;j++)
@@ -818,7 +818,7 @@
int width, int height) {
int size;
convertf2 *c;
- if(debug>=2) {
+ if(tv_debug>=2) {
fprintf(stderr, "convert2 %s -> %s %dx%d\n",
int_to_str (f_src,video_fmt_names),
int_to_str (f_dest,video_fmt_names), width, height);
@@ -858,7 +858,7 @@
int setpreferred(int available[], video_fmt prefered[]) {
int i;
video_fmt def=0;
- if(debug) fprintf(stderr, "*** asked for prefered conversions ***\n");
+ if(tv_debug) fprintf(stderr, "*** asked for prefered conversions ***\n");
for(i=1;i<MAX_VIDEO_FMT;i++)
if(available[i]) {def=i; break;}
if(def==0) return 0;
@@ -870,10 +870,10 @@
cost=convert_cost(j,i);
prefered[i]=j;
}
- if(debug)
+ if(tv_debug)
fprintf(stderr,"%s --> %s\n", int_to_str(i, video_fmt_names),
int_to_str(prefered[i], video_fmt_names));
}
- if(debug) fprintf(stderr, "*** end prefered conversions ***\n");
+ if(tv_debug) fprintf(stderr, "*** end prefered conversions ***\n");
return 1;
}
diff -uNr xawdecode/src/commands.c xawdecode-new/src/commands.c
--- xawdecode/src/commands.c 2007-05-11 20:49:29 +0400
+++ xawdecode-new/src/commands.c 2007-09-10 00:47:14 +0400
@@ -41,7 +41,7 @@
#include "channel.h"
/* ----------------------------------------------------------------------- */
-extern int debug;
+extern int tv_debug;
extern int res_mode;
extern char *res_modes[];
extern Widget app_shell;
@@ -374,11 +374,11 @@
char *argv[2];
argc = get_arg(&tok, &s); // file type (jpeg | ppm)
argv[0] = tok;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"First Argument: %s\n",tok);
argc += get_arg(&tok, &s); // file format (full | win)
argv[1] = tok;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Second Argument: %s\n",tok);
SnapAction(NULL, NULL, argv, &argc);
}
@@ -397,7 +397,7 @@
}
for(i=0;i<strlen(tok);i++) if(tok[i]=='\n') nblines++;
if(nblines>8) {
- if(debug) {
+ if(tv_debug) {
fprintf(stderr,"teletext page contains %d lines\n"
" does not seem to be a subtitle\n",nblines);
}
diff -uNr xawdecode/src/conf.c xawdecode-new/src/conf.c
--- xawdecode/src/conf.c 2007-02-19 19:59:32 +0300
+++ xawdecode-new/src/conf.c 2007-09-10 00:47:14 +0400
@@ -93,7 +93,7 @@
extern Widget app_shell, conf_shell;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
extern void ExitCB();
extern char title[256];
extern int count;
@@ -406,10 +406,10 @@
chan_hdl_is_in_use(chan_hdl); // to be sure that chan_hdl is not deleted if this thread isnt finished !
while (chan_hdl->scan_running == 0){
- if (debug>2) fprintf(stderr, "scan not running yet ...\n");
+ if (tv_debug>2) fprintf(stderr, "scan not running yet ...\n");
usleep(100000);
}
- if (debug > 2) fprintf(stderr, "scan running now !\n");
+ if (tv_debug > 2) fprintf(stderr, "scan running now !\n");
#ifdef HAVE_DVB
if ((grabbers[grabber]) != (&grab_dvb))
@@ -434,7 +434,7 @@
pthread_mutex_unlock(&(chan_hdl->scan_mutex));
usleep (10000);
}
- if (debug>2)fprintf(stderr,"** number of detected channels : %d\n",chan_hdl->chan_number);
+ if (tv_debug>2)fprintf(stderr,"** number of detected channels : %d\n",chan_hdl->chan_number);
}
#ifdef HAVE_DVB
else { // for the dvb scan, the update isn't real-time .. for the moment.
@@ -442,7 +442,7 @@
while (chan_hdl->scan_running != 2){
usleep (10000);
}
- if (debug>2) fprintf(stderr,"** number of detected channels : %d\n",chan_hdl->chan_number);
+ if (tv_debug>2) fprintf(stderr,"** number of detected channels : %d\n",chan_hdl->chan_number);
for(i=0;i<chan_hdl->chan_number;i++){
struct CHANNEL* cur_chan=NULL;
struct CHANNEL* added_chan=NULL;
@@ -467,7 +467,7 @@
channel_menu ();
editor_station_switched ();
- if (debug) fprintf(stderr,"\n ** scan finished. **\n");
+ if (tv_debug) fprintf(stderr,"\n ** scan finished. **\n");
scantv_xosd(translate("Scanning..."), translate("Finished"));
scantv = 0;
return NULL;
@@ -577,7 +577,7 @@
if (0 == stat (init_filename , &buf)){
if (S_ISREG(buf.st_mode)){
- if (debug)
+ if (tv_debug)
fprintf(stderr,"start dvb SCAN !\n");
grab_dvb.grab_close();
usleep(100000);
@@ -872,7 +872,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (conf_shell), XtWindow (conf_shell), NULL,
0);
diff -uNr xawdecode/src/container-ogg.c xawdecode-new/src/container-ogg.c
--- xawdecode/src/container-ogg.c 2006-01-14 00:19:24 +0300
+++ xawdecode-new/src/container-ogg.c 2007-09-10 00:47:14 +0400
@@ -32,7 +32,7 @@
#include <vorbis/codec.h>
#include <vorbis/vorbisenc.h>
-extern int debug;
+extern int tv_debug;
extern pthread_mutex_t avi_mutex;
extern divx_t divx;
@@ -53,7 +53,7 @@
static int frame_x_offset=0;
static int frame_y_offset=0;
-static int want_video=1; /* should be only for debug */
+static int want_video=1; /* should be only for tv_debug */
/* Audio Muxing Params */
static ogg_stream_state vo; /* take physical pages, weld into a logical stream of packets */
@@ -271,7 +271,7 @@
}
}
- if (debug)
+ if (tv_debug)
fprintf(stderr,"ogg initialisation finished!\n");
/* now we just have to contruct an avi_t struct */
diff -uNr xawdecode/src/devicemanager/devicemanager.c xawdecode-new/src/devicemanager/devicemanager.c
--- xawdecode/src/devicemanager/devicemanager.c 2007-05-18 20:29:30 +0400
+++ xawdecode-new/src/devicemanager/devicemanager.c 2007-09-10 00:47:14 +0400
@@ -36,9 +36,9 @@
#define SYSCLASS_BASEDIR "/sys/class/"
#ifndef DEVMAN_STANDALONE
-extern int debug;
+extern int tv_debug;
#else
-int debug = 1;
+int tv_debug = 1;
#endif
int devman_wanted = 0;
@@ -84,7 +84,7 @@
devman_devices = temp_devman_devices;
- if(debug){
+ if(tv_debug){
fprintf(stderr, "Adding device : %s\n major : %d, minor: %d\n precise type: %s\n device location: %s\n device id: %d\n", device_to_add->name, device_to_add->major, device_to_add->minor, device_to_add->precise_type, device_to_add->device_location, device_to_add->device_id);
}
@@ -198,7 +198,7 @@
char final_dir[DEVMAN_MAX_CLASSDIR_LENGTH];
int number_added_devices = 0;
- if(debug){
+ if(tv_debug){
fprintf(stderr, "Adding devices from : %s\n", scanned_devices->device_class_dir);
}
@@ -240,7 +240,7 @@
struct devman_device_class* device_to_add;
int i;
- if(debug) fprintf(stderr, "Initializing devman\n");
+ if(tv_debug) fprintf(stderr, "Initializing devman\n");
for(i=0; i < DEVMAN_DEVICE_TYPE_NUMBER ;i++){
device_to_add = (struct devman_device_class*)malloc(sizeof(struct devman_device_class));
device_to_add->type = i;
diff -uNr xawdecode/src/devicemanager/devicemanager_config_file.c xawdecode-new/src/devicemanager/devicemanager_config_file.c
--- xawdecode/src/devicemanager/devicemanager_config_file.c 2007-05-13 20:14:15 +0400
+++ xawdecode-new/src/devicemanager/devicemanager_config_file.c 2007-09-10 00:47:14 +0400
@@ -33,7 +33,7 @@
char user_dir[] = "/tmp";
#endif
-extern int debug;
+extern int tv_debug;
char config_file_location[300];
@@ -52,7 +52,7 @@
int ousuisje;
int i;
DEVMAN_INITIALIZE_CONFIG_FILE_LOCATION;
- if(debug) printf("config file location : %s\n", config_file_location);
+ if(tv_debug) printf("config file location : %s\n", config_file_location);
devman_config_params = (struct devman_conf_params*)malloc(sizeof(struct devman_conf_params));
@@ -78,7 +78,7 @@
if(value_right[i] == '\n') value_right[i] = 0;
- if(debug) fprintf(stderr, "values read from config file : \n\tvalue left : %s\n\tvalue right : %s\n", value_left, value_right);
+ if(tv_debug) fprintf(stderr, "values read from config file : \n\tvalue left : %s\n\tvalue right : %s\n", value_left, value_right);
if(strcmp(value_left, "device_name") == 0)
devman_config_params->device_name = strdup(value_right);
diff -uNr xawdecode/src/devicemanager/devicemanager_ui.c xawdecode-new/src/devicemanager/devicemanager_ui.c
--- xawdecode/src/devicemanager/devicemanager_ui.c 2007-05-13 20:14:15 +0400
+++ xawdecode-new/src/devicemanager/devicemanager_ui.c 2007-09-10 00:47:14 +0400
@@ -66,7 +66,7 @@
extern Widget app_shell;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
/* Widgets which are not static are used into the XdTV pixmaps lib */
static Widget devicemanager_shell;
@@ -126,7 +126,7 @@
return;
}
- if(debug) fprintf(stderr, "switching to %s\n", mydevice->name);
+ if(tv_debug) fprintf(stderr, "switching to %s\n", mydevice->name);
if(strcmp("video", mydevice->precise_type) == 0){
@@ -136,7 +136,7 @@
else if(strcmp("vbi", mydevice->precise_type) == 0)
device.vbi = mydevice->device_location;
- if(debug) fprintf(stderr, "%s selected\n", mydevice->device_location);
+ if(tv_debug) fprintf(stderr, "%s selected\n", mydevice->device_location);
}
/*-------------------------------------------------------------------------*/
@@ -153,14 +153,14 @@
if((strcmp(api_list[devicemanager_api].str, "video4linux") == 0) || (strcmp(api_list[devicemanager_api].str, "v4l2") == 0)){
- if(debug) fprintf(stderr, "switching to analogic\n");
+ if(tv_debug) fprintf(stderr, "switching to analogic\n");
devman_switch_to_device(devman_device_mathing_type_from_number("video", devicemanager_vvideo));
devman_switch_to_device(devman_device_mathing_type_from_number("vbi", devicemanager_vvbi));
}
#ifdef HAVE_DVB
else if (strcmp(api_list[devicemanager_api].str,"dvb") == 0){
delay_between_failedframes=DVB_SLEEP_AFTER_FAILEDFRAME;
- if(debug) fprintf(stderr, "switching to numeric\n");
+ if(tv_debug) fprintf(stderr, "switching to numeric\n");
}
#endif
grabber_init();
@@ -187,14 +187,14 @@
XtVaSetValues (c_devicemanager_api, XtNlabel, label, NULL);
if((strcmp(api_list[j].str, "video4linux") == 0) || (strcmp(api_list[j].str, "v4l2") == 0))
{
- if(debug) fprintf(stderr, "v4l 1/2 grabber selected\n");
+ if(tv_debug) fprintf(stderr, "v4l 1/2 grabber selected\n");
XtVaSetValues(c_devicemanager_vvideo, XtNsensitive,True,NULL);
XtVaSetValues(c_devicemanager_vvbi, XtNsensitive,True,NULL);
XtVaSetValues(c_devicemanager_tadapter, XtNsensitive,False,NULL);
}
else if (strcmp(api_list[j].str,"dvb") == 0)
{
- if(debug) fprintf(stderr, "dvb grabber selected\n");
+ if(tv_debug) fprintf(stderr, "dvb grabber selected\n");
XtVaSetValues(c_devicemanager_vvideo, XtNsensitive,False,NULL);
XtVaSetValues(c_devicemanager_vvbi, XtNsensitive,False,NULL);
XtVaSetValues(c_devicemanager_tadapter, XtNsensitive,True,NULL);
@@ -258,7 +258,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (devicemanager_shell), XtWindow (devicemanager_shell), NULL, 0);
return;
@@ -358,7 +358,7 @@
for(i=0;i<number_of_devices;i++){
api_list[i].nr = i;
api_list[i].str = grabbers[i]->name;
- if(debug) fprintf(stderr, "adding grabber : %s\n", grabbers[i]->name);
+ if(tv_debug) fprintf(stderr, "adding grabber : %s\n", grabbers[i]->name);
}
api_list[i].nr = -1;
api_list[i].str = NULL;
diff -uNr xawdecode/src/divx_advanced_ui.c xawdecode-new/src/divx_advanced_ui.c
--- xawdecode/src/divx_advanced_ui.c 2005-12-15 00:49:17 +0300
+++ xawdecode-new/src/divx_advanced_ui.c 2007-09-10 00:47:14 +0400
@@ -62,7 +62,7 @@
extern Widget app_shell;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
extern divx_t divx;
static float modulo = 1.0;
@@ -342,7 +342,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (xvid_shell), XtWindow (xvid_shell), NULL,
0);
@@ -394,7 +394,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (ffmpeg_shell), XtWindow (ffmpeg_shell), NULL,
0);
diff -uNr xawdecode/src/divx.c xawdecode-new/src/divx.c
--- xawdecode/src/divx.c 2007-05-01 21:59:00 +0400
+++ xawdecode-new/src/divx.c 2007-09-10 00:47:14 +0400
@@ -392,7 +392,7 @@
static int slw; //status of the last AVI_write
static int displaynextframe = 1;
-extern int debug;
+extern int tv_debug;
char xawmessage [1024];
char xawmesstmp [256];
@@ -920,7 +920,7 @@
}
}
}
- if(debug){
+ if(tv_debug){
fprintf(stderr, "divx.filename = %s\n",divx.filename);
fprintf(stderr, "filename = %s\n",filename);
}
@@ -1016,10 +1016,10 @@
update_divx_scrollbarwidget(l_divxminquantizer, s_divxminquantizer, divx.min_quantizer, 64, translate("Min Quantizer"));
}
- if (debug) fprintf(stderr, "DivX init...\n");
+ if (tv_debug) fprintf(stderr, "DivX init...\n");
codec_name=int_to_str(divx.codec,codec_list);
- if (debug)
+ if (tv_debug)
{
fprintf(stderr, "divx.container = %s\n",int_to_str(divx.container,container_list));
fprintf(stderr, "divx.codec = %s\n", codec_name);
@@ -1066,12 +1066,12 @@
fps_den = 1000;
}
- if (debug) fprintf(stderr, "divx_init: requested video size: w = %d, h = %d\n", width, height);
+ if (tv_debug) fprintf(stderr, "divx_init: requested video size: w = %d, h = %d\n", width, height);
video_get_capture_size(&prev_w_capture, &prev_h_capture);
video_set_capture_size(width, height);
- if (debug) fprintf(stderr, "divx_init: allocated video size: w = %d, h = %d\n", width, height);
+ if (tv_debug) fprintf(stderr, "divx_init: allocated video size: w = %d, h = %d\n", width, height);
height_rec = height -= 2 * get_ybar(height);
@@ -1739,7 +1739,7 @@
xvid_init(NULL, 0, &xinit, NULL);
sprintf(xawmesstmp, translate("divx_init: initializing XviD core version %d\n"), xinit.core_build);
strcat(xawmessage,xawmesstmp);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "divx_init: XviD API version = %d.%d\n", xinit.api_version>>16, xinit.api_version&0xFF);
if (xinit.api_version != API_VERSION)
{
@@ -2165,7 +2165,7 @@
filename = get_filename();
sprintf(lastfilename,"%s '%s'&",pplayer, filename);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"nxtvepg title: %s\n",channel_title);
if (0 != (cont_handler->open_ofile(cont_handler,filename, divx.maxsize))){
@@ -2458,12 +2458,12 @@
sprintf(xawmesstmp, translate("Recording stopped %s"), ctime(&t));
strcat(xawmessage,xawmesstmp);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "divx_stop...\n");
#ifndef NOAUDIO
divx_audio_stop();
- if (debug)
+ if (tv_debug)
fprintf(stderr, "divx_stop: audio stopped\n");
if(is_aop_running())
@@ -2572,7 +2572,7 @@
ret = encore(handle, ENC_OPT_RELEASE, 0, 0);
if (ret != ENC_OK)
strcat(xawmessage,translate("divx_stop: divx4linux codec release failed\n"));
- else if (debug)
+ else if (tv_debug)
fprintf(stderr, "divx_stop: divx4linux codec released\n");
handle = NULL;
@@ -2582,7 +2582,7 @@
{
free(enc_frame);
enc_frame = NULL;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "divx_stop: divx4linux encoded frame freed\n");
}
}
@@ -2598,14 +2598,14 @@
handle = NULL;
free(picture_420p);
picture_420p = NULL;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "divx_stop: ffmpeg codec released\n");
}
if (enc_frame != NULL)
{
free(enc_frame);
enc_frame = NULL;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "divx_stop: ffmpeg encoded frame freed\n");
}
}
@@ -2619,7 +2619,7 @@
ret = xvid_encore(handle, XVID_DEC_DESTROY, NULL, NULL);
if (ret != 0)
strcat(xawmessage,translate("divx_stop: XviD codec release failed\n"));
- else if (debug)
+ else if (tv_debug)
fprintf(stderr, "divx_stop: XviD codec released\n");
handle = NULL;
@@ -2629,7 +2629,7 @@
{
free(enc_frame);
enc_frame = NULL;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "divx_stop: XviD encoded frame freed\n");
}
}
@@ -2645,7 +2645,7 @@
fprintf(stderr,"divx_stop: close error \n");
}
- if (debug)
+ if (tv_debug)
fprintf(stderr, "divx_stop: divx file closed\n");
}
@@ -2658,7 +2658,7 @@
video_set_capture_size(prev_w_capture, prev_h_capture);
- if (debug) fprintf(stderr, "...Done\n");
+ if (tv_debug) fprintf(stderr, "...Done\n");
if(divx.stream) fprintf(stderr, xawmessage);
else popup_mess(xawmessage);
@@ -2721,7 +2721,7 @@
if (ret != 0)
strcat(xawmessage,translate("Audio record thread failed to start.\n"));
- else if (debug)
+ else if (tv_debug)
fprintf (stderr, "Audio record thread started.\n");
}
@@ -2996,7 +2996,7 @@
if(!subfile) return;
frame=video_frames;
if(lastsub!=NULL) {
- if(debug)
+ if(tv_debug)
printf("%ld %ld\n",lastsubbegin-lastsubend,
frame-lastsubbegin);
fprintf(subfile,"%ld %ld\n",lastsubbegin-lastsubend,
@@ -3033,7 +3033,7 @@
s2[j]='\0';
lastsub=s2;
lastsubbegin=frame;
- if(debug)
+ if(tv_debug)
printf("lastsub=@@%s@@\n",lastsub);
}
diff -uNr xawdecode/src/divx_ui.c xawdecode-new/src/divx_ui.c
--- xawdecode/src/divx_ui.c 2007-04-24 23:31:42 +0400
+++ xawdecode-new/src/divx_ui.c 2007-09-10 00:47:14 +0400
@@ -85,7 +85,7 @@
extern Widget app_shell, divx_shell, divxaudio_shell, streamparams_shell, c_record;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
extern int bttvfd,vbifd;
extern int xawpopup;
extern char lastfilename[256];
@@ -492,7 +492,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (divx_shell), XtWindow (divx_shell), NULL,
0);
@@ -546,7 +546,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (divxaudio_shell), XtWindow (divxaudio_shell), NULL,
0);
@@ -599,7 +599,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (streamparams_shell), XtWindow (streamparams_shell), NULL, 0);
return;
@@ -668,7 +668,7 @@
displayed_filename=get_filename();
if (stat (divx.filename, &buf) == 0 && S_ISDIR(buf.st_mode)) {
- if (debug > 2)
+ if (tv_debug > 2)
fprintf(stderr," divx.filename is a directory, we don't make anything !! \n");
}else {
@@ -932,7 +932,7 @@
XtVaSetValues (c_stream_onoff, XtNlabel, label, NULL);
}
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Streaming Server Activation: %d\n",divx.stream);
if (!divx.stream)
@@ -1185,7 +1185,7 @@
sprintf(label, "%-*s: %5d", ALI(LAB_WIDTH3, translate("Delay A/V (ms)")), value);
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"\n");
fprintf(stderr,"Value: %d\n", (int)value);
fprintf(stderr,"Delay: %f\n", (float)divx.delay);
@@ -1906,7 +1906,7 @@
set_float(s_divxdelay, XtNtopOfThumb, (1+divx.delay*1000/DIVX_DELAY_RANGE)/2);
sprintf(label, "%-*s: %5ld", ALI(LAB_WIDTH3, translate("Delay A/V (ms)")), (unsigned long)((float)(divx.delay*1000)));
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"Delay: %f\n", (float)divx.delay);
}
XtVaSetValues(l_divxdelay, XtNlabel, label, NULL);
@@ -2065,7 +2065,7 @@
if(!t_http_port_str) return;
XtVaGetValues (t_http_port_str, XtNstring, &http_port_str, NULL);
sscanf (http_port_str, "%d", &divx.http_port);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"divx.http_port : %d\n",divx.http_port);
}
diff -uNr xawdecode/src/dvb_init_ui.c xawdecode-new/src/dvb_init_ui.c
--- xawdecode/src/dvb_init_ui.c 2007-04-18 00:59:53 +0400
+++ xawdecode-new/src/dvb_init_ui.c 2007-09-10 00:50:15 +0400
@@ -81,7 +81,7 @@
extern Widget app_shell;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
static Widget c_dvbinit_country;
static Widget c_dvbinit_city;
@@ -197,7 +197,7 @@
}
if (NULL == (country_list=get_country_list(all_files))) {
- if (debug) fprintf(stderr,"Cannot get any list of countries\n");
+ if (tv_debug) fprintf(stderr,"Cannot get any list of countries\n");
return 0;
}
return 1;
@@ -220,7 +220,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug) fprintf (stderr, "Config: wm_save_yourself\n");
+ if (tv_debug) fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (dvbinit_shell), XtWindow (dvbinit_shell), NULL, 0);
return;
}
@@ -236,11 +236,11 @@
{
XtPopdown (dvbinit_shell);
mapped = 0;
- if (debug) fprintf(stderr,"Close Window\n");
+ if (tv_debug) fprintf(stderr,"Close Window\n");
}
else
{
- if (debug) fprintf(stderr,"Open Window\n");
+ if (tv_debug) fprintf(stderr,"Open Window\n");
if(getlist()) {
// At the begining, city list is off because we must first choose the country
XtVaSetValues(c_dvbinit_country,XtNsensitive,True, NULL);
@@ -265,7 +265,7 @@
}
}
- if (debug) fprintf(stderr,"DVB init action finished\n");
+ if (tv_debug) fprintf(stderr,"DVB init action finished\n");
#endif
}
@@ -289,14 +289,14 @@
ALI(LAB_WIDTH, translate("Country")),
int_to_str (dvbinit_country, country_list));
XtVaSetValues (c_dvbinit_country, XtNlabel, label, NULL);
- if (debug) fprintf(stderr,"Country: %d\n",dvbinit_country);
+ if (tv_debug) fprintf(stderr,"Country: %d\n",dvbinit_country);
if (city_list){
free_strtab(city_list);
}
city_list=get_city_list(all_files,int_to_str (dvbinit_country, country_list));
city_list_size=srtab_size(city_list);
- if (debug) fprintf(stderr,"city_list_size = %d\n",city_list_size);
+ if (tv_debug) fprintf(stderr,"city_list_size = %d\n",city_list_size);
country_city_are_ok=0;
XtVaSetValues(c_dvbinit_action,XtNsensitive,False,NULL);
create_dvbinit_off_pixmaps(XtDisplay(dvbinit_paned) , &RootWindowOfScreen(XtScreen(dvbinit_paned)));
@@ -325,7 +325,7 @@
country_city_are_ok=1;
XtVaSetValues(c_dvbinit_action,XtNsensitive,True,NULL);
create_dvbinit_on_pixmaps(XtDisplay(dvbinit_paned) , &RootWindowOfScreen(XtScreen(dvbinit_paned)));
- if (debug) fprintf(stderr,"City: %d\n",dvbinit_city);
+ if (tv_debug) fprintf(stderr,"City: %d\n",dvbinit_city);
}
break;
@@ -349,14 +349,14 @@
// XtVaSetValues (c_dvbinit_action,XtNsensitive,True,NULL);
// create_dvbinit_on_pixmaps(XtDisplay(dvbinit_paned) , &RootWindowOfScreen(XtScreen(dvbinit_paned)));
- if (debug) fprintf(stderr,"Range: %d\n",dvbinit_city);
+ if (tv_debug) fprintf(stderr,"Range: %d\n",dvbinit_city);
if (-1 == get_entries_number(city_list , dvbinit_range , &beg_l ,&end_l)){
fprintf(stderr,"get_entries_number() problem\n");
return;
}
num_to_copy=end_l-beg_l+1;
- if (debug) fprintf(stderr,"Will copy list between num %d and %d : %d\n",beg_l,end_l,num_to_copy);
+ if (tv_debug) fprintf(stderr,"Will copy list between num %d and %d : %d\n",beg_l,end_l,num_to_copy);
if (!num_to_copy) return ;
if (NULL == (partial_city_list=strtab_copy_in_range(city_list,beg_l,num_to_copy))){
@@ -378,7 +378,7 @@
ALI(LAB_WIDTH, translate("Global Offset")),
int_to_str (dvbinit_offset , offset_list));
XtVaSetValues (c_dvbinit_offset, XtNlabel, label, NULL);
- if (debug) fprintf(stderr,"Global Offset: %d kHz\n",dvbinit_offset);
+ if (tv_debug) fprintf(stderr,"Global Offset: %d kHz\n",dvbinit_offset);
}
break;
diff -uNr xawdecode/src/event.c xawdecode-new/src/event.c
--- xawdecode/src/event.c 2004-09-09 01:03:48 +0400
+++ xawdecode-new/src/event.c 2007-09-10 00:47:14 +0400
@@ -35,7 +35,7 @@
#include "commands.h"
-extern int debug;
+extern int tv_debug;
#ifdef HAVE_LIBLIRC_CLIENT
# include <lirc/lirc_client.h>
@@ -91,7 +91,7 @@
entry->next = event_conf_list;
event_conf_list = entry;
parse_action(entry);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"ev: reg conf \"%s\" => \"%s\" , repeat_rate=%d\n",
entry->event,entry->action, entry->repeat);
return 0;
@@ -100,7 +100,7 @@
int change_repeat_last_registered(int repeat) {
if(event_conf_list==NULL) return -1;
event_conf_list->repeat=repeat;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"changing last mapped event to repeat_rate=%d\n", repeat);
return 0;
}
@@ -111,7 +111,7 @@
entry->next = event_builtin_list;
event_builtin_list = entry;
parse_action(entry);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"ev: reg built-in \"%s\" => \"%s\"\n",
entry->event,entry->action);
}
@@ -131,12 +131,12 @@
*h = 0;
if (NULL != (h = strchr(arg,')')))
*h = 0;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"ev: dispatch name=%s arg=%s\n",name,arg);
} else {
name = event;
arg = NULL;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"ev: dispatch name=%s\n",name);
}
@@ -150,11 +150,11 @@
if (0 == strcasecmp(name,entry->event))
break;
if (NULL == entry) {
- if (debug)
+ if (tv_debug)
fprintf(stderr,"ev: unknown: %s\n",name);
return 0;
}
- if (debug)
+ if (tv_debug)
{
fprintf(stderr, "Event:%s do -> %s after %d button press\n", entry->event, entry->action, entry->repeat);
fprintf(stderr, "repeat:%d\n", repeat);
diff -uNr xawdecode/src/grab-avi.c xawdecode-new/src/grab-avi.c
--- xawdecode/src/grab-avi.c 2006-03-10 00:05:01 +0300
+++ xawdecode-new/src/grab-avi.c 2007-09-10 00:47:14 +0400
@@ -125,7 +125,7 @@
audiobuf2=audiobufcompressed;
do {
r=AVI_read_data(videofile, buf, 778*576*4, audiobuf2, audio_buf_max_len, &len);
- if(debug)
+ if(tv_debug)
fprintf(stderr,"AVI_read_data: av=%d len=%ld\n",r,len);
if(r==2) {
gettimeofday (&tv, NULL);
@@ -160,7 +160,7 @@
free(pcm_r);
}
if(audiobuflen==0)
- if(debug>=2) {fprintf(stderr,"@@ mp3 frame -- need more data\n");}
+ if(tv_debug>=2) {fprintf(stderr,"@@ mp3 frame -- need more data\n");}
if(audiobuflen<0) {
fprintf(stderr,"PB lame_decode\n");
exit(1);
@@ -174,7 +174,7 @@
exit(1);
}
}
- if(debug>=2) fprintf(stderr,"audiobuflen=%d\n",audiobuflen);
+ if(tv_debug>=2) fprintf(stderr,"audiobuflen=%d\n",audiobuflen);
if(audiobuflen>0) {
unlok_lock_mutex();
}
@@ -219,7 +219,7 @@
AVI_print_error("AVI_open_input_filename");
return -1;
}
- if(debug) {
+ if(tv_debug) {
fprintf(stderr,"##AVI: width=%ld height=%ld fourcc=%4s\n",
videofile->width,videofile->height,videofile->compressor);
fprintf(stderr,"##AVI: a_chans=%ld a_rate=%ld a_fmt=%ld a_bits=%ld\n",
@@ -353,7 +353,7 @@
"avi_height=%ld requested_height=%d !\n",videofile->height,height);
return NULL;
}
- if(debug)
+ if(tv_debug)
fprintf(stderr,"extracting frame %ld\n",videofile->video_pos);
if(raw_direct) {
@@ -364,7 +364,7 @@
}
if(l==0) {
fast_memcpy(buffers[img], buffers[imgprec], size_img(format,width,height));
- if(debug) fprintf(stderr, "duplicated frame ?\n");
+ if(tv_debug) fprintf(stderr, "duplicated frame ?\n");
}
}
#ifdef HAVE_XVID
@@ -376,7 +376,7 @@
}
if(l==0) {
fast_memcpy(buffers[img], buffers[imgprec], size_img(format,width,height));
- if(debug) fprintf(stderr, "duplicated frame ?\n");
+ if(tv_debug) fprintf(stderr, "duplicated frame ?\n");
} else {
memset(&dec,0,sizeof(dec));
#ifdef HAVE_XVID09
diff -uNr xawdecode/src/grab-bktr.c xawdecode-new/src/grab-bktr.c
--- xawdecode/src/grab-bktr.c 2006-03-10 00:05:01 +0300
+++ xawdecode-new/src/grab-bktr.c 2007-09-10 00:47:14 +0400
@@ -221,7 +221,7 @@
void dummy(int signal) {
- if(debug>3)
+ if(tv_debug>3)
fprintf(stderr,"SIGUSR1\n");
}
@@ -490,7 +490,7 @@
printf("grab_ov\n");
if(bttvfd==-1) return -1;
if (width == 0 || height == 0) {
- if (debug) fprintf (stderr, "bktr: overlay off\n");
+ if (tv_debug) fprintf (stderr, "bktr: overlay off\n");
arg=METEOR_CAP_STOP_CONT;
if( -1 == ioctl(bttvfd, METEORCAPTUR, &arg )) {
perror("ioctl METEORCAPTUR off");
diff -uNr xawdecode/src/grab-dvb.c xawdecode-new/src/grab-dvb.c
--- xawdecode/src/grab-dvb.c 2007-02-25 20:09:39 +0300
+++ xawdecode-new/src/grab-dvb.c 2007-09-10 00:47:14 +0400
@@ -72,7 +72,7 @@
extern int filenoaudioout;
extern int use_file_audio;
-extern int debug;
+extern int tv_debug;
extern avi_t * videofile ;
extern double audiostamp;
@@ -551,7 +551,7 @@
val = get_external_clock(is);
}
- if (debug > 2)
+ if (tv_debug > 2)
fprintf(stderr , "get master clock : %f\n",val);
return val;
}
@@ -639,7 +639,7 @@
schedule_refresh(is, (int)(actual_delay * 1000 + 0.5));
//#if defined(DEBUG_SYNC)
- if (debug>2)
+ if (tv_debug>2)
printf("video: delay=%0.3f actual_delay=%0.3f pts=%0.3f A-V=%f\n",
delay, actual_delay, vp->pts, -diff);
//#endif
@@ -900,7 +900,7 @@
}
the_end:
av_free(frame);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"grab-dvb : video_thread ended here \n");
return 0;
}
@@ -1173,8 +1173,8 @@
codec = avcodec_find_decoder(enc->codec_id);
enc->debug_mv = debug_mv;
- enc->debug = debug;
- if(debug)
+ enc->debug = tv_debug;
+ if(tv_debug)
av_log_set_level(AV_LOG_DEBUG);
enc->workaround_bugs = workaround_bugs;
enc->lowres = lowres;
@@ -1222,7 +1222,7 @@
is->video_current_pts_time = av_gettime();
packet_queue_init(&is->videoq);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"grab-dvb: *** Create thread : video_thread\n");
is->video_tid = SDL_CreateThread(video_thread, is);
break;
@@ -1506,7 +1506,7 @@
event.user.data1 = is;
SDL_PushEvent(&event);
}
- if (debug)
+ if (tv_debug)
fprintf(stderr,"grab-dvb : decode_thread ended here\n");
return 0;
@@ -1548,7 +1548,7 @@
schedule_refresh(is, 40);
is->av_sync_type = av_sync_type;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"grab-dvb: *** Create thread : decode_thread\n");
is->parse_tid = SDL_CreateThread(decode_thread, is);
if (!is->parse_tid) {
@@ -1712,7 +1712,7 @@
hh = ns/3600;
mm = (ns%3600)/60;
ss = (ns%60);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Seek to %2.0f%% (%2d:%02d:%02d) of total duration (%2d:%02d:%02d) \n", frac*100,
hh, mm, ss, thh, tmm, tss);
stream_seek(cur_stream, (int64_t)(cur_stream->ic->start_time+frac*cur_stream->ic->duration), 0);
@@ -1727,7 +1727,7 @@
}
break;
case SDL_QUIT:
- if (debug)
+ if (tv_debug)
fprintf(stderr,"grab-dvb : event_loop thread ended here ! \n");
return NULL;
case FF_ALLOC_EVENT:
@@ -1810,7 +1810,7 @@
}
mixer_set_mode(MIXER_MODE_PCM);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"grab-dvb : *** Create thread : audio_thread\n");
pthread_create (&audio_thread, NULL, dvb_audio_main, NULL);
}
@@ -1850,7 +1850,7 @@
audiobuf=NULL;
return -1;
}
- if (debug)
+ if (tv_debug)
printf ("using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV);
memset(&frontend_param, 0, sizeof(struct dvb_frontend_parameters));
@@ -1881,11 +1881,11 @@
stream_close(cur_stream);
if (event_loop_thread_started){
- if (debug)
+ if (tv_debug)
fprintf(stderr,"closing event_loop_thread ... \n");
pthread_join(event_loop_thread,NULL);
event_loop_thread_started=0;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"thread close ... \n");
}
@@ -1925,7 +1925,7 @@
/***** DVB PART ****/
- if (debug)
+ if (tv_debug)
fprintf(stderr,"closing dvb devices\n");
close(frontend_fd);
@@ -2091,7 +2091,7 @@
grab_open(NULL);
-// debug_channel(chan);
+// tv_debug_channel(chan);
// fprintf(stderr , "grab-dvb : reinit frontend_param\n");
@@ -2235,7 +2235,7 @@
avpicture_fill((AVPicture *)pFrameSRC, bufferSRC, PIX_FMT_YUV420P,width,height);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"grab-dvb : *** Create thread : event_loop_thread\n");
pthread_create (&event_loop_thread, NULL, event_loop, NULL);
event_loop_thread_started=1;
diff -uNr xawdecode/src/grab.h xawdecode-new/src/grab.h
--- xawdecode/src/grab.h 2007-04-18 14:18:40 +0400
+++ xawdecode-new/src/grab.h 2007-09-10 00:47:14 +0400
@@ -32,7 +32,7 @@
#include "colorspace.h"
struct CHANNEL;
-extern int debug;
+extern int tv_debug;
extern int have_dga;
/* ------------------------------------------------------------------------- */
diff -uNr xawdecode/src/grab_ui.c xawdecode-new/src/grab_ui.c
--- xawdecode/src/grab_ui.c 2005-12-07 23:54:48 +0300
+++ xawdecode-new/src/grab_ui.c 2007-09-10 00:47:14 +0400
@@ -69,7 +69,7 @@
extern Widget app_shell, c_graball;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
extern char *filepath;
#ifdef HAVE_LIBJPEG
extern int jpegpcent;
@@ -113,7 +113,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (grab_shell), XtWindow (grab_shell), NULL,
0);
@@ -177,7 +177,7 @@
ALI(LAB_WIDTH3,translate("Jpeg Compression (in%)")), value);
if (l_jpeg_pcent)
XtVaSetValues(l_jpeg_pcent, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Jpeg Compression (in%%): %4d\n",jpegpcent);
}
#endif
diff -uNr xawdecode/src/grab-v4l2.c xawdecode-new/src/grab-v4l2.c
--- xawdecode/src/grab-v4l2.c 2006-06-18 22:50:00 +0400
+++ xawdecode-new/src/grab-v4l2.c 2007-09-10 00:47:14 +0400
@@ -168,7 +168,7 @@
if (-1 != bttvfd)
goto err;
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l2: open\n");
if (-1 == (bttvfd = open (device->video ? device->video : "/dev/video", O_RDWR)))
@@ -192,7 +192,7 @@
//goto err;
}
- if (debug)
+ if (tv_debug)
{
fprintf (stderr, "v4l2: driver=%.16s card=%.32s\n",
drv.cap.driver,drv.cap.card);
@@ -252,7 +252,7 @@
}
grab_v4l2.norms[i].nr = -1;
grab_v4l2.norms[i].str = NULL;
- if(debug) {
+ if(tv_debug) {
printf("norms=");
for(i=0;i<drv.nstds;i++) printf(" %s",grab_v4l2.norms[i].str);
printf("\n");
@@ -265,7 +265,7 @@
}
grab_v4l2.inputs[i].nr = -1;
grab_v4l2.inputs[i].str = NULL;
- if(debug) {
+ if(tv_debug) {
printf("inputs=");
for(i=0;i<drv.ninputs;i++) printf(" %s",grab_v4l2.inputs[i].str);
printf("\n");
@@ -277,7 +277,7 @@
fprintf(stderr, "classical overlay is disabled");
ov_error=1;
} else {
- if (debug)
+ if (tv_debug)
fprintf (stderr, " fbuffer : size=%dx%d bpl=%d\n",
ov_fbuf.fmt.width, ov_fbuf.fmt.height,
ov_fbuf.fmt.bytesperline);
@@ -353,7 +353,7 @@
if(grab) stop_capture();
if (width == 0 || height == 0)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l2: overlay off\n");
if( -1 == ioctl (bttvfd, VIDIOC_OVERLAY, &zero))
perror("ioctl VIDIOC_OVERLAY");
@@ -378,7 +378,7 @@
ov_clips[i].c.top = oc[i].y1;
ov_clips[i].c.width = oc[i].x2 - oc[i].x1 /* XXX */ ;
ov_clips[i].c.height = oc[i].y2 - oc[i].y1;
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l2: clip=%dx%d+%d+%d\n",
ov_clips[i].c.width, ov_clips[i].c.height,
ov_clips[i].c.left, ov_clips[i].c.top);
@@ -405,7 +405,7 @@
static int
grab_queue (struct v4l2_buffer *gb)
{
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "g%d", gb->index);
if(overlay) {fprintf(stderr,"BIG PB\n");exit(1);}
@@ -420,7 +420,7 @@
}
gb_grab++;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "* ");
return 0;
@@ -433,7 +433,7 @@
struct timeval tv;
int r;
- if (debug)
+ if (tv_debug)
fprintf (stderr, "s%d", gb->index);
do {
@@ -459,7 +459,7 @@
}
gb_sync++;
- if (debug)
+ if (tv_debug)
fprintf (stderr, "* ");
return 0;
@@ -499,7 +499,7 @@
videostampmin = gb2[img].timestamp.tv_usec/1000000.0+
gb2[img].timestamp.tv_sec + dur_frame;
videostampmax = videostampmin + dur_frame;
- if(debug>=3) {
+ if(tv_debug>=3) {
double now;
struct timeval tv;
gettimeofday (&tv, NULL);
@@ -541,7 +541,7 @@
return -1;
}
nbufs = reqbufs.count;
- if(debug)
+ if(tv_debug)
fprintf(stderr,"allocated %d kernel buffers\n",nbufs);
gb2=(struct v4l2_buffer *) malloc(nbufs*sizeof(struct v4l2_buffer));
maps=(char **) malloc(nbufs*sizeof(char*));
@@ -603,7 +603,7 @@
if(overlay2) video_overlay (NULL);
if(gbformat.fmt.pix.width!=width || gbformat.fmt.pix.height!=height ||
gbformat.fmt.pix.pixelformat!=f) {
- if(debug) fprintf(stderr,"change format %dx%d fmt=%4s\n",width,height,(char*)&f);
+ if(tv_debug) fprintf(stderr,"change format %dx%d fmt=%4s\n",width,height,(char*)&f);
gbformat.fmt.pix.width=width;
gbformat.fmt.pix.height=height;
gbformat.fmt.pix.pixelformat=f;
@@ -661,14 +661,14 @@
{
static int prev_norm = -1;
if (-1 != input) {
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l2: input: %d\n", input);
if( -1 == ioctl (bttvfd, VIDIOC_S_INPUT, &drv.inp[input].index))
perror("ioctl VIDIOC_S_INPUT");
}
if (-1 != norm)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l2: norm : %d\n", norm);
if(norm != prev_norm) {
int overlay2 = overlay;
diff -uNr xawdecode/src/grab-v4l.c xawdecode-new/src/grab-v4l.c
--- xawdecode/src/grab-v4l.c 2007-02-16 01:13:49 +0300
+++ xawdecode-new/src/grab-v4l.c 2007-09-10 00:47:14 +0400
@@ -185,7 +185,7 @@
driver.name = "v4l";
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l: open\n");
if (-1 == (bttvfd = open (device->video ? device->video : "/dev/video", O_RDWR)))
@@ -208,7 +208,7 @@
//goto err;
}
- if (debug)
+ if (tv_debug)
{
fprintf (stderr, "%s:", v4l_capability.name);
for (i = 0; device_cap[i] != NULL; i++)
@@ -218,7 +218,7 @@
}
/* input sources */
- if (debug)
+ if (tv_debug)
fprintf (stderr, " channels: %d\n", v4l_capability.channels);
v4l_channels = malloc (sizeof (struct video_channel) * v4l_capability.channels);
memset (v4l_channels, 0, sizeof (struct video_channel) * v4l_capability.channels);
@@ -234,7 +234,7 @@
if (v4l_channels[i].type == VIDEO_TYPE_CAMERA) webcam = 1;
- if (debug)
+ if (tv_debug)
fprintf (stderr, " %s: %d %s%s %s%s\n",
v4l_channels[i].name,
v4l_channels[i].tuners,
@@ -255,7 +255,7 @@
}
/* audios */
- if (debug)
+ if (tv_debug)
fprintf (stderr, " audios : %d\n", v4l_capability.audios);
if(v4l_capability.audios>0) {
v4l_audios = malloc (sizeof (struct video_audio) * v4l_capability.audios);
@@ -265,7 +265,7 @@
v4l_audios[i].audio = i;
if (-1 == ioctl (bttvfd, VIDIOCGAUDIO, &v4l_audios[i]))
perror ("ioctl VIDIOCGCAUDIO") /* , exit(0) */ ;
- if (debug)
+ if (tv_debug)
{
fprintf (stderr, " %d (%s): ", i, v4l_audios[i].name);
if (v4l_audios[i].flags & VIDEO_AUDIO_MUTABLE)
@@ -282,7 +282,7 @@
}
} else
v4l_audios = NULL;
- if (debug)
+ if (tv_debug)
fprintf (stderr, " size : %dx%d => %dx%d\n",
v4l_capability.minwidth, v4l_capability.minheight,
v4l_capability.maxwidth, v4l_capability.maxheight);
@@ -293,7 +293,7 @@
if (-1 == ioctl (bttvfd, VIDIOCGTUNER, &v4l_tuner))
perror ("ioctl VIDIOCGTUNER");
- if (debug)
+ if (tv_debug)
fprintf (stderr, " tuner : %s %lu-%lu",
v4l_tuner.name, v4l_tuner.rangelow, v4l_tuner.rangehigh);
@@ -301,13 +301,13 @@
{
if (v4l_tuner.flags & (1 << i))
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, " %s", norms[i].str);
}
else
norms[i].nr = -1;
}
- if (debug)
+ if (tv_debug)
fprintf (stderr, "\n");
}
@@ -324,7 +324,7 @@
if (-1 == ioctl (bttvfd, VIDIOCGFBUF, &ov_fbuf))
perror ("ioctl VIDIOCGFBUF");
- if (debug)
+ if (tv_debug)
fprintf (stderr, " fbuffer : base=0x%p size=%dx%d depth=%d bpl=%d\n",
ov_fbuf.base, ov_fbuf.width, ov_fbuf.height,
ov_fbuf.depth, ov_fbuf.bytesperline);
@@ -333,7 +333,7 @@
if (-1 == ioctl (bttvfd, VIDIOCGPICT, &v4l_pict))
perror ("ioctl VIDIOCGPICT");
- if (debug)
+ if (tv_debug)
{
fprintf (stderr,
" picture : brightness=%d hue=%d colour=%d contrast=%d\n",
@@ -357,7 +357,7 @@
ov_error=1;
}
- if (debug)
+ if (tv_debug)
{
fprintf (stderr, "v4l: framebuffer v4l base=%p\n", ov_fbuf.base);
/*fprintf (stderr, "v4l: framebuffer dga base=%p\n", base);*/
@@ -404,7 +404,7 @@
gb=(struct video_mmap *) malloc(nbufs*sizeof(struct video_mmap));
stamps=(double *) malloc(nbufs*sizeof(double));
- if(debug)
+ if(tv_debug)
fprintf(stderr,"nbufs=%d (max=%d)\n",nbufs,gb_buffers.frames);
// Check palette capabilities
@@ -455,7 +455,7 @@
if ((char *) -1 != map)
munmap (map, gb_buffers.size);
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l: close\n");
close (bttvfd);
@@ -486,7 +486,7 @@
if (width == 0 || height == 0)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l: overlay off\n");
ioctl (bttvfd, VIDIOCCAPTURE, &zero);
overlay = 0;
@@ -510,7 +510,7 @@
ov_clips[i].y = oc[i].y1;
ov_clips[i].width = oc[i].x2 - oc[i].x1 /* XXX */ ;
ov_clips[i].height = oc[i].y2 - oc[i].y1;
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l: clip=%dx%d+%d+%d\n",
ov_clips[i].width, ov_clips[i].height,
ov_clips[i].x, ov_clips[i].y);
@@ -545,7 +545,7 @@
overlay = 1;
}
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l: overlay win=%dx%d+%d+%d, %d clips\n",
width, height, x, y, count);
@@ -555,7 +555,7 @@
static int
grab_queue (struct video_mmap *gb)
{
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "g%d", gb->frame);
if (-1 == ioctl (bttvfd, VIDIOCMCAPTURE, gb))
@@ -570,7 +570,7 @@
}
gb_grab++;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "* ");
return 0;
@@ -579,7 +579,7 @@
static int
grab_wait (struct video_mmap *gb)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "s%d", gb->frame);
if (-1 == ioctl (bttvfd, VIDIOCSYNC, &(gb->frame)))
@@ -589,7 +589,7 @@
}
gb_sync++;
- if (debug)
+ if (tv_debug)
fprintf (stderr, "* ");
return 0;
@@ -650,7 +650,7 @@
//videostampmin = stamps[img];
// perhaps the following will give more synchronization....
videostampmin = videostampmax - (videostampmax-stamps[img])/nbufs;
- if(n>1 && debug)
+ if(n>1 && tv_debug)
fprintf(stderr,"%d wasted images\n",n-1);
return map + gb_buffers.offsets[img];
}
@@ -670,7 +670,7 @@
grab_tune (const struct CHANNEL* chan)
{
unsigned long freq=chan->freq;
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l: freq: %.3f\n", (float) freq / 16);
if (! (driver.capabilities & DEV_CAP_TUNER))
@@ -703,13 +703,13 @@
{
if (-1 != input)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l: input: %d\n", input);
v4l_input = input;
}
if (-1 != norm)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "v4l: norm : %d\n", norm);
v4l_norm = norm;
}
diff -uNr xawdecode/src/http.c xawdecode-new/src/http.c
--- xawdecode/src/http.c 2006-02-17 13:20:13 +0300
+++ xawdecode-new/src/http.c 2007-09-10 00:47:14 +0400
@@ -46,7 +46,7 @@
#include "strtab.h"
#include "grab.h"
extern divx_t divx;
-extern int debug;
+extern int tv_debug;
void set_channel (struct CHANNEL *);
void set_norm (int);
void set_source (int);
@@ -95,15 +95,15 @@
static int read_until_doubleret(int fd) {
char buf[4]="\0\0\0\0";
int i,r;
- if(debug) fprintf(stderr,"##doubleret=@@@");
+ if(tv_debug) fprintf(stderr,"##doubleret=@@@");
while(buf[0]!='\r'|| buf[1]!='\n'||buf[2]!='\r'||buf[3]!='\n') {
for(i=0;i<3;i++) buf[i]=buf[i+1];
r=read(fd,&buf[3],1);
if(r<0) {perror("doubleret read"); return -1;}
if(r==0) {fprintf(stderr,"connection lost\n"); return -1;}
- if(debug) putc(buf[3],stderr);
+ if(tv_debug) putc(buf[3],stderr);
}
- if(debug) fprintf(stderr,"@@@\n");
+ if(tv_debug) fprintf(stderr,"@@@\n");
return 0;
}
@@ -122,7 +122,7 @@
if(r<0) {perror("write"); close(s);return;}
r=write(s,header,header_bytes);
if(r<0) {perror("write"); close(s);return;}
- if(debug) fprintf(stderr,"client %d correctly initialized\n",i);
+ if(tv_debug) fprintf(stderr,"client %d correctly initialized\n",i);
divx_restart();
sockets_clients[i]=s;
}
@@ -147,20 +147,20 @@
int i;
/** should be done in parallel !!!!!!! */
for(i=0;sockets_clients[i]!=-2;i++){
-// if (debug)
+// if (tv_debug)
// fprintf(stderr,"sending data to client %d\n",i);
if(sockets_clients[i]!=-1) {
int r=0,r2=1;
-// if (debug)
+// if (tv_debug)
// fprintf(stderr,"\tI have to transmit %d\n",ldata);
while(r<ldata) {
-// if (debug)
+// if (tv_debug)
// fprintf(stderr,"\t\twriting %d to socket ...\n",ldata-r);
r2 = write(sockets_clients[i], data+r, ldata-r);
if(r2<0) { perror("write"); removeclient(i); break;}
r+=r2;
}
-// if (debug)
+// if (tv_debug)
// fprintf(stderr,"\tok %d data transfered\n",ldata);
}
}
@@ -184,7 +184,7 @@
r=select(maxfds+1,&rfds, NULL, NULL, &tv);
if(r<0) perror("select");
if(FD_ISSET(socket_server,&rfds)) {
- if(debug) fprintf(stderr,"new client\n");
+ if(tv_debug) fprintf(stderr,"new client\n");
addclient();
}
for(i=0;sockets_clients[i]!=-2;i++)
@@ -195,9 +195,9 @@
if(r<0) {perror("read"); removeclient(i);}
if(!divx.chg) continue;
buf[r]='\0'; buf2=buf;
- if(debug) fprintf(stderr,"\nreceived %d bytes\n",r);
+ if(tv_debug) fprintf(stderr,"\nreceived %d bytes\n",r);
while(buf2<buf+r) {
- if(debug) fprintf(stderr,"received=@@%s@@\n",buf2);
+ if(tv_debug) fprintf(stderr,"received=@@%s@@\n",buf2);
if(strncmp(buf2,"freq ",5)==0) {
int f;
struct CHANNEL tmp;
@@ -228,7 +228,7 @@
if(k != cur_sender) {
cur_sender=k;
set_channel(channels[k]);
- if(debug)
+ if(tv_debug)
fprintf(stderr,"matched channel=%s\n",channels[k]->name);
}
break;
@@ -265,7 +265,7 @@
break;
}
}
- if(debug)
+ if(tv_debug)
fprintf(stderr,"hostname=%s file=%s port=%d\n",hostname,file,port);
he=gethostbyname(hostname);
if(he==NULL) {herror("gethostbyname"); return -1;}
diff -uNr xawdecode/src/lirc.c xawdecode-new/src/lirc.c
--- xawdecode/src/lirc.c 2006-09-11 13:08:48 +0400
+++ xawdecode-new/src/lirc.c 2007-09-10 00:47:14 +0400
@@ -43,7 +43,7 @@
/*-----------------------------------------------------------------------*/
-extern int debug;
+extern int tv_debug;
#ifdef HAVE_LIBLIRC_CLIENT
static struct lirc_config *config;
@@ -157,8 +157,8 @@
#ifdef HAVE_LIBLIRC_CLIENT
int fd;
- if (-1 == (fd = lirc_init("xdtv",debug))) {
- if (debug)
+ if (-1 == (fd = lirc_init("xdtv",tv_debug))) {
+ if (tv_debug)
fprintf(stderr,"no infrared remote support available\n");
return -1;
}
@@ -168,19 +168,19 @@
//lirc_deinit(); // we'll check eventmap no need to rush
config = NULL;
}
- if (debug)
+ if (tv_debug)
fprintf(stderr, "lirc: ~/.lircrc file %sfound\n",
config ? "" : "not ");
fcntl(fd,F_SETFL,O_NONBLOCK);
fcntl(fd,F_SETFD,FD_CLOEXEC);
event_register_list(lirc_events);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"lirc: init ok\n");
return fd;
#else
- if (debug)
+ if (tv_debug)
fprintf(stderr,"lirc: not enabled at compile time\n");
return -1;
#endif
@@ -202,14 +202,14 @@
fprintf(stderr,"lirc: oops, parse error: %s",code);
continue;
}
- if (debug)
+ if (tv_debug)
fprintf(stderr,"lirc: key=%s repeat=%d\n", event+9, repeat);
if (config)
{
/* use ~/.lircrc */
while (lirc_code2char(config,code,&cmd)==0 && cmd!=NULL)
{
- if (debug)
+ if (tv_debug)
fprintf(stderr,"lirc: \"%s\"\n", cmd);
if (0 == strcasecmp(cmd,"eventmap"))
event_dispatch(event, (int)NULL);
diff -uNr xawdecode/src/main.c xawdecode-new/src/main.c
--- xawdecode/src/main.c 2007-05-13 20:14:15 +0400
+++ xawdecode-new/src/main.c 2007-09-10 00:47:14 +0400
@@ -234,7 +234,7 @@
int alevt1st = 0;
int have_config = 0;
int on_skip = 0;
-int debug = 0;
+int tv_debug = 0;
int fs = 0;
int temp_colorkey = 0;
int fullscreen = 0;
@@ -714,7 +714,7 @@
static void
lirc_input(XtPointer data, int *fd, XtInputId *iproc)
{
- if (debug)
+ if (tv_debug)
fprintf(stderr,"lirc_input triggered\n");
if (-1 == lirc_tv_havedata()) {
fprintf(stderr,"lirc: connection lost\n");
@@ -732,16 +732,16 @@
int status;
char *err;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"xscreensaver_timefunc\n");
xscreensaver_timer = 0;
if (first) {
xscreensaver_init(dpy);
first = 0;
}
- status = xscreensaver_command(dpy,xa_deactivate,0,debug,&err);
+ status = xscreensaver_command(dpy,xa_deactivate,0,tv_debug,&err);
if (0 != status) {
- if (debug)
+ if (tv_debug)
fprintf(stderr,"xscreensaver_command: %s\n",err);
return;
}
@@ -762,7 +762,7 @@
return;
}
kdescreensaver_was_running = (system("dcop kdesktop KScreensaverIface isEnabled 2>/dev/null | grep true &>/dev/null")==0);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Kscreensaver state = %d\n",kdescreensaver_was_running);
}
@@ -788,11 +788,11 @@
{
DPMSInfo(dpy, &dpms_state, &dpms_on);
DPMSDisable(dpy);
- if(debug) fprintf(stderr,"disable DPMS\n");
+ if(tv_debug) fprintf(stderr,"disable DPMS\n");
}
#endif
xscreensaver_timer = XtAppAddTimeOut(app_context,30000, xscreensaver_timefunc,NULL);
- if(debug) fprintf(stderr,"disable screensaver\n");
+ if(tv_debug) fprintf(stderr,"disable screensaver\n");
#ifndef __NetBSD__
/* test kscreensaver: if true => disable kscreensaver */
@@ -812,12 +812,12 @@
(DPMSCapable(dpy)) && (dpms_on))
{
DPMSEnable(dpy);
- if(debug) fprintf(stderr,"enable DPMS\n");
+ if(tv_debug) fprintf(stderr,"enable DPMS\n");
}
#endif
if (xscreensaver_timer)
XtRemoveTimeOut(xscreensaver_timer);
- if(debug) fprintf(stderr,"enable screensaver\n");
+ if(tv_debug) fprintf(stderr,"enable screensaver\n");
#ifndef __NetBSD__
/* test kscreensaver : if true => enable kscreensaver */
@@ -1142,7 +1142,7 @@
sprintf (value, translate("Contrast: %d%%"), cur_contrast*100/65535);
break;
}
- if (debug)
+ if (tv_debug)
fprintf(stderr,"x:%d | y:%d | w:%d| h:%d| screen_height:%d| screen_width:%d\n",x,y,w,h,sheight,swidth);
// Hayvan....
@@ -1188,11 +1188,11 @@
if(!idle_id) {
/* should never happen, but happens
perhaps when XtRemoveWorkProc is called at a bad moment ? */
- if(debug>1)
+ if(tv_debug>1)
fprintf(stderr, "idle_grabdisplay should not be called here\n");
return TRUE;
}
- if (debug)
+ if (tv_debug)
{
gettimeofday (&tv, &tz);
if (tv.tv_sec != lastsec)
@@ -1210,7 +1210,7 @@
if (-1 == video_displayframe())
{
- if(debug >2) fprintf(stderr, "video_displayframe failed\n");
+ if(tv_debug >2) fprintf(stderr, "video_displayframe failed\n");
usleep (delay_between_failedframes);
}
return FALSE;
@@ -1405,7 +1405,7 @@
return;
}
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"currrent capture = %d\n",cur_capture);
fprintf(stderr,"currrent sender = %d\n",cur_sender);
}
@@ -1513,7 +1513,7 @@
if (s_color)
{
set_float (s_color, XtNtopOfThumb, (float) cur_color / 65536);
- if (debug)
+ if (tv_debug)
fprintf (stderr, "color: %5d\n", cur_color);
sprintf (label, "%-*s:%3d%%", ALI(LAB_WIDTH2, translate("Color")),
cur_color*100/65536);
@@ -1528,7 +1528,7 @@
if (s_bright)
{
set_float (s_bright, XtNtopOfThumb, (float) cur_bright / 65536);
- if (debug)
+ if (tv_debug)
fprintf (stderr, "bright: %3d\n", cur_bright);
sprintf (label, "%-*s:%3d%%", ALI(LAB_WIDTH2,translate("Bright")),
cur_bright*100/65536);
@@ -1543,7 +1543,7 @@
if (s_hue)
{
set_float (s_hue, XtNtopOfThumb, (float) cur_hue / 65536);
- if (debug)
+ if (tv_debug)
fprintf (stderr, "hue: %3d\n", cur_hue);
sprintf (label, "%-*s:%3d%%", ALI(LAB_WIDTH2, translate("Hue")),
cur_hue*100/65536);
@@ -1558,7 +1558,7 @@
if (s_contrast)
{
set_float (s_contrast, XtNtopOfThumb, (float) cur_contrast / 65536);
- if (debug)
+ if (tv_debug)
fprintf (stderr, "contrast: %3d\n", cur_contrast);
sprintf (label, "%-*s:%3d%%", ALI(LAB_WIDTH2, translate("Contrast")),
cur_contrast*100/65536);
@@ -2185,7 +2185,7 @@
if (s_volume)
{
set_float (s_volume, XtNtopOfThumb, (float) cur_volume / 100);
- if (debug)
+ if (tv_debug)
fprintf (stderr, "volume: %3d\n", cur_volume);
sprintf (label, "%-*s:%3d%%",
ALI(LAB_WIDTH2, translate("Volume")), cur_volume);
@@ -2196,7 +2196,7 @@
static void
keypad_timeout(XtPointer client_data, XtIntervalId *id)
{
- if (debug)
+ if (tv_debug)
fprintf(stderr, "keypad: timeout!!!\n");
keypad_value = -1;
keypad_timer = 0;
@@ -2211,7 +2211,7 @@
static void
record_timer_countdown(XtPointer client_data, XtIntervalId *id)
{
- if (debug)
+ if (tv_debug)
fprintf(stderr, "RECORD timer: elapsed 1 from %d record time\n", record_time);
if (record_time>1) record_time--;
@@ -2256,7 +2256,7 @@
if (CAPTURE_OVERLAY == cur_capture)
video_overlay (NULL);
usleep (VIDMODE_DELAY * 1000);
- if (debug)
+ if (tv_debug)
fprintf (stderr, "switching video mode to %dx%d now\n",
vm_modelines[nr]->hdisplay, vm_modelines[nr]->vdisplay);
XF86VidModeSwitchToMode (dpy, XDefaultScreen (dpy), vm_modelines[nr]);
@@ -2542,7 +2542,7 @@
mouse_timeout(XtPointer clientData, XtIntervalId *id)
{
Widget widget = clientData;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Pointer Hide\n");
if (XtWindow(widget))
XDefineCursor(dpy, XtWindow(widget), no_ptr);
@@ -2554,7 +2554,7 @@
mouse_event(Widget widget, XtPointer client_data, XEvent *event, Boolean *d)
{
if (!mouse_visible) {
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Pointer Show\n");
if (XtWindow(widget))
XDefineCursor(dpy, XtWindow(widget), left_ptr);
@@ -2735,7 +2735,7 @@
int i=0;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "cur_input: %d\n", cur_input);
if (count && 0 == strcmp (params[0], "next"))
@@ -2840,18 +2840,18 @@
&type, &format, &nitems, &bytesafter,
&args) && nitems != 0)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, translate("remote control: "));
for (i = 0, argc = 0; i < nitems; i += strlen ((char*)args + i) + 1)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "'%s' ", args + i);
argv[argc++] = (char*)args + i;
}
- if (debug)
+ if (tv_debug)
fprintf (stderr, "\n");
if (0 == strcasecmp (argv[0], "setstation") && argc > 1)
@@ -3072,7 +3072,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Main: wm_save_yourself\n");
argv[argc++] = progname;
@@ -3173,13 +3173,13 @@
if (xosd_is_onscreen(osd_bar))
xosd_hide(osd_bar);
//#endif <== xosd inside now
- if (debug)
+ if (tv_debug)
fprintf(stderr,"switch method: %d\n", switch_method);
if (wm_fullscreen && switch_method == 2) {
//full service for us, next to nothing to do
fs = !fs;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Method 3, fullscreen = %d\n", fs);
wm_fullscreen(dpy,XtWindow(app_shell),fs);
@@ -3198,7 +3198,7 @@
if (fs)
{
- if (debug)
+ if (tv_debug)
fprintf(stderr,"turning fs off (%dx%d+%d+%d)\n",w,h,x,y);
if (wmfs && wm_fullscreen != NULL
@@ -3209,7 +3209,7 @@
{
wm_fullscreen(dpy, XtWindow(app_shell), 0);
if (screensavermgt) do_screensaver(0);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Method 1: image stretching\n");
}
else
@@ -3238,7 +3238,7 @@
XtNy, y + fs_yoff, XtNwidth, w, XtNheight, h, NULL);
if (screensavermgt) do_screensaver(0);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Method 2: switch video resolution\n");
}
@@ -3260,7 +3260,7 @@
if (wm_stay_on_top)
set_stayontop(staytmp);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"turning fs on\n");
if (wmfs && wm_fullscreen != NULL
@@ -3271,7 +3271,7 @@
{
wm_fullscreen(dpy, XtWindow(app_shell), 1);
if (screensavermgt) do_screensaver(1);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Method 1: image stretching\n");
}
else
@@ -3334,14 +3334,14 @@
vp_y = xinerama[i].y_org;
vp_width = xinerama[i].width;
vp_height = xinerama[i].height;
- if(debug)
+ if(tv_debug)
fprintf(stderr,"xinerama_fullscreen=%d\n",i);
break;
}
}
}
#endif
- if (debug)
+ if (tv_debug)
fprintf(stderr,"viewport: %dx%d+%d+%d\n",
vp_width,vp_height,vp_x,vp_y);
@@ -3354,7 +3354,7 @@
XRaiseWindow (dpy, XtWindow (app_shell));
if (screensavermgt) do_screensaver(1);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Method 2: switch video resolution\n");
}
XWarpPointer (dpy, None, XtWindow (tv), 0, 0, 0, 0, 30, 15);
@@ -3398,7 +3398,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Channels: wm_save_yourself\n");
XSetCommand (XtDisplay (chan_shell), XtWindow (chan_shell), NULL, 0);
return;
@@ -3793,7 +3793,7 @@
int jpeg = 0; // jpeg | ppn
int size = 0; // full | win
- if (debug)
+ if (tv_debug)
fprintf(stderr,"argument numbers = %d\n",*num_params);
if (*num_params > 0)
@@ -3811,7 +3811,7 @@
if (0 == strcasecmp (params[1], "win"))
size = 0;
}
- if (debug)
+ if (tv_debug)
fprintf(stderr,"jpeg = %d , size = %d\n", jpeg, size);
select_snap(jpeg,size);
}
@@ -4186,7 +4186,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Options: wm_save_yourself\n");
XSetCommand (XtDisplay (opt_shell), XtWindow (opt_shell), NULL, 0);
return;
@@ -4647,7 +4647,7 @@
}
#endif
- if (debug)
+ if (tv_debug)
{
fprintf(stderr, "Selected default video device : %s\n", device.video);
fprintf(stderr, "Selected default vbi device : %s\n", device.vbi);
@@ -4666,7 +4666,7 @@
/* Read entries in /proc/video/dev */
n = scandir("/proc/video/dev", &namelist, 0, 0);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Get %d files in /proc/video/dev\n", n);
if (n <= 0)
{
@@ -4682,7 +4682,7 @@
if ((strcmp(namelist[n]->d_name, "..")==0)||(strcmp(namelist[n]->d_name, ".")==0))
break;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Checking file /proc/video/dev/%s\n", namelist[n]->d_name);
if (strncmp(namelist[n]->d_name, "video", 5)== 0)
{
@@ -4707,11 +4707,11 @@
while (NULL != fgets (line, 127, fp))
{
line[strlen(line)-1] = 0;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Checking line: '%s'\n", line);
if ( (strncmp(line, "type", 4) == 0) && strstr(line, test_string) )
{
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Bingo!\n");
*test_device = malloc(16);
#ifndef HAVE_DEVFS
@@ -4728,7 +4728,7 @@
free(namelist);
}
- if (debug)
+ if (tv_debug)
{
fprintf(stderr, "Selected default video device : %s\n", device.video);
fprintf(stderr, "Selected default vbi device : %s\n", device.vbi);
@@ -5109,7 +5109,7 @@
read_first();
/* parse options */
- debug = noconf = 0;
+ tv_debug = noconf = 0;
xfree_ext = 1;
for (i = 1; i < argc; i++)
@@ -5122,7 +5122,7 @@
else if (strcmp (arg, "-v") == 0)
{
INCRARG(i);
- debug = strtol (arg, (char **) NULL, 10);
+ tv_debug = strtol (arg, (char **) NULL, 10);
}
else if (strcmp (arg, "-n") == 0)
{
@@ -5491,10 +5491,10 @@
fprintf(stderr, "Devman was requested but failed to fully initialize... disabling it\n");
}
if(devman_wanted){
- if(debug) fprintf(stderr, "Initializing default grabber for devman to : %s\n", devman_default_grabber);
+ if(tv_debug) fprintf(stderr, "Initializing default grabber for devman to : %s\n", devman_default_grabber);
forcegrabber(devman_default_grabber);
- if(debug) fprintf(stderr, "Default grabber set to : %s\n", grabbers[grabber]->name);
- if(debug) fprintf(stderr, "device selected by devman : %s\n", device.video);
+ if(tv_debug) fprintf(stderr, "Default grabber set to : %s\n", grabbers[grabber]->name);
+ if(tv_debug) fprintf(stderr, "device selected by devman : %s\n", device.video);
}
}
@@ -5505,7 +5505,7 @@
if(x11_native_format==VIDEO_GRAY8)
strcat (xdtv_v4l_conf, " -g");
- if(!debug)
+ if(!tv_debug)
strcat (xdtv_v4l_conf, " -q");
// This is now done here as device may have been
@@ -5514,7 +5514,7 @@
strcat (xdtv_v4l_conf, " -c ");
strcat (xdtv_v4l_conf, device.video);
- if(debug) fprintf(stderr, "execution of \"%s\"\n", xdtv_v4l_conf);
+ if(tv_debug) fprintf(stderr, "execution of \"%s\"\n", xdtv_v4l_conf);
switch (system (xdtv_v4l_conf))
{
case -1: /* can't run */
@@ -5602,7 +5602,7 @@
overlay_format = x11_native_format;
- if (debug) fprintf(stderr,"grabber avi = %d\n",avigrabber);
+ if (tv_debug) fprintf(stderr,"grabber avi = %d\n",avigrabber);
if (avigrabber) xdtv_audio_init (); // to have the sound with avi grabber
grabber_init ();
@@ -5707,7 +5707,7 @@
init_socket();
/* lirc support */
- if (debug)
+ if (tv_debug)
fprintf(stderr,"main: checking for lirc ...\n");
if (-1 != (lirc = lirc_tv_init()))
XtAppAddInput(app_context,lirc,(XtPointer)XtInputReadMask,lirc_input,NULL);
diff -uNr xawdecode/src/memcpy.c xawdecode-new/src/memcpy.c
--- xawdecode/src/memcpy.c 2006-01-07 14:21:31 +0300
+++ xawdecode-new/src/memcpy.c 2007-09-10 00:47:14 +0400
@@ -47,7 +47,7 @@
#include "cpu_accel.h"
#include "memcpy.h"
extern void save_memcpy_method(int method);
-extern int debug;
+extern int tv_debug;
void *(* fast_memcpy)(void *to, const void *from, size_t len);
/* Original comments from mplayer (file: aclib.c)
@@ -1032,202 +1032,202 @@
{
case MEMCPY_GLIBC:
fast_memcpy = memcpy;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using glibc memcpy.\n");
return;
#ifdef HAVE_MMX
case MEMCPY_KERNEL:
fast_memcpy = linux_kernel_memcpy;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using kernel memcpy.\n");
return;
# ifdef __i386__
case MEMCPY_FPU_512:
fast_memcpy = fpu_memcpy_512;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using FPU memcpy 512.\n");
return;
case MEMCPY_FPU_1K:
fast_memcpy = fpu_memcpy_1K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using FPU memcpy 1K.\n");
return;
case MEMCPY_FPU_2K:
fast_memcpy = fpu_memcpy_2K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using FPU memcpy 2K.\n");
return;
case MEMCPY_FPU_4K:
fast_memcpy = fpu_memcpy_4K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using FPU memcpy 4K.\n");
return;
case MEMCPY_FPU_8K:
fast_memcpy = fpu_memcpy_8K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using FPU memcpy 8K.\n");
return;
case MEMCPY_FPU_16K:
fast_memcpy = fpu_memcpy_16K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using FPU memcpy 16K.\n");
return;
case MEMCPY_FPU_32K:
fast_memcpy = fpu_memcpy_32K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using FPU memcpy 32K.\n");
return;
# endif
case MEMCPY_MMX:
fast_memcpy = mmx_memcpy;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMX memcpy.\n");
return;
case MEMCPY_MMX_512:
fast_memcpy = mmx_memcpy_512;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMX memcpy 512.\n");
return;
case MEMCPY_MMX_1K:
fast_memcpy = mmx_memcpy_1K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMX memcpy 1K.\n");
return;
case MEMCPY_MMX_2K:
fast_memcpy = mmx_memcpy_2K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMX memcpy 2K.\n");
return;
case MEMCPY_MMX_4K:
fast_memcpy = mmx_memcpy_4K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMX memcpy 4K.\n");
return;
case MEMCPY_MMX_8K:
fast_memcpy = mmx_memcpy_8K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMX memcpy 8K.\n");
return;
case MEMCPY_MMX_16K:
fast_memcpy = mmx_memcpy_16K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMX memcpy 16K.\n");
return;
case MEMCPY_MMX_32K:
fast_memcpy = mmx_memcpy_32K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMX memcpy 32K.\n");
return;
case MEMCPY_MMXEXT:
fast_memcpy = mmx2_memcpy;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMXEXT memcpy.\n");
return;
case MEMCPY_MMXEXT_1K:
fast_memcpy = mmx2_memcpy_1K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMXEXT memcpy 1K.\n");
return;
case MEMCPY_MMXEXT_2K:
fast_memcpy = mmx2_memcpy_2K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMXEXT memcpy 2K.\n");
return;
case MEMCPY_MMXEXT_4K:
fast_memcpy = mmx2_memcpy_4K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMXEXT memcpy 4K.\n");
return;
case MEMCPY_MMXEXT_8K:
fast_memcpy = mmx2_memcpy_8K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMXEXT memcpy 8K.\n");
return;
case MEMCPY_MMXEXT_16K:
fast_memcpy = mmx2_memcpy_16K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMXEXT memcpy 16K.\n");
return;
case MEMCPY_MMXEXT_32K:
fast_memcpy = mmx2_memcpy_32K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMXEXT memcpy 32K.\n");
return;
case MEMCPY_MMXEXT_64K:
fast_memcpy = mmx2_memcpy_64K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using MMXEXT memcpy 64K.\n");
return;
case MEMCPY_SSE:
fast_memcpy = sse_memcpy;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using SSE memcpy.\n");
return;
case MEMCPY_SSE_1K:
fast_memcpy = sse_memcpy_1K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using SSE memcpy 1K.\n");
return;
case MEMCPY_SSE_2K:
fast_memcpy = sse_memcpy_2K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using SSE memcpy 2K.\n");
return;
case MEMCPY_SSE_4K:
fast_memcpy = sse_memcpy_4K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using SSE memcpy 4K.\n");
return;
case MEMCPY_SSE_8K:
fast_memcpy = sse_memcpy_8K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using SSE memcpy 8K.\n");
return;
case MEMCPY_SSE_16K:
fast_memcpy = sse_memcpy_16K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using SSE memcpy 16K.\n");
return;
case MEMCPY_SSE_32K:
fast_memcpy = sse_memcpy_32K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using SSE memcpy 32K.\n");
return;
case MEMCPY_SSE_64K:
fast_memcpy = sse_memcpy_64K;
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Using SSE memcpy 64K.\n");
return;
#endif
diff -uNr xawdecode/src/mixer-alsa.c xawdecode-new/src/mixer-alsa.c
--- xawdecode/src/mixer-alsa.c 2007-02-05 21:23:23 +0300
+++ xawdecode-new/src/mixer-alsa.c 2007-09-10 00:47:14 +0400
@@ -14,7 +14,7 @@
# endif
#endif // HAVE_ALSA
#include "mixer.h"
-extern int debug;
+extern int tv_debug;
#define NB_DEVICES 6
static char *chans_name[]={"Line", "PCM", "Capture", "Wave Surround",
@@ -91,7 +91,7 @@
else
snd_mixer_selem_set_playback_volume_all(elem[j], v);
}
- if(debug)
+ if(tv_debug)
fprintf(stderr,"ALSAMIXER: %-8s=%3ld (%3ld%%) min=%3ld max=%3ld\n",
chans_name[j], v, volume[j], pmin, pmax);
}
@@ -113,7 +113,7 @@
if(j != MIXER_CHAN_CAPTURE) {
snd_mixer_selem_set_playback_switch_all(elem[j], sav_muted[j]);
snd_mixer_selem_set_playback_volume_all(elem[j], sav_volume[j]);
- if(debug)
+ if(tv_debug)
fprintf(stderr,"ALSAMIXER RESTORE: %-8s level:%3ld muted:%3d\n",
chans_name[j], sav_volume[j], sav_muted[j]);
}
@@ -151,7 +151,7 @@
if(NULL == elem[chan]) return;
snd_mixer_selem_get_playback_volume_range(elem[chan],&pmin,&pmax);
v = percent_to_alsa(val, pmin, pmax);
- if(debug)
+ if(tv_debug)
fprintf(stderr,"chan=%d %ld %ld %ld\n",chan,v,pmin,pmax);
snd_mixer_selem_set_playback_volume_all(elem[chan], v);
volume[chan] = val;
diff -uNr xawdecode/src/mixer-oss.c xawdecode-new/src/mixer-oss.c
--- xawdecode/src/mixer-oss.c 2006-06-14 17:58:30 +0400
+++ xawdecode-new/src/mixer-oss.c 2007-09-10 00:47:14 +0400
@@ -24,7 +24,7 @@
#endif
#include "mixer.h"
-extern int debug;
+extern int tv_debug;
#define NB_DEVICES 5
static char *names[] = SOUND_DEVICE_NAMES;
static char *device_list[NB_DEVICES] = {"line", "pcm", "igain", "dig1", "vol"};
@@ -70,7 +70,7 @@
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
{
- if (debug)
+ if (tv_debug)
printf("mixer names [%d] = '%s'\n", i, names[i]);
if ((1 << i) & devmask
@@ -98,7 +98,7 @@
}
}
- if (debug)
+ if (tv_debug)
printf
("mixer: %s (%d) opened with volume = %d = 0x%04X\n",
device_list[j], dev_id[j], volume[j], volume[j]);
@@ -131,7 +131,7 @@
int c = 0;
if ((1 << dev_id[i]) & recmask)
c= ((1 << dev_id[i]) & recsrc);
- if (debug)
+ if (tv_debug)
printf ("mixer: mixer_open: captured (%s) = %d\n", device_list[i],c);
}
@@ -139,14 +139,14 @@
if (-1 == ioctl (mix, MIXER_READ (dev_id[MIXER_CHAN_CAPTURE]), &volume[MIXER_CHAN_CAPTURE]))
fprintf(stderr, "mixer: mixer_open: couldn't read %s volume\n", device_list[MIXER_CHAN_CAPTURE]);
- if(debug)
+ if(tv_debug)
fprintf(stderr, "****************igain volume = 0x%04X\n", volume[MIXER_CHAN_CAPTURE]);
if ( ((volume[MIXER_CHAN_CAPTURE] & 0xFF) == 0) || ((volume[MIXER_CHAN_CAPTURE] & 0xFF00)>>8 == 0) )
{
if (-1 == ioctl (mix, MIXER_WRITE (dev_id[MIXER_CHAN_CAPTURE]), &dix))
fprintf(stderr, "mixer: mixer_open: couldn't write %s volume\n", device_list[MIXER_CHAN_CAPTURE]);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "mixer: mixer_open: OSS setting IGAIN volume to %04X\n", dix);
}
return (-1 != dev_id[MIXER_CHAN_TV]) ? 0 : -1;
diff -uNr xawdecode/src/mixer-sun.c xawdecode-new/src/mixer-sun.c
--- xawdecode/src/mixer-sun.c 2005-05-16 20:14:15 +0400
+++ xawdecode-new/src/mixer-sun.c 2007-09-10 00:47:14 +0400
@@ -13,7 +13,7 @@
#include <sys/audioio.h>
#include <fcntl.h>
#include "mixer.h"
-extern int debug;
+extern int tv_debug;
/* man audio */
#define NB_DEVICES 4
diff -uNr xawdecode/src/pixmaps_loader.c xawdecode-new/src/pixmaps_loader.c
--- xawdecode/src/pixmaps_loader.c 2006-06-18 22:50:00 +0400
+++ xawdecode-new/src/pixmaps_loader.c 2007-09-10 00:47:14 +0400
@@ -76,7 +76,7 @@
static int library_loaded;
-extern int debug;
+extern int tv_debug;
extern char* current_theme;
extern char* current_language;
@@ -141,7 +141,7 @@
int pixlib_error = 0;
if(name == NULL) return;
- if(debug) fprintf(stderr, "Loading %s\n", name);
+ if(tv_debug) fprintf(stderr, "Loading %s\n", name);
handle = dlopen(name, RTLD_NOW);
if (!handle) {
@@ -194,7 +194,7 @@
#endif
if ((error = dlerror()) != NULL){
- if (debug||1)
+ if (tv_debug||1)
fprintf(stderr, "dlsym: %s\n", error);
fprintf(stderr,
"WARNING: A pixmap library has been find but is unable to provide the create_pixmap function.\n");
diff -uNr xawdecode/src/plugin.c xawdecode-new/src/plugin.c
--- xawdecode/src/plugin.c 2005-04-09 17:19:25 +0400
+++ xawdecode-new/src/plugin.c 2007-09-10 00:47:14 +0400
@@ -38,7 +38,7 @@
void *hPlugin;
if(name == NULL) return;
- if(debug) fprintf(stderr, "Loading %s\n", name);
+ if(tv_debug) fprintf(stderr, "Loading %s\n", name);
/* dlopen executes _init in plugfile if it exists */
hPlugin = dlopen(name, RTLD_NOW);
if (!hPlugin) {
diff -uNr xawdecode/src/plugin.h xawdecode-new/src/plugin.h
--- xawdecode/src/plugin.h 2005-04-09 17:19:25 +0400
+++ xawdecode-new/src/plugin.h 2007-09-10 00:47:14 +0400
@@ -31,7 +31,7 @@
extern struct CALL_ACTION call_help;
extern char title[],user_dir[];
extern Atom wm_protocols[2];
-extern int debug, vbifd, alevt_in_use,cur_secam,cur_capture;
+extern int tv_debug, vbifd, alevt_in_use,cur_secam,cur_capture;
void register_initaction(void (*f)(void));
void register_idleaction(void (*f)(void));
void register_parseopts(int (*f)(int argc,char *argv[],int *i));
diff -uNr xawdecode/src/plugin_ui.c xawdecode-new/src/plugin_ui.c
--- xawdecode/src/plugin_ui.c 2005-10-31 17:35:11 +0300
+++ xawdecode-new/src/plugin_ui.c 2007-09-10 00:47:14 +0400
@@ -54,7 +54,7 @@
extern Widget app_shell;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
Widget plugin_paned;
static Widget plugin_shell;
@@ -84,7 +84,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (plugin_shell), XtWindow (plugin_shell), NULL,
0);
diff -uNr xawdecode/src/popup_ui.c xawdecode-new/src/popup_ui.c
--- xawdecode/src/popup_ui.c 2005-02-02 03:32:25 +0300
+++ xawdecode-new/src/popup_ui.c 2007-09-10 00:47:14 +0400
@@ -61,7 +61,7 @@
Widget pErrorShell;
Widget errorMessage, errorArea, errorPopdown;
-extern int debug;
+extern int tv_debug;
extern Atom wm_protocols[2];
void popdownErrorShell(Widget w, XtPointer client_data, XtPointer call_data)
@@ -215,7 +215,7 @@
Dimension width, height;
void XtMoveWidget(Widget , Position, Position);
Dimension popupButtonWidth, errorAreaWidth;
- extern int debug;
+ extern int tv_debug;
parent_w = XtParent(pShell);
if(parent_w != NULL) {
@@ -237,7 +237,7 @@
XtVaSetValues(mess_w, XtNinternalWidth, 2, NULL);
//XtVaSetValues(popdown, XtNhorizDistance, (errorAreaWidth - popupButtonWidth) / 2, NULL);
XawFormDoLayout(area, True);
- if (debug)
+ if (tv_debug)
{
printf("errorAreaWidth = %d, popdownButtonWidth = %d, NewPos = %d",
errorAreaWidth, popupButtonWidth,
@@ -282,7 +282,7 @@
);
XtAddCallback(errorPopdown, XtNcallback, popdownErrorShell, pErrorShell);
XtInstallAllAccelerators (errorArea, pErrorShell);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"popup message error initialised!\n");
#ifdef HAVE_XPM
XpmCreatePixmapFromData(XtDisplay(pErrorShell),
diff -uNr xawdecode/src/scan_common.c xawdecode-new/src/scan_common.c
--- xawdecode/src/scan_common.c 2006-06-26 14:42:10 +0400
+++ xawdecode-new/src/scan_common.c 2007-09-10 00:47:14 +0400
@@ -128,14 +128,14 @@
wait=chan_hdl->is_in_use;
pthread_mutex_unlock(&(chan_hdl->in_use_mutex));
if (wait) usleep(100); else break;
- if (debug > 2)
+ if (tv_debug > 2)
fprintf(stderr,"scan_common.c : chan_hdl is in use ...\n");
}
pthread_mutex_lock(&(chan_hdl->scan_mutex));
for (i=0;i<chan_hdl->chan_number;i++){
struct CHANNEL* to_delete=&(chan_hdl->new_channels[i]);
- if (debug > 2)
+ if (tv_debug > 2)
fprintf(stderr,"scan_common.c : freeing channel %d\n",i);
if (to_delete->name)
free(to_delete->name);
@@ -147,7 +147,7 @@
free(to_delete->subpage);
}
- if (debug > 2)
+ if (tv_debug > 2)
fprintf(stderr,"scan_common.c : last freeing ...\n");
free (chan_hdl->new_channels);
pthread_mutex_unlock(&(chan_hdl->scan_mutex));
@@ -284,10 +284,10 @@
printf(translate("channel=%s freq=%.3f tvname=%s \n"),
tvtuner[i].name,(float)param_analog_p->freq/1000,tvname);
- if (debug > 2 )
+ if (tv_debug > 2 )
fprintf(stderr,"scan_common.c : try to lock mutex\n");
pthread_mutex_lock(&(chan_handler->scan_mutex));
- if (debug > 2 )
+ if (tv_debug > 2 )
fprintf(stderr,"scan_common.c : ok mutex locked\n");
chan_handler->new_channel_available=1;
@@ -307,7 +307,7 @@
cur_chan->norm = param_analog_p->tvnorm_index;
cur_chan->channel_type = ANALOG;
- if (debug > 2 )
+ if (tv_debug > 2 )
fprintf(stderr,"scan_common.c : unlock mutex\n");
pthread_mutex_unlock(&(chan_handler->scan_mutex));
}
@@ -339,10 +339,10 @@
(float)f/16,channel,tvname);
- if (debug > 2 )
+ if (tv_debug > 2 )
fprintf(stderr,"scan_common.c : try to lock mutex\n");
pthread_mutex_lock(&(chan_handler->scan_mutex));
- if (debug > 2 )
+ if (tv_debug > 2 )
fprintf(stderr,"scan_common.c : ok mutex locked\n");
chan_handler->new_channel_available=1;
@@ -362,7 +362,7 @@
cur_chan->norm = param_analog_p->tvnorm_index;
cur_chan->channel_type = ANALOG;
- if (debug > 2 )
+ if (tv_debug > 2 )
fprintf(stderr,"scan_common.c : unlock mutex\n");
pthread_mutex_unlock(&(chan_handler->scan_mutex));
@@ -371,7 +371,7 @@
}
chan_handler->scan_running=2;
- if(debug > 2)
+ if(tv_debug > 2)
fprintf(stderr,"scan_common : ok scan finished\n");
#ifdef HAVE_ZVBI
vbi_capture_delete(vbi_cap);
@@ -381,7 +381,7 @@
if(tvname!=NULL) free(tvname);
#endif
delete_chan_handler(chan_handler);
- if(debug > 2)
+ if(tv_debug > 2)
fprintf(stderr,"scan_common : ok return\n");
return NULL;
diff -uNr xawdecode/src/stringuty.c xawdecode-new/src/stringuty.c
--- xawdecode/src/stringuty.c 2006-06-27 02:29:42 +0400
+++ xawdecode-new/src/stringuty.c 2007-09-10 00:47:14 +0400
@@ -98,9 +98,9 @@
void lineFree(LineLink *release_ptr)
{
- extern int debug;
+ extern int tv_debug;
if(release_ptr != NULL) {
- if (debug)
+ if (tv_debug)
printf("%s\n", release_ptr->string);
_string_free(release_ptr->string);
_string_free(release_ptr);
@@ -124,7 +124,7 @@
int loopExit = True;
const char *line_ptr, *line_end_ptr;
LineLink *alloc_ptr = NULL, *allocTop;
- extern int debug;
+ extern int tv_debug;
line_ptr = string;
allocTop = alloc_ptr = lineAlloc(NULL);
@@ -136,7 +136,7 @@
alloc_ptr->string = (char*)_string_malloc(length+1);
if(alloc_ptr->string != NULL) {
sprintf(alloc_ptr->string, "%.*s", length, line_ptr);
- if (debug)
+ if (tv_debug)
{
printf("%s\n", alloc_ptr->string);
fflush(stdout);
diff -uNr xawdecode/src/subtitles_ui.c xawdecode-new/src/subtitles_ui.c
--- xawdecode/src/subtitles_ui.c 2005-12-11 22:03:28 +0300
+++ xawdecode-new/src/subtitles_ui.c 2007-09-10 00:48:38 +0400
@@ -62,7 +62,7 @@
extern Widget app_shell, c_subpageno;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
extern char title[256];
extern int subactive;
extern int xawpopup;
@@ -111,14 +111,14 @@
String * params, Cardinal * num_params)
{
static int mapped = 0, first = 1;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Current Subtitles Page SubPageAction: %s\n",cur_subpage);
if (event && event->type == ClientMessage)
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (subpage_shell), XtWindow (subpage_shell), NULL,
0);
diff -uNr xawdecode/src/vop-common.c xawdecode-new/src/vop-common.c
--- xawdecode/src/vop-common.c 2005-07-09 13:30:10 +0400
+++ xawdecode-new/src/vop-common.c 2007-09-10 00:47:14 +0400
@@ -114,7 +114,7 @@
static void changeh(video_fmt f, void *dest, int h2,
void*src, int w, int h) {
int t=size_img(f,w,1),i;
- if(debug>1) fprintf(stderr, "changeh h=%d h2=%d w=%d\n",h,h2,w);
+ if(tv_debug>1) fprintf(stderr, "changeh h=%d h2=%d w=%d\n",h,h2,w);
for(i=0;i<h2;i++,dest+=t)
fast_memcpy(dest,src+rescale(i,h2,h)*t,t);
}
@@ -125,7 +125,7 @@
int hdst,wsrc,hsrc,i;
void *src;
if(v==NULL) return get_image2_before_vop(dest,f,width,height);
- if(debug>=2)
+ if(tv_debug>=2)
fprintf(stderr,"VOP2 %s f=%s %dx%d\n", v->v->name,
int_to_str (f,video_fmt_names),width,height);
if(v->v->height_dest==-1)
@@ -196,7 +196,7 @@
}
}
if(mustreinit) {
- if(debug>=2) fprintf(stderr, "vop: REINITIALIZATION %s\n", v->v->name);
+ if(tv_debug>=2) fprintf(stderr, "vop: REINITIALIZATION %s\n", v->v->name);
for(i=0;i<v->v->nbufs_needed-1;i++) {
if(v->directgrab2) {
if(only_width_capture && only_width_capture!=wsrc) return 0;
@@ -270,7 +270,7 @@
void *get_image_vop(vop2 *v,video_fmt f, int width, int height) {
if(v==NULL) return get_image_before_vop(f,width,height);
- if(debug>=2)
+ if(tv_debug>=2)
fprintf(stderr,"VOP %s f=%s %dx%d\n", v->v->name,
int_to_str (f,video_fmt_names),width,height);
v->dest_tmp3=realloc(v->dest_tmp3,size_img(f,width,height));
@@ -323,7 +323,7 @@
tok=strtok_r(NULL,":",&ctok);
}
free(cmdline);
- if(debug) {
+ if(tv_debug) {
vop2 *v=last_vop;
fprintf(stderr, "VIDEO_OPERATIONS : ");
while(v!=NULL) {
diff -uNr xawdecode/src/vop-deint-bob.c xawdecode-new/src/vop-deint-bob.c
--- xawdecode/src/vop-deint-bob.c 2005-07-09 13:30:10 +0400
+++ xawdecode-new/src/vop-deint-bob.c 2007-09-10 00:47:14 +0400
@@ -13,7 +13,7 @@
#include "vop.h"
#include "memcpy.h"
#include "cpu_accel.h"
-extern int debug;
+extern int tv_debug;
static int deinterlace_bob_yuv_mmx(vop2 *v, unsigned char *dest, unsigned char *src,
int width, int height) {
diff -uNr xawdecode/src/vop-deint-greedy.c xawdecode-new/src/vop-deint-greedy.c
--- xawdecode/src/vop-deint-greedy.c 2005-07-09 13:30:10 +0400
+++ xawdecode-new/src/vop-deint-greedy.c 2007-09-10 00:47:14 +0400
@@ -14,7 +14,7 @@
#include "vop.h"
#include "memcpy.h"
#include "cpu_accel.h"
-extern int debug;
+extern int tv_debug;
static int deinterlace_greedy_yuv_mmx(vop2 *v, unsigned char *dest, unsigned char *src,
int width, int height) {
diff -uNr xawdecode/src/vop-deint-lb.c xawdecode-new/src/vop-deint-lb.c
--- xawdecode/src/vop-deint-lb.c 2005-07-09 13:30:10 +0400
+++ xawdecode-new/src/vop-deint-lb.c 2007-09-10 00:47:14 +0400
@@ -10,7 +10,7 @@
#include "vop.h"
#include "memcpy.h"
#include "cpu_accel.h"
-extern int debug;
+extern int tv_debug;
/* Deinterlace linear blend filter */
@@ -27,7 +27,7 @@
int n;
- if(debug>1)
+ if(tv_debug>1)
fprintf(stderr, "deinterlace_linearblend_yuv_mmx %p %p %d %d\n",
dest, src, width, height);
/* Copy first line */
diff -uNr xawdecode/src/vop-deint-onefield.c xawdecode-new/src/vop-deint-onefield.c
--- xawdecode/src/vop-deint-onefield.c 2005-07-09 13:30:10 +0400
+++ xawdecode-new/src/vop-deint-onefield.c 2007-09-10 00:47:14 +0400
@@ -13,7 +13,7 @@
#include "vop.h"
#include "memcpy.h"
#include "cpu_accel.h"
-extern int debug;
+extern int tv_debug;
static int deinterlace_onefield_yuv_mmx(vop2 *v, unsigned char *dest, unsigned char *src,
int width, int height) {
diff -uNr xawdecode/src/vop-deint-weave.c xawdecode-new/src/vop-deint-weave.c
--- xawdecode/src/vop-deint-weave.c 2005-07-09 13:30:10 +0400
+++ xawdecode-new/src/vop-deint-weave.c 2007-09-10 00:47:14 +0400
@@ -13,7 +13,7 @@
#include "vop.h"
#include "memcpy.h"
#include "cpu_accel.h"
-extern int debug;
+extern int tv_debug;
static int deinterlace_weave_yuv_mmx(vop2 *v, unsigned char *dest, unsigned char *src,
int width, int height) {
diff -uNr xawdecode/src/vop.h xawdecode-new/src/vop.h
--- xawdecode/src/vop.h 2004-09-27 14:13:03 +0400
+++ xawdecode-new/src/vop.h 2007-09-10 00:47:14 +0400
@@ -68,7 +68,7 @@
/* variable often used by video operations */
extern int cur_maxheight,cur_maxwidth;
-extern int debug;
+extern int tv_debug;
extern int vop_autograb;
#endif
diff -uNr xawdecode/src/vop-test.c xawdecode-new/src/vop-test.c
--- xawdecode/src/vop-test.c 2005-04-24 12:11:49 +0400
+++ xawdecode-new/src/vop-test.c 2007-09-10 00:47:14 +0400
@@ -13,7 +13,7 @@
/********* VOP COPY ***************************************/
static int treat_copy(vop2 *v, unsigned char *dest, unsigned char *src, int w, int h) {
- if(debug>1) fprintf(stderr, "treat_copy %p %p\n", dest, src);
+ if(tv_debug>1) fprintf(stderr, "treat_copy %p %p\n", dest, src);
fast_memcpy(dest, src, size_img(VIDEO_YUYV,w,h));
return 1;
}
@@ -35,7 +35,7 @@
/* to test with xdtv -vop copyb -grabfmt gray8 */
static int treat_copy_b(vop2 *v, unsigned char *dest, unsigned char *src, int w, int h) {
- if(debug>1) fprintf(stderr, "treat_copy_b %p %p\n", dest, src);
+ if(tv_debug>1) fprintf(stderr, "treat_copy_b %p %p\n", dest, src);
fast_memcpy(dest, src+size_img(VIDEO_YUYV,w,cur_maxheight-h),
size_img(VIDEO_YUYV,w,h));
return 1;
@@ -57,7 +57,7 @@
static int treat_half_late(vop2 *v, unsigned char *dest, unsigned char *src, int w, int h) {
int l;
- if(debug>1) fprintf(stderr, "treat_half_top %p %p\n", dest, src);
+ if(tv_debug>1) fprintf(stderr, "treat_half_top %p %p\n", dest, src);
l=size_img(VIDEO_YUYV,w,h)/2;
fast_memcpy(dest, v->bufs[(v->buf_cur+v->nbufs-10)%v->nbufs], l);
fast_memcpy(dest+l, src+l, l);
@@ -79,7 +79,7 @@
/***** VOP MONOCHROME, just for the fun, try with -grabfmt hi240 */
static int treat_monoc(vop2 *v, unsigned char *dest, unsigned char *src, int w, int h) {
- if(debug>1) fprintf(stderr, "treat_monoc %p %p\n", dest, src);
+ if(tv_debug>1) fprintf(stderr, "treat_monoc %p %p\n", dest, src);
fast_memcpy(dest, src, size_img(VIDEO_GRAY1,w,h));
return 1;
}
@@ -113,7 +113,7 @@
static int treat_rescale(vop2 *v, unsigned char *dest, unsigned char *src, int w, int h) {
int x,y,w2=v->v->width_src,h2=v->v->height_src,wd=w/2,wd2;
- if(debug>1) fprintf(stderr, "treat_rescale %p %p %d %d\n", dest, src , w, h);
+ if(tv_debug>1) fprintf(stderr, "treat_rescale %p %p %d %d\n", dest, src , w, h);
if(w2==-1) w2=cur_maxwidth;
if(h2==-1) h2=cur_maxheight;
if(w2==0) w2=w;
diff -uNr xawdecode/src/wmhooks.c xawdecode-new/src/wmhooks.c
--- xawdecode/src/wmhooks.c 2005-04-23 01:47:44 +0400
+++ xawdecode-new/src/wmhooks.c 2007-09-10 00:47:14 +0400
@@ -363,37 +363,37 @@
for(i=0;i<nitems;i++)
{
atom_name = XGetAtomName(dpy,((long *)args)[i]);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "_NET_WM atom: %s\n", atom_name);
if (strcmp("_NET_WM_STATE", atom_name) == 0)
{
net_wm_state = ((long *)args)[i];
- if (debug)
+ if (tv_debug)
fprintf(stderr,"wmhooks: netwm supports _NET_WM_STATE\n");
}
else if (strcmp("_NET_WM_STATE_STAYS_ON_TOP", atom_name) == 0)
{
net_wm_top = ((long *)args)[i];
- if (debug)
+ if (tv_debug)
fprintf(stderr,"wmhooks: netwm supports _NET_WM_STATE_STAYS_ON_TOP\n");
}
else if (strcmp("_NET_WM_STATE_FULLSCREEN", atom_name) == 0)
{
net_wm_fullscreen = ((long *)args)[i];
- if (debug)
+ if (tv_debug)
fprintf(stderr,"wmhooks: netwm supports _NET_WM_STATE_FULLSCREEN\n");
}
else if (strcmp("_NET_WM_STATE_ABOVE", atom_name) == 0)
{
net_wm_above = ((long *)args)[i];
- if (debug)
+ if (tv_debug)
fprintf(stderr,"wmhooks: netwm supports _NET_WM_STATE_ABOVE\n");
}
}
if (net_wm_state != None)
{
- if (debug)
+ if (tv_debug)
{
fprintf(stderr,"net_wm_fullscreen: %d\n",(int)net_wm_fullscreen);
fprintf(stderr,"net_wm_state: %d\n",(int)net_wm_state);
@@ -440,7 +440,7 @@
for(i=0;i<nitems;i++)
{
atom_name = XGetAtomName(dpy,((long *)args)[i]);
- if (debug)
+ if (tv_debug)
fprintf(stderr, "_WIN_PROTOCOLS atom: %s\n", atom_name);
if (strcmp("_WIN_LAYER", atom_name) == 0)
{
diff -uNr xawdecode/src/x11.c xawdecode-new/src/x11.c
--- xawdecode/src/x11.c 2007-05-01 01:11:26 +0400
+++ xawdecode-new/src/x11.c 2007-09-10 00:47:14 +0400
@@ -366,7 +366,7 @@
if (XShmQueryExtension (dpy))
{
have_shmem = 1;
- if (debug)
+ if (tv_debug)
printf("MIT Shm extension available\n\n");
}
#endif
@@ -378,7 +378,7 @@
if (Success !=
XvQueryExtension (dpy, &xvver, &xvrel, &xvreq, &xvev, &xverr))
{
- if (debug)
+ if (tv_debug)
{
sprintf(xawxvmesstmp, translate("Server does'nt support Xvideo!\n"));
fprintf(stderr, xawxvmesstmp);
@@ -389,7 +389,7 @@
XvQueryAdaptors (dpy, root, &xvadaptors,
&xvai))
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "XvQueryAdaptors failed!\n");
}
else
@@ -397,7 +397,7 @@
sprintf(xawxvmesstmp, translate("Xv version = %d.%d\n\n"), xvver, xvrel);
strcat(xawxvmessage,xawxvmesstmp);
- if (debug)
+ if (tv_debug)
{
fprintf(stderr, "Xv version = %d.%d\n", xvver, xvrel);
fprintf(stderr, "Xv adaptors available = %d\n\n", xvadaptors);
@@ -407,7 +407,7 @@
{
for (j = 0; j < xvai[i].num_formats; j++)
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Format %d = depth:%d id:%x\n", j,
xvai[i].formats[j].depth,
(int) xvai[i].formats[j].visual_id);
@@ -439,7 +439,7 @@
//XvUngrabPort (dpy, xv_img_port, CurrentTime);
break;
}
- } else if(debug)
+ } else if(tv_debug)
fprintf (stderr, "XvImage port %ld does not support %s format\n", k,
int_to_str(xv_format, video_fmt_names));
}
@@ -591,7 +591,7 @@
int find_xvsetdefaults=0;
have_xv = 1;
- if (debug)
+ if (tv_debug)
fprintf (stderr, "XvImage port %ld supports %s format\n\n", xv_img_port, int_to_str(xv_format, video_fmt_names));
xvat = XvQueryPortAttributes (dpy, xv_img_port, &n);
if (xvat != NULL)
@@ -633,7 +633,7 @@
val = xvat[i].max_value;
if(!noxvdefaults) {
XvSetPortAttribute (dpy, xv_img_port, xvattribute, val);
- if (debug)
+ if (tv_debug)
printf("Set XV to defaults values\n");
}
}
@@ -650,7 +650,7 @@
xv_img_colorkey = xvattribute = XInternAtom (dpy, xvat[i].name, True);
val = 0; /*Assume the original value is near zero*/
XvSetPortAttribute (dpy, xv_img_port, xvattribute, val);
- if (debug)
+ if (tv_debug)
printf("XV_COLORKEY = %d\n", val);
}
@@ -660,7 +660,7 @@
xvattribute = XInternAtom (dpy, xvat[i].name, True);
val = (xvat[i].min_value + xvat[i].max_value) / 2;
XvSetPortAttribute (dpy, xv_img_port, xvattribute, val);
- if (debug)
+ if (tv_debug)
printf("XV_BRIGHTNESS = %d\n", val);
}
@@ -669,7 +669,7 @@
xvattribute = XInternAtom (dpy, xvat[i].name, True);
val = (xvat[i].min_value + xvat[i].max_value) / 2;
XvSetPortAttribute (dpy, xv_img_port, xvattribute, val);
- if (debug)
+ if (tv_debug)
printf("XV_CONTRAST = %d\n", val);
}
@@ -678,7 +678,7 @@
xvattribute = XInternAtom (dpy, xvat[i].name, True);
val = (xvat[i].min_value + xvat[i].max_value) / 2;
XvSetPortAttribute (dpy, xv_img_port, xvattribute, val);
- if (debug)
+ if (tv_debug)
printf("XV_SATURATION = %d\n", val);
}
@@ -689,7 +689,7 @@
/*Fixme: assume 0 is good ?*/
val = 0;
XvSetPortAttribute (dpy, xv_img_port, xvattribute, val);
- if (debug)
+ if (tv_debug)
printf("XV_HUE = %d\n", val);
}
}
@@ -804,7 +804,7 @@
}
XFree(pf);
- if (debug)
+ if (tv_debug)
{
fprintf (stderr, "x11: color depth: "
"%d bits - pixmap: %d bytes\n",
@@ -820,7 +820,7 @@
#ifdef HAVE_XV
if ((!disable_xv) && (have_xv))
{
- if (debug)
+ if (tv_debug)
fprintf(stderr, "Forcing x11_pixmap_format to %s\n",
int_to_str(xv_format, video_fmt_names));
x11_pixmap_format = xv_format;
@@ -834,7 +834,7 @@
x11_error_dev_null (Display * dpy, XErrorEvent * event)
{
x11_error++;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, " x11-error");
return 0;
}
@@ -847,7 +847,7 @@
{
XvSetPortAttribute (dpy, xv_img_port, xv_img_colorkey, val);
XvGetPortAttribute (dpy, xv_img_port, xv_img_colorkey, &val);
- if (debug)
+ if (tv_debug)
printf("x11: set_colorkey: XV_COLORKEY = %d\n", val);
}
#endif
@@ -862,7 +862,7 @@
if (have_xv && (xv_img_colorkey != -1))
{
XvGetPortAttribute (dpy, xv_img_port, xv_img_colorkey, &val);
- if (debug)
+ if (tv_debug)
printf("x11; get_colorkey: XV_COLORKEY = %d\n", val);
}
else
@@ -887,7 +887,7 @@
void *old_handler = NULL;
#endif
- if (debug)
+ if (tv_debug)
fprintf (stderr, "video: x11_create_xvimage\n");
#ifdef HAVE_MITSHM
@@ -992,7 +992,7 @@
#ifdef HAVE_MITSHM
}
#endif
- if (debug)
+ if (tv_debug)
fprintf (stderr, "video: x11_destroy_xvimage\n");
}
@@ -1012,7 +1012,7 @@
void *old_handler;
#endif
- if (debug)
+ if (tv_debug)
fprintf (stderr, "video: x11_create_ximage\n");
#ifdef HAVE_MITSHM
if (have_shmem)
@@ -1110,7 +1110,7 @@
#endif
XDestroyImage (ximage);
- if (debug)
+ if (tv_debug)
fprintf (stderr, "video: x11_destroy_ximage\n");
}
@@ -1188,7 +1188,7 @@
uint nchildren, i;
void *old_handler = XSetErrorHandler (x11_error_dev_null);
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, " getclips");
lastcount = oc_count;
oc_count = 0;
@@ -1258,12 +1258,12 @@
if (!move && wmap && visibility == VisibilityUnobscured)
{
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: refresh skipped\n");
return;
}
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: refresh\n");
overlay_refresh = 0;
if (wmap && visibility != VisibilityFullyObscured)
@@ -1292,7 +1292,7 @@
if (!overlay_cb)
return;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: configure");
if (wmap && visibility != VisibilityFullyObscured)
{
@@ -1301,7 +1301,7 @@
else
oc_count = 0;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, " %s\n", conf ? "yes" : "no");
if (conf)
{
@@ -1316,7 +1316,7 @@
}
else
{
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, " off\n");
if (conf && overlay_on)
{
@@ -1362,13 +1362,13 @@
if (wheight > 32768)
wheight -= 65536;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: shell: size %dx%d+%d+%d\n",
wwidth, wheight, wx, wy);
if (force_ratio)
{
- if (debug) fprintf(stderr,"colorkey = %d et cur capture = %d\n",get_colorkey(dpy),cur_capture);
+ if (tv_debug) fprintf(stderr,"colorkey = %d et cur capture = %d\n",get_colorkey(dpy),cur_capture);
if (!fs)
{
if(cur_capture == CAPTURE_OVERLAY) set_colorkey(dpy,temp_colorkey); // re-use the last colorkey in the overlay mode only.
@@ -1473,7 +1473,7 @@
sx,sy,sw,sh, dx,dy,dw,dh))
fprintf(stderr, "Xv video_overlay: XvPutVideo failed!\n");
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Xvideo: video: win=0x%lx, "
"src=%dx%d+%d+%d dst=%dx%d+%d+%d\n",
WINDOW(video), sw,sh,sx,sy, dw,dh,dx,dy);
@@ -1507,28 +1507,28 @@
wy = event->xconfigure.y;
wwidth = event->xconfigure.width;
wheight = event->xconfigure.height;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: shell: cfg %dx%d+%d+%d\n",
wwidth, wheight, wx, wy);
#endif
video_new_size ();
break;
case MapNotify:
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: shell: map\n");
wmap = 1;
conf = 1;
configure_overlay ();
break;
case UnmapNotify:
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: shell: unmap\n");
wmap = 0;
conf = 1;
configure_overlay ();
break;
default:
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: shell: %s\n", events[event->type]);
}
return;
@@ -1548,12 +1548,12 @@
if (did_refresh)
{
did_refresh = 0;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: tv: last refresh expose\n");
}
else
{
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: tv: expose\n");
conf = 1;
configure_overlay ();
@@ -1566,7 +1566,7 @@
{
/* tv */
visibility = event->xvisibility.state;
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: tv: visibility %d%s\n",
event->xvisibility.state,
did_refresh ? " (ignored)" : "");
@@ -1584,7 +1584,7 @@
else
{
/* root */
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: root: visibility\n");
}
break;
@@ -1593,7 +1593,7 @@
case ConfigureNotify:
if (event->xvisibility.window != WINDOW (video))
{
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: root: %s%s\n",
events[event->type],
did_refresh ? " (ignored)" : "");
@@ -1602,7 +1602,7 @@
}
break;
default:
- if (debug > 1)
+ if (tv_debug > 1)
fprintf (stderr, "video: tv(+root): %s\n", events[event->type]);
break;
}
@@ -1645,7 +1645,7 @@
sx,sy,sw,sh, dx,dy,dw,dh))
fprintf(stderr, "Xv video_overlay: XvPutVideo failed!\n");
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Xvideo: video: win=0x%lx, "
"src=%dx%d+%d+%d dst=%dx%d+%d+%d\n",
WINDOW(video), sw,sh,sx,sy, dw,dh,dx,dy);
@@ -1663,7 +1663,7 @@
XvStopVideo(dpy, xv_video_port, WINDOW(video));
XvUngrabPort(dpy, xv_video_port, CurrentTime);
grabbed = 0;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Xvideo: video off\n");
}
}
diff -uNr xawdecode/src/x11params_ui.c xawdecode-new/src/x11params_ui.c
--- xawdecode/src/x11params_ui.c 2007-05-01 01:11:26 +0400
+++ xawdecode-new/src/x11params_ui.c 2007-09-10 00:47:14 +0400
@@ -75,7 +75,7 @@
extern Widget c_cap;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
extern int xawpopup;
extern char xawxvmessage [1024];
extern int blackborder;
@@ -225,7 +225,7 @@
ALI(LAB_WIDTH4, translate("Fullscreen Mode")),
int_to_str (switch_method, x11_method_list));
XtVaSetValues (c_fullscreen_mode, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Fullscreen mode: %d\n",switch_method);
}
break;
@@ -239,7 +239,7 @@
ALI(LAB_WIDTH4, translate("Fullscreen Resolution")),
int_to_str (x11_fullscreen_resolution, x11_resolution_list));
XtVaSetValues (c_fullscreen_resolution, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Fullscreen Resolution: %d\n",x11_fullscreen_resolution);
sscanf (int_to_str (x11_fullscreen_resolution, x11_resolution_list), "%d x %d", &fs_width, &fs_height);
}
@@ -254,7 +254,7 @@
ALI(LAB_WIDTH,translate( "Blackborder Mode")),
int_to_str (x11_blackborder_mode, blackborder_mode_list));
XtVaSetValues (c_blackborder_mode, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Blackborder Mode: %d\n",x11_blackborder_mode);
if(j<sizeof(ratios)/sizeof(double)-1) {
int b=ratios[j]*YBAR_DEN/2;
@@ -272,7 +272,7 @@
ALI(LAB_WIDTH4, translate("Auto Grabdisplay")),
int_to_str (vop_autograb, x11_onoff_list));
XtVaSetValues (c_autograb, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Auto Grabdisplay: %d\n",vop_autograb);
if (!vop_autograb)
XtVaSetValues(c_cap, XtNsensitive, True, NULL);
@@ -289,7 +289,7 @@
ALI(LAB_WIDTH4, translate("Force Ratio")),
int_to_str (force_ratio, x11_onoff_list));
XtVaSetValues (c_forceratio, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Force Ratio: %d\n",force_ratio);
}
break;
@@ -302,7 +302,7 @@
ALI(LAB_WIDTH4, translate("Adjust Width")),
int_to_str (adjust_width, x11_onoff_list));
XtVaSetValues (c_adjustwidth, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Adjust Width: %d\n",vop_autograb);
}
break;
@@ -528,7 +528,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (x11params_shell), XtWindow (x11params_shell), NULL, 0);
return;
@@ -789,7 +789,7 @@
if(!t_xv_colorkey_str) return;
XtVaGetValues (t_xv_colorkey_str, XtNstring, &colorkey_str, NULL);
sscanf (colorkey_str, "%d", &i);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"colorkey = %s\n",colorkey_str);
set_colorkey(dpy, i);
temp_colorkey = get_colorkey(dpy);
@@ -799,11 +799,11 @@
{
if(!t_fullscreen_wmoffby_str) return;
XtVaGetValues (t_fullscreen_wmoffby_str, XtNstring, &wmoffby_str, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"wmoffby = %s\n",wmoffby_str);
if (2 != sscanf (wmoffby_str, "%d x %d", &fs_xoff, &fs_yoff))
fs_xoff = fs_yoff = 0;
- if (debug)
+ if (tv_debug)
fprintf(stderr,"fs_xoff & fs_yoff = %d & %d\n",fs_xoff, fs_yoff);
}
@@ -811,13 +811,13 @@
{
if(!t_pixmaps_size_str) return;
XtVaGetValues (t_pixmaps_size_str, XtNstring, &pixmaps_size_str, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"pixmaps_size = %s\n",pixmaps_size_str);
if (2 != sscanf (pixmaps_size_str, "%d x %d", &pix_width, &pix_height))
{
pix_width = 128;
pix_height = 96;
}
- if (debug)
+ if (tv_debug)
fprintf(stderr,"pix_width & pix_height = %d & %d\n",pix_width, pix_height);
}
diff -uNr xawdecode/src/xdtv_scantv.c xawdecode-new/src/xdtv_scantv.c
--- xawdecode/src/xdtv_scantv.c 2007-02-16 01:13:50 +0300
+++ xawdecode-new/src/xdtv_scantv.c 2007-09-10 00:47:14 +0400
@@ -44,7 +44,7 @@
#include "translation.h"
-int debug = 0;
+int tv_debug = 0;
int webcam = 0;
/* used in colorspace.c */
@@ -263,7 +263,7 @@
else if(strcmp (arg, "-v") == 0)
{
INCRARG(i);
- debug=atoi(arg);
+ tv_debug=atoi(arg);
}
else if(strcmp (arg, "-o") == 0)
{
diff -uNr xawdecode/src/xosdparams_ui.c xawdecode-new/src/xosdparams_ui.c
--- xawdecode/src/xosdparams_ui.c 2007-02-25 20:52:20 +0300
+++ xawdecode-new/src/xosdparams_ui.c 2007-09-10 00:47:14 +0400
@@ -74,7 +74,7 @@
extern Widget app_shell, c_xosdaction;
extern Display *dpy;
extern Atom wm_protocols[2];
-extern int debug;
+extern int tv_debug;
extern int message_timer;
extern int outline_offset;
extern int shadow_offset;
@@ -370,7 +370,7 @@
ALI(LAB_WIDTH3, translate("Text Color")),
translate(colorname));
XtVaSetValues (c_text_color, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Text Color: %s\n",colour);
}
break;
@@ -383,7 +383,7 @@
ALI(LAB_WIDTH3, translate("Outline Color")),
translate(outline_colour_name));
XtVaSetValues (c_outline_color, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Outline Color: %s\n",outline_colour);
}
break;
@@ -397,7 +397,7 @@
XtVaSetValues (c_main_font_type, XtNlabel, label, NULL);
sprintf (main_font, int_to_str (main_font_type, xosd_font_type_list));
sprintf (font,strdup("-*-%s-*-*-*-*-*-%s-*-*-*-*-*-*"),main_font,main_size);
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"Main Font Type: %s\n",main_font);
fprintf(stderr,"Main Font: %s\n",font);
}
@@ -413,7 +413,7 @@
XtVaSetValues (c_main_font_size, XtNlabel, label, NULL);
sprintf (main_size, int_to_str (main_font_size, xosd_font_size_list));
sprintf (font,strdup("-*-%s-*-*-*-*-*-%s-*-*-*-*-*-*"),main_font,main_size);
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"Main Font Size: %s\n",main_size);
fprintf(stderr,"Main Font: %s\n",font);
}
@@ -429,7 +429,7 @@
XtVaSetValues (c_vtx_font_type, XtNlabel, label, NULL);
sprintf (vtx_font, int_to_str (vtx_font_type, xosd_font_type_list));
sprintf (font_vtx,strdup("-*-%s-*-*-*-*-*-%s-*-*-*-*-*-*"),vtx_font,vtx_size);
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"Main Font Type: %s\n",vtx_font);
fprintf(stderr,"Main Font: %s\n",font_vtx);
}
@@ -446,7 +446,7 @@
XtVaSetValues (c_vtx_font_size, XtNlabel, label, NULL);
sprintf (vtx_size, int_to_str (vtx_font_size, xosd_font_size_list));
sprintf (font_vtx,strdup("-*-%s-*-*-*-*-*-%s-*-*-*-*-*-*"),vtx_font,vtx_size);
- if (debug) {
+ if (tv_debug) {
fprintf(stderr,"Main Font Size: %s\n",vtx_size);
fprintf(stderr,"Main Font: %s\n",font_vtx);
}
@@ -482,7 +482,7 @@
ALI(LAB_WIDTH3, translate("Message Timer")), value);
if (l_mess_timer)
XtVaSetValues(l_mess_timer, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,translate("Message Timer: %d\n"),message_timer);
}
if (0 == strcmp(name, "out_offset"))
@@ -497,7 +497,7 @@
ALI(LAB_WIDTH3, translate("Outline Offset")), value);
if (l_out_offset)
XtVaSetValues(l_out_offset, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,translate("Outline Offset: %d\n"),outline_offset);
}
if (0 == strcmp(name, "sdw_offset"))
@@ -512,7 +512,7 @@
ALI(LAB_WIDTH3, translate("Shadow Offset")), value);
if (l_sdw_offset)
XtVaSetValues(l_sdw_offset, XtNlabel, label, NULL);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"Shadow Offset: %d\n",shadow_offset);
}
}
@@ -580,7 +580,7 @@
{
if (event->xclient.data.l[0] == wm_protocols[1])
{
- if (debug)
+ if (tv_debug)
fprintf (stderr, "Config: wm_save_yourself\n");
XSetCommand (XtDisplay (xosdparams_shell), XtWindow (xosdparams_shell), NULL, 0);
return;
diff -uNr xawdecode/src/xscreensaver.c xawdecode-new/src/xscreensaver.c
--- xawdecode/src/xscreensaver.c 2006-06-27 02:29:42 +0400
+++ xawdecode-new/src/xscreensaver.c 2007-09-10 00:47:14 +0400
@@ -61,7 +61,7 @@
static Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_RESPONSE;
static Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_EXIT;
static Atom XA_VROOT, XA_SELECT, XA_DEMO, XA_BLANK, XA_LOCK;
-extern int debug;
+extern int tv_debug;
static XErrorHandler old_handler = 0;
@@ -513,7 +513,7 @@
fflush (stdout);
fflush (stderr);
- if (debug)
+ if (tv_debug)
fprintf(stderr,"status = %d\n",status);
return (status < 0 ? status : 0);
}