diff options
author | pav <pav@FreeBSD.org> | 2004-12-28 11:24:29 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-12-28 11:24:29 +0800 |
commit | 082253bb895e994b14e6df75744c0ac111a4db5b (patch) | |
tree | 3d4047487847b4e8d308f2e0f1e904b08e64125c | |
parent | e05f6d3384db08b9fb870a5a85d3a34fe854c27d (diff) | |
download | freebsd-ports-gnome-082253bb895e994b14e6df75744c0ac111a4db5b.tar.gz freebsd-ports-gnome-082253bb895e994b14e6df75744c0ac111a4db5b.tar.zst freebsd-ports-gnome-082253bb895e994b14e6df75744c0ac111a4db5b.zip |
- Update optional patch for SJIS_TAG option
PR: ports/75511
Submitted by: Yamashiro, Jun <yamajun@ofug.net>
-rw-r--r-- | japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c | 58 |
1 files changed, 42 insertions, 16 deletions
diff --git a/japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c b/japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c index bf6afa130d89..d1dd04cfc25c 100644 --- a/japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c +++ b/japanese/gqmpeg/files/extra-patch-src::mpg_tagutil.c @@ -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"); ++ fclose(f); ++ return FALSE; ++ } ++ + } -+ else { -+ printf("fail to convert comment tag encoding\n"); ++ 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; |