OSDN Git Service

add dist
[rec10/rec10-git.git] / dist / trunk / tstools / epgdump / patch_r2
diff --git a/dist/trunk/tstools/epgdump/patch_r2 b/dist/trunk/tstools/epgdump/patch_r2
new file mode 100755 (executable)
index 0000000..6d59eb9
--- /dev/null
@@ -0,0 +1,145 @@
+diff -rcw epgdumpr2.old/eit.c epgdumpr2/eit.c
+*** epgdumpr2.old/eit.c        2009-03-15 19:02:33.000000000 +0900
+--- epgdumpr2/eit.c    2009-03-24 20:45:25.961750270 +0900
+***************
+*** 6,11 ****
+--- 6,14 ----
+  
+  char         *subtitle_cnv_str[] = {
+       "¡¡Âè",
++      "¡¼Âè",
++      "-Âè",
++      " Âè",
+       "¡¡¡Ö",
+       "¡¡¡ô",
+       "¡Ê",
+***************
+*** 39,45 ****
+       return 14;
+  }
+  
+! int parseEITbody(unsigned char *data, EITbody *b) {
+       int boff = 0;
+       int tnum;
+       char buf[4];
+--- 42,49 ----
+       return 14;
+  }
+  
+! int parseEITbody(unsigned char *data, EITbody *b)
+! {
+       int boff = 0;
+       int tnum;
+       char buf[4];
+***************
+*** 78,97 ****
+  
+       b->yy += 1900;
+    
+       sprintf(buf, "%x", b->start_time[2]);
+       b->hh = atoi(buf);
+       sprintf(buf, "%x", b->start_time[3]);
+       b->hm = atoi(buf);
+       sprintf(buf, "%x", b->start_time[4]);
+       b->ss = atoi(buf);
+  
+       sprintf(buf, "%x", b->duration[0]);
+       b->dhh = atoi(buf);
+       sprintf(buf, "%x", b->duration[1]);
+       b->dhm = atoi(buf);
+       sprintf(buf, "%x", b->duration[2]);
+       b->dss = atoi(buf);
+!   
+       return 12;
+  }
+  
+--- 82,110 ----
+  
+       b->yy += 1900;
+    
++      memset(buf, '\0', sizeof(buf));
+       sprintf(buf, "%x", b->start_time[2]);
+       b->hh = atoi(buf);
++      memset(buf, '\0', sizeof(buf));
+       sprintf(buf, "%x", b->start_time[3]);
+       b->hm = atoi(buf);
++      memset(buf, '\0', sizeof(buf));
+       sprintf(buf, "%x", b->start_time[4]);
+       b->ss = atoi(buf);
+  
++      if((b->duration[0] == 0xFF) && (b->duration[1] == 0xFF) && (b->duration[2] == 0xFF)){
++              b->dhh = b->dhm = b->dss = 0;
++      }else{
++              memset(buf, '\0', sizeof(buf));
+               sprintf(buf, "%x", b->duration[0]);
+               b->dhh = atoi(buf);
++              memset(buf, '\0', sizeof(buf));
+               sprintf(buf, "%x", b->duration[1]);
+               b->dhm = atoi(buf);
++              memset(buf, '\0', sizeof(buf));
+               sprintf(buf, "%x", b->duration[2]);
+               b->dss = atoi(buf);
+!      }
+       return 12;
+  }
+  
+***************
+*** 269,274 ****
+--- 282,291 ----
+               if(ptr == NULL){
+                       continue ;
+               }
++              // ¥¿¥¤¥È¥ë¤¬¤Ê¤¯¤Ê¤é¤Ê¤¤¤è¤¦¤Ë
++              if(ptr == eitptr->title){
++                      continue ;
++              }
+               newsubtitle = calloc(1, ((strlen(ptr) + 1) + (strlen(eitptr->subtitle) + 1)));
+               memcpy(newsubtitle, ptr, strlen(ptr));
+               newsubtitle[strlen(ptr)] = ' ';
+diff -rcw epgdumpr2.old/epgdump.c epgdumpr2/epgdump.c
+*** epgdumpr2.old/epgdump.c    2009-03-15 21:29:33.000000000 +0900
+--- epgdumpr2/epgdump.c        2009-03-24 20:55:30.885022486 +0900
+***************
+*** 177,183 ****
+       char    *inptr ;
+       size_t  ilen;
+       size_t  olen;
+!      time_t  time ;
+       time_t  end_time ;
+       struct  tm      tl ;
+       struct  tm      *endtl ;
+--- 177,183 ----
+       char    *inptr ;
+       size_t  ilen;
+       size_t  olen;
+!      time_t  l_time ;
+       time_t  end_time ;
+       struct  tm      tl ;
+       struct  tm      *endtl ;
+***************
+*** 239,247 ****
+               tl.tm_wday = 0;
+               tl.tm_isdst = 0;
+               tl.tm_yday = 0;
+!              time = mktime(&tl);
+!              end_time = time + eitcur->ehh * 3600 + eitcur->emm * 60 + eitcur->ess;
+               endtl = localtime(&end_time);
+               memset(cendtime, '\0', sizeof(cendtime));
+               memset(cstarttime, '\0', sizeof(cstarttime));
+               strftime(cendtime, (sizeof(cendtime) - 1), "%Y%m%d%H%M%S", endtl);
+--- 239,253 ----
+               tl.tm_wday = 0;
+               tl.tm_isdst = 0;
+               tl.tm_yday = 0;
+!              l_time = mktime(&tl);
+!              if((eitcur->ehh == 0) && (eitcur->emm == 0) && (eitcur->ess == 0)){
+!                      (void)time(&l_time);
+!                      end_time = l_time + (60 * 5);           // £µÊ¬¸å¤ËÀßÄê
+                       endtl = localtime(&end_time);
++              }else{
++                      end_time = l_time + eitcur->ehh * 3600 + eitcur->emm * 60 + eitcur->ess;
++                      endtl = localtime(&end_time);
++              }
+               memset(cendtime, '\0', sizeof(cendtime));
+               memset(cstarttime, '\0', sizeof(cstarttime));
+               strftime(cendtime, (sizeof(cendtime) - 1), "%Y%m%d%H%M%S", endtl);