- Update optional patch for SJIS_TAG option
PR: ports/75511 Submitted by: Yamashiro, Jun <yamajun@ofug.net>
This commit is contained in:
parent
0321805ba0
commit
8cab0d0774
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=125310
@ -1,6 +1,6 @@
|
||||
--- ./src/mpg_tagutil.c.orig Thu Oct 25 10:56:57 2001
|
||||
+++ ./src/mpg_tagutil.c Fri Jan 4 05:58:35 2002
|
||||
@@ -149,6 +149,12 @@
|
||||
--- src/mpg_tagutil.c.orig Sun Aug 18 12:29:35 2002
|
||||
+++ src/mpg_tagutil.c Sun Dec 26 01:58:21 2004
|
||||
@@ -162,6 +162,12 @@
|
||||
FILE *f;
|
||||
gchar buf[130];
|
||||
gint i;
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
f = fopen(path,"r+");
|
||||
if (!f)
|
||||
@@ -209,11 +215,67 @@
|
||||
@@ -222,6 +228,86 @@
|
||||
}
|
||||
|
||||
strncpy(buf, "TAG", 3);
|
||||
@ -26,7 +26,7 @@
|
||||
+ free(ctp);
|
||||
+ }
|
||||
+ else {
|
||||
+ printf("fail to convert title tag encoding\n");
|
||||
+ printf("fail to convert title tag encoding\n");
|
||||
+ fclose(f);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
@ -39,7 +39,7 @@
|
||||
+ free(ctp);
|
||||
+ }
|
||||
+ else {
|
||||
+ printf("fail to convert artist tag encoding\n");
|
||||
+ printf("fail to convert artist tag encoding\n");
|
||||
+ fclose(f);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
@ -52,32 +52,58 @@
|
||||
+ free(ctp);
|
||||
+ }
|
||||
+ else {
|
||||
+ printf("fail to convert album tag encoding\n");
|
||||
+ printf("fail to convert album tag encoding\n");
|
||||
+ fclose(f);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ if (year) strncpy(buf + 93, year, 4);
|
||||
+ if (comment && *comment) {
|
||||
+ if (comment && track == 0 && strlen(ctp) > 28)
|
||||
+ {
|
||||
+ /* comment is longer than 28 and no track number,
|
||||
+ * write a v1.0 tag to enable larger comments
|
||||
+ */
|
||||
+ strncpy(tmpbuf, comment, 30);
|
||||
+ ctp = to_string_sjis_from_euc(tmpbuf);
|
||||
+ if (ctp) {
|
||||
+ if (ctp)
|
||||
+ {
|
||||
+ strncpy(buf + 97, ctp, 30);
|
||||
+ free(ctp);
|
||||
+ }
|
||||
+ else {
|
||||
+ printf("fail to convert comment tag encoding\n");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ printf("fail to convert comment tag encoding\n");
|
||||
+ fclose(f);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ buf[126] = track;
|
||||
+
|
||||
+ strncpy(tmpbuf, comment, 30);
|
||||
+ ctp = to_string_sjis_from_euc(tmpbuf);
|
||||
+ if (ctp)
|
||||
+ {
|
||||
+ strncpy(buf + 97, ctp, 28);
|
||||
+ free(ctp);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ printf("fail to convert comment tag encoding\n");
|
||||
+ fclose(f);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
if (title) strncpy(buf + 3, title, 30);
|
||||
if (artist) strncpy(buf + 33, artist, 30);
|
||||
if (album) strncpy(buf + 63, album, 30);
|
||||
if (year) strncpy(buf + 93, year, 4);
|
||||
if (comment) strncpy(buf + 97, comment, 30);
|
||||
@@ -239,6 +325,7 @@
|
||||
if (comment) strncpy(buf + 97, comment, 28);
|
||||
buf[126] = track;
|
||||
}
|
||||
+#endif
|
||||
|
||||
for (i=0; i<128; i++)
|
||||
{
|
||||
buf[127] = genre;
|
||||
|
Loading…
Reference in New Issue
Block a user