np patch для mp3blaster (patch mp3 log)
Ключевые слова: patch, mp3, log, (найти похожие документы)
Date: Mon, 19 Jan 2004 02:00:01 +0500
From: Ivan Churkin <2:5015/10.23>
Newsgroups: ftn.ru.linux
Subject: np patch для mp3blaster
patch for Mp3blaster v3.1.3 (C)1997 - 2001 Bram Avontuur на тему нормального np
коий можно наблюдать у меня в конце подписи.
-+- ./src/main.cc Sun Oct 20 18:19:08 2002
+++ ./src/main.cc Mon Jul 28 01:40:15 2003
@@ -320,6 +320,7 @@
int
main(int argc, char *argv[], char *envp[])
{
+ FILE *NP;
int
c,
long_index,
@@ -374,6 +375,9 @@
init_playopts();
set_default_colours(); // fill globalopts.colours with default values.
/* parse arguments */
+ NP=fopen("/tmp/np","w");
+ fprintf(NP,"Mp3blaster not active.");
+ fclose(NP);
while (1)
{
static struct option long_options[] =
@@ -4456,22 +4460,30 @@
set_song_status(playstatus_t s)
{
int maxy, maxx;
+ struct song_info &si = songinf.songinfo;
+ FILE *NP;
+ NP=fopen("/tmp/np","w");
getmaxyx(stdscr,maxy,maxx);
move(maxy-3,1);
switch(s)
{
- case PS_PLAY: addstr("|>");break;
- case PS_PAUSE: addstr("||");break;
- case PS_REWIND: addstr("<<");break;
- case PS_FORWARD: addstr(">>");break;
- case PS_PREV: addstr("|<");break;
- case PS_NEXT: addstr(">|");break;
- case PS_STOP: addstr("[]"); mw_clear(); break;
- case PS_RECORD: addstr("()");break;
+ case PS_PLAY: addstr("|>");fprintf(NP,"Playing ");break;
+ case PS_PAUSE: addstr("||");fprintf(NP,"Paused ");break;
+ case PS_REWIND: addstr("<<");fprintf(NP,"Rewinding ");break;
+ case PS_FORWARD: addstr(">>");fprintf(NP,"Forwarding ");break;
+ case PS_PREV: addstr("|<");fprintf(NP,"Prev ");break;
+ case PS_NEXT: addstr(">|");fprintf(NP,"Next ");break;
+ case PS_STOP: addstr("[]"); mw_clear(); fprintf(NP,"Stoped"); break;
+ case PS_RECORD: addstr("()");fprintf(NP,"Recording ");break;
default: break;
}
refresh();
+ if (si.songname[0]=='\0')
+ fprintf(NP,"%s\n",songinf.path);
+ else
+ fprintf(NP,"%s - %s - %s\n",(si.artist[0]=='\0' ? "<Unknown Artist>"
: si.artist), (si.album[0]=='\0' ? "<Unknown Album>" : si.album), si.songname);
+ fclose(NP);
}
void
From: "vadim s. sabinich" <vadim_s._sabinich@f264.n5070.z2.fidonet.org.>
EY> Hеужели ни у кого не сохранился патчик для np: в mp3blaster?
Вот пристал ;))
в ru.linux.* пролетло несколько реализаций подобного. Зачем тебе именно тот
патчик?
Вроде, этот. (просто, было несколько версий патча. какой из них самый-самый
- не помню. да и остался только этот.
diff -Naur /tmp/mp3blaster-3.1.3/src/config.cc ../src/config.cc
- --- ./src/config.cc Sat Sep 21 00:40:15 2002
+++ ./src/config.cc Tue Aug 5 01:39:28 2003
@@ -162,6 +162,7 @@
{ "Key.Home", 2 },
{ "Key.End", 2 },
{ "PanSize", 0 },
+{ "NPFile", 15 },
{ NULL, 0 }, /* last entry's keyword MUST be NULL */
};
@@ -534,6 +535,12 @@
return 0;
}
break;
+ case 104:
+ {
+ globalopts.npfile=new char [strlen(values[0])];
+ strcpy(globalopts.npfile,values[0]);
+ break;
+ }
}
return 1;
diff -Naur /tmp/mp3blaster-3.1.3/src/main.cc ../src/main.cc
- --- ./src/main.cc Sun Oct 20 18:19:08 2002
+++ ./src/main.cc Mon Aug 4 22:20:42 2003
@@ -320,6 +320,7 @@
int
main(int argc, char *argv[], char *envp[])
{
+ FILE *NP;
int
c,
long_index,
@@ -374,6 +375,12 @@
init_playopts();
set_default_colours(); // fill globalopts.colours with default values.
/* parse arguments */
+ if(globalopts.npfile!=NULL)
+ {
+ NP=fopen(globalopts.npfile,"w");
+ fprintf(NP,"Mp3blaster not active.");
+ fclose(NP);
+ }
while (1)
{
static struct option long_options[] =
@@ -4456,21 +4463,45 @@
set_song_status(playstatus_t s)
{
int maxy, maxx;
-
+ struct song_info &si = songinf.songinfo;
+ FILE *NP;
getmaxyx(stdscr,maxy,maxx);
- move(maxy-3,1);
+ move(maxy-3,1);
+ if(globalopts.npfile!=NULL)
+ {
+ NP=fopen(globalopts.npfile,"w");
switch(s)
{
- case PS_PLAY: addstr("|>");break;
- case PS_PAUSE: addstr("||");break;
- case PS_REWIND: addstr("<<");break;
- case PS_FORWARD: addstr(">>");break;
- case PS_PREV: addstr("|<");break;
- case PS_NEXT: addstr(">|");break;
- case PS_STOP: addstr("[]"); mw_clear(); break;
- case PS_RECORD: addstr("()");break;
+ case PS_PLAY: addstr("|>");fprintf(NP,"Playing ");break;
+ case PS_PAUSE: addstr("||");fprintf(NP,"Paused ");break;
+ case PS_REWIND: addstr("<<");fprintf(NP,"Rewinding ");break;
+ case PS_FORWARD: addstr(">>");fprintf(NP,"Forwarding ");break;
+ case PS_PREV: addstr("|<");fprintf(NP,"Prev ");break;
+ case PS_NEXT: addstr(">|");fprintf(NP,"Next ");break;
+ case PS_STOP: addstr("[]"); mw_clear(); fprintf(NP,"Stoped "); break;
+ case PS_RECORD: addstr("()");fprintf(NP,"Recording ");break;
default: break;
}
+ if (si.songname[0]=='\0')
+ fprintf(NP,"%s\n",songinf.path);
+ else
+ fprintf(NP,"%s - %s - %s\n",(si.artist[0]=='\0' ? "<Unknown Artist>" : si.artist), (si.album[0]=='\0' ? "<Unknown Album>" : si.album), si.songname);
+ fclose(NP);
+ }
+ else {
+ switch(s)
+ {
+ case PS_PLAY: addstr("|>");break;
+ case PS_PAUSE: addstr("||");break;
+ case PS_REWIND: addstr("<<");break;
+ case PS_FORWARD: addstr(">>");break;
+ case PS_PREV: addstr("|<");break;
+ case PS_NEXT: addstr(">|");break;
+ case PS_STOP: addstr("[]"); mw_clear(); break;
+ case PS_RECORD: addstr("()");break;
+ default: break;
+ }
+ }
refresh();
}
@@ -4835,6 +4866,7 @@
globalopts.selectitems_caseinsensitive = 1; //only works for regexp search
globalopts.scan_mp3s = 0; //scan mp3's to calculate correct total time.
globalopts.wraplist = true;
+ globalopts.npfile=NULL;
}
void
diff -Naur /tmp/mp3blaster-3.1.3/src/mp3blaster.h ../src/mp3blaster.h
- --- ./src/mp3blaster.h Sat Sep 21 00:40:15 2002
+++ ./src/mp3blaster.h Mon Aug 4 13:33:02 2003
@@ -132,6 +132,7 @@
short scan_mp3s;
bool wraplist; // non-zero if user wants scrollwins to wrap on scrolling
short pan_size;
+ char *npfile;
};
enum keydescs { Main_SelectFiles, Fileman_AddFiles, Playwin_Previous };
1, Ivan Churkin (?), 09:44, 03/11/2005 [ответить]
| +/– |
Последняя версия:
home.sinn.ru/~spirit/patchs/mp3blaster/patch-np_v10.diff.gz
Из нового - умеет изменять заголовок xterm'а и ему подобных + ещё чего-то не помню уже.=) | |
|