[Mplayer-cvslog] CVS: main help_mp-hu.h,1.32,1.33 mp_msg.h,1.22,1.23 subreader.c,1.63,1.64
Arpi of Ize
arpi at mplayerhq.hu
Tue Jun 4 01:23:35 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv4177
Modified Files:
help_mp-hu.h mp_msg.h subreader.c
Log Message:
msg/i18n fixes and some printf->mp_msg
Index: help_mp-hu.h
===================================================================
RCS file: /cvsroot/mplayer/main/help_mp-hu.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- help_mp-hu.h 3 Jun 2002 21:57:10 -0000 1.32
+++ help_mp-hu.h 3 Jun 2002 23:23:02 -0000 1.33
@@ -64,7 +64,7 @@
#define MSGTR_Exit_quit "Kilépés"
#define MSGTR_Exit_eof "Vége a file-nak"
#define MSGTR_Exit_error "Végzetes hiba"
-#define MSGTR_IntBySignal "\nAz MPlayer futása %d szignál miatt megszakadt a %s modulban\n"
+#define MSGTR_IntBySignal "\nAz MPlayer futása %d-es szignál miatt megszakadt a %s modulban\n"
#define MSGTR_NoHomeDir "Nem találom a HOME konyvtárat\n"
#define MSGTR_GetpathProblem "get_path(\"config\") probléma\n"
#define MSGTR_CreatingCfgFile "Konfigurációs file létrehozása: %s\n"
Index: mp_msg.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- mp_msg.h 17 May 2002 23:47:21 -0000 1.22
+++ mp_msg.h 3 Jun 2002 23:23:02 -0000 1.23
@@ -79,6 +79,7 @@
#define MSGT_SWS 34
#define MSGT_VOBSUB 35
+#define MSGT_SUBREADER 36
#define MSGT_MAX 64
Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- subreader.c 31 May 2002 21:48:36 -0000 1.63
+++ subreader.c 3 Jun 2002 23:23:02 -0000 1.64
@@ -13,6 +13,7 @@
#include <ctype.h>
#include "config.h"
+#include "mp_msg.h"
#include "subreader.h"
#define ERR ((void *) -1)
@@ -188,7 +189,7 @@
while ((next =sub_readtext (next, &(current->text[i])))) {
if (current->text[i]==ERR) {return ERR;}
i++;
- if (i>=SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");current->lines=i;return current;}
+ if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;}
}
current->lines= ++i;
@@ -325,7 +326,7 @@
while ((next =sub_readtext (next, &(current->text[i])))) {
if (current->text[i]==ERR) {return ERR;}
i++;
- if (i>=SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");current->lines=i;return current;}
+ if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;}
}
current->lines=i+1;
}
@@ -366,7 +367,7 @@
while ((next =sub_readtext (next, &(current->text[i])))) {
if (current->text[i]==ERR) {return ERR;}
i++;
- if (i>=SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");current->lines=i;return current;}
+ if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;}
}
}
current->lines=i+1;
@@ -505,7 +506,7 @@
while ((next =sub_readtext (next, &(current->text[i])))) {
if (current->text[i]==ERR) {return ERR;}
i++;
- if (i>=SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");current->lines=i;return current;}
+ if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;}
}
current->lines=i+1;
@@ -551,7 +552,7 @@
while ((next =sub_readtext (next, &(current->text[i])))) {
if (current->text[i]==ERR) {return ERR;}
i++;
- if (i>=SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");current->lines=i;return current;}
+ if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;}
}
current->lines=i+1;
@@ -633,10 +634,10 @@
icdsc = (iconv_t)(-1);
if (sub_cp){
if ((icdsc = iconv_open (tocp, sub_cp)) != (iconv_t)(-1)){
- printf ("SUB: opened iconv descriptor.\n");
+ mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: opened iconv descriptor.\n");
sub_utf8 = 2;
} else
- printf ("SUB: error opening iconv descriptor.\n");
+ mp_msg(MSGT_SUBREADER,MSGL_ERR,"SUB: error opening iconv descriptor.\n");
}
}
@@ -644,7 +645,7 @@
{
if (icdsc != (iconv_t)(-1)){
(void) iconv_close (icdsc);
- printf ("SUB: closed iconv descriptor.\n");
+ mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: closed iconv descriptor.\n");
}
}
@@ -665,12 +666,12 @@
if (iconv(icdsc, &ip, &ileft,
&op, &oleft) == (size_t)(-1)) {
- printf ("SUB: error recoding line.\n");
+ mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: error recoding line.\n");
l++;
break;
}
if (!(ot = (char *)malloc(op - icbuffer + 1))){
- printf ("SUB: error allocating mem.\n");
+ mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: error allocating mem.\n");
l++;
break;
}
@@ -714,7 +715,7 @@
sub = nextsub;
m = 0;
}
- if (n) printf ("SUB: Adjusted %d subtitle(s).\n", n);
+ if (n) mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Adjusted %d subtitle(s).\n", n);
}
subtitle* sub_read_file (char *filename, float fps) {
@@ -743,8 +744,8 @@
fd=fopen (filename, "r"); if (!fd) return NULL;
sub_format=sub_autodetect (fd);
- if (sub_format==SUB_INVALID) {printf ("SUB: Could not determine file format\n");return NULL;}
- printf ("SUB: Detected subtitle file format: %s\n", fmtname[sub_format]);
+ if (sub_format==SUB_INVALID) {mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: Could not determine file format\n");return NULL;}
+ mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Detected subtitle file format: %s\n", fmtname[sub_format]);
rewind (fd);
@@ -779,9 +780,9 @@
#endif
// printf ("SUB: Subtitle format %s time.\n", sub_uses_time?"uses":"doesn't use");
- printf ("SUB: Read %i subtitles", sub_num);
- if (sub_errs) printf (", %i bad line(s).\n", sub_errs);
- else printf (".\n");
+ mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Read %i subtitles", sub_num);
+ if (sub_errs) mp_msg(MSGT_SUBREADER,MSGL_INFO,", %i bad line(s).\n", sub_errs);
+ else mp_msg(MSGT_SUBREADER,MSGL_INFO,".\n");
if(sub_num<=0){
free(first);
@@ -861,7 +862,7 @@
// printf("trying: '%s'\n",sub_name);
if((f=fopen( sub_name,"rt" ))) {
fclose( f );
- printf( "SUB: Detected sub file: %s\n",sub_name );
+ mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Detected sub file: %s\n",sub_name );
if (i<2) sub_utf8=1;
return sub_name;
}
@@ -929,7 +930,7 @@
fprintf(fd,"\n");
}
fclose(fd);
- printf ("SUB: Subtitles dumped in \'dumpsub.srt\'.\n");
+ mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Subtitles dumped in \'dumpsub.srt\'.\n");
}
void dump_mpsub(subtitle* subs, float fps){
@@ -976,7 +977,7 @@
fprintf (fd, "\n");
}
fclose (fd);
- printf ("SUB: Subtitles dumped in \'dump.mpsub\'.\n");
+ mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Subtitles dumped in \'dump.mpsub\'.\n");
}
void sub_free( subtitle * subs )
More information about the MPlayer-cvslog
mailing list