OSDN Git Service

stop using trunk directory in rectool
[rec10/rec10-git.git] / dist / trunk / tstools / epgdump / patch_r2
1 diff -rcw epgdumpr2.old/eit.c epgdumpr2/eit.c
2 *** epgdumpr2.old/eit.c 2009-03-15 19:02:33.000000000 +0900
3 --- epgdumpr2/eit.c     2009-03-24 20:45:25.961750270 +0900
4 ***************
5 *** 6,11 ****
6 --- 6,14 ----
7   
8   char          *subtitle_cnv_str[] = {
9         "¡¡Âè",
10 +       "¡¼Âè",
11 +       "-Âè",
12 +       " Âè",
13         "¡¡¡Ö",
14         "¡¡¡ô",
15         "¡Ê",
16 ***************
17 *** 39,45 ****
18         return 14;
19   }
20   
21 ! int parseEITbody(unsigned char *data, EITbody *b) {
22         int boff = 0;
23         int tnum;
24         char buf[4];
25 --- 42,49 ----
26         return 14;
27   }
28   
29 ! int parseEITbody(unsigned char *data, EITbody *b)
30 ! {
31         int boff = 0;
32         int tnum;
33         char buf[4];
34 ***************
35 *** 78,97 ****
36   
37         b->yy += 1900;
38     
39         sprintf(buf, "%x", b->start_time[2]);
40         b->hh = atoi(buf);
41         sprintf(buf, "%x", b->start_time[3]);
42         b->hm = atoi(buf);
43         sprintf(buf, "%x", b->start_time[4]);
44         b->ss = atoi(buf);
45   
46         sprintf(buf, "%x", b->duration[0]);
47         b->dhh = atoi(buf);
48         sprintf(buf, "%x", b->duration[1]);
49         b->dhm = atoi(buf);
50         sprintf(buf, "%x", b->duration[2]);
51         b->dss = atoi(buf);
52 !   
53         return 12;
54   }
55   
56 --- 82,110 ----
57   
58         b->yy += 1900;
59     
60 +       memset(buf, '\0', sizeof(buf));
61         sprintf(buf, "%x", b->start_time[2]);
62         b->hh = atoi(buf);
63 +       memset(buf, '\0', sizeof(buf));
64         sprintf(buf, "%x", b->start_time[3]);
65         b->hm = atoi(buf);
66 +       memset(buf, '\0', sizeof(buf));
67         sprintf(buf, "%x", b->start_time[4]);
68         b->ss = atoi(buf);
69   
70 +       if((b->duration[0] == 0xFF) && (b->duration[1] == 0xFF) && (b->duration[2] == 0xFF)){
71 +               b->dhh = b->dhm = b->dss = 0;
72 +       }else{
73 +               memset(buf, '\0', sizeof(buf));
74                 sprintf(buf, "%x", b->duration[0]);
75                 b->dhh = atoi(buf);
76 +               memset(buf, '\0', sizeof(buf));
77                 sprintf(buf, "%x", b->duration[1]);
78                 b->dhm = atoi(buf);
79 +               memset(buf, '\0', sizeof(buf));
80                 sprintf(buf, "%x", b->duration[2]);
81                 b->dss = atoi(buf);
82 !       }
83         return 12;
84   }
85   
86 ***************
87 *** 269,274 ****
88 --- 282,291 ----
89                 if(ptr == NULL){
90                         continue ;
91                 }
92 +               // ¥¿¥¤¥È¥ë¤¬¤Ê¤¯¤Ê¤é¤Ê¤¤¤è¤¦¤Ë
93 +               if(ptr == eitptr->title){
94 +                       continue ;
95 +               }
96                 newsubtitle = calloc(1, ((strlen(ptr) + 1) + (strlen(eitptr->subtitle) + 1)));
97                 memcpy(newsubtitle, ptr, strlen(ptr));
98                 newsubtitle[strlen(ptr)] = ' ';
99 diff -rcw epgdumpr2.old/epgdump.c epgdumpr2/epgdump.c
100 *** epgdumpr2.old/epgdump.c     2009-03-15 21:29:33.000000000 +0900
101 --- epgdumpr2/epgdump.c 2009-03-24 20:55:30.885022486 +0900
102 ***************
103 *** 177,183 ****
104         char    *inptr ;
105         size_t  ilen;
106         size_t  olen;
107 !       time_t  time ;
108         time_t  end_time ;
109         struct  tm      tl ;
110         struct  tm      *endtl ;
111 --- 177,183 ----
112         char    *inptr ;
113         size_t  ilen;
114         size_t  olen;
115 !       time_t  l_time ;
116         time_t  end_time ;
117         struct  tm      tl ;
118         struct  tm      *endtl ;
119 ***************
120 *** 239,247 ****
121                 tl.tm_wday = 0;
122                 tl.tm_isdst = 0;
123                 tl.tm_yday = 0;
124 !               time = mktime(&tl);
125 !               end_time = time + eitcur->ehh * 3600 + eitcur->emm * 60 + eitcur->ess;
126                 endtl = localtime(&end_time);
127                 memset(cendtime, '\0', sizeof(cendtime));
128                 memset(cstarttime, '\0', sizeof(cstarttime));
129                 strftime(cendtime, (sizeof(cendtime) - 1), "%Y%m%d%H%M%S", endtl);
130 --- 239,253 ----
131                 tl.tm_wday = 0;
132                 tl.tm_isdst = 0;
133                 tl.tm_yday = 0;
134 !               l_time = mktime(&tl);
135 !               if((eitcur->ehh == 0) && (eitcur->emm == 0) && (eitcur->ess == 0)){
136 !                       (void)time(&l_time);
137 !                       end_time = l_time + (60 * 5);           // £µÊ¬¸å¤ËÀßÄê
138                         endtl = localtime(&end_time);
139 +               }else{
140 +                       end_time = l_time + eitcur->ehh * 3600 + eitcur->emm * 60 + eitcur->ess;
141 +                       endtl = localtime(&end_time);
142 +               }
143                 memset(cendtime, '\0', sizeof(cendtime));
144                 memset(cstarttime, '\0', sizeof(cstarttime));
145                 strftime(cendtime, (sizeof(cendtime) - 1), "%Y%m%d%H%M%S", endtl);