version 1.22, 2010/09/29 21:38:12
|
version 1.23, 2010/09/29 21:39:04
|
Line 231 struct sitab {
|
Line 231 struct sitab {
|
struct sitab *next; |
struct sitab *next; |
unsigned char version; |
unsigned char version; |
unsigned char tableid; |
unsigned char tableid; |
|
unsigned short tableid_ext; |
long pid; |
long pid; |
long freqmsec; |
long freqmsec; |
enum enumsi esi; |
enum enumsi esi; |
Line 1491 static void gentab(struct sitab *st, str
|
Line 1492 static void gentab(struct sitab *st, str
|
perpid[i].tabin += l+2; |
perpid[i].tabin += l+2; |
} |
} |
|
|
static enum enumsi alloctab(long pid, long tid) |
static enum enumsi alloctab(long pid, long tid, int *hastableidext) |
{ |
{ |
enum enumsi e = si_none; |
enum enumsi e = si_none; |
switch (pid) { |
switch (pid) { |
case 0x0010: |
case 0x0010: |
if ((tid == 0x40) || (tid == 0x41)) { |
if (tid == 0x40) { |
e = nit; |
e = nit; |
|
} else if (tid == 0x41) { |
|
e = nit; |
|
*hastableidext = 1; |
} else { |
} else { |
fprintf(stderr, "bad tableid: 0x%02lx (pid: 0x%04lx)\n", tid, pid); |
fprintf(stderr, "bad tableid: 0x%02lx (pid: 0x%04lx)\n", tid, pid); |
} |
} |
break; |
break; |
case 0x0011: |
case 0x0011: |
if ((tid == 0x42) || (tid == 0x46)) { |
if (tid == 0x42) { |
|
e = sdt; |
|
} else if (tid == 0x46) { |
e = sdt; |
e = sdt; |
|
*hastableidext = 1; |
} else if (tid == 0x4A) { |
} else if (tid == 0x4A) { |
e = bat; |
e = bat; |
|
*hastableidext = 1; |
} else { |
} else { |
fprintf(stderr, "bad tableid: 0x%02lx (pid: 0x%04lx)\n", tid, pid); |
fprintf(stderr, "bad tableid: 0x%02lx (pid: 0x%04lx)\n", tid, pid); |
} |
} |
Line 1514 static enum enumsi alloctab(long pid, lo
|
Line 1522 static enum enumsi alloctab(long pid, lo
|
case 0x0012: |
case 0x0012: |
if ((tid >= 0x4E) && (tid <= 0x6F)) { |
if ((tid >= 0x4E) && (tid <= 0x6F)) { |
e = eit; |
e = eit; |
|
*hastableidext = 1; |
} else { |
} else { |
fprintf(stderr, "bad tableid: 0x%02lx (pid: 0x%04lx)\n", tid, pid); |
fprintf(stderr, "bad tableid: 0x%02lx (pid: 0x%04lx)\n", tid, pid); |
} |
} |
Line 1576 static void maketab(long pid, long table
|
Line 1585 static void maketab(long pid, long table
|
{ |
{ |
struct sitab *t; |
struct sitab *t; |
enum enumsi e; |
enum enumsi e; |
e = alloctab(pid, tableid); |
int hastableidext = 0; |
|
e = alloctab(pid, tableid, &hastableidext); |
if (e >= 0) { |
if (e >= 0) { |
t = malloc(sizeof(struct sitab)); |
t = malloc(sizeof(struct sitab)); |
if (t != NULL) { |
if (t != NULL) { |
t->pid = pid; |
t->pid = pid; |
t->tableid = tableid; |
t->tableid = tableid; |
|
t->tableid_ext = hastableidext; |
t->freqmsec = freqmsec; |
t->freqmsec = freqmsec; |
t->esi = e; |
t->esi = e; |
t->tab = NULL; |
t->tab = NULL; |
Line 2192 static void argloop(int f0)
|
Line 2203 static void argloop(int f0)
|
free(newtab->tab); |
free(newtab->tab); |
free(newtab); |
free(newtab); |
} else { |
} else { |
|
if (newtab->tableid_ext) { |
|
newtab->tableid_ext = newtab->tab[0]; |
|
} |
droptab(newtab->pid, newtab->tableid); |
droptab(newtab->pid, newtab->tableid); |
newtab->version = nextversion[newtab->tableid - TABLEID_FIRST]; |
newtab->version = nextversion[newtab->tableid - TABLEID_FIRST]; |
newtab->soon = tv; |
newtab->soon = tv; |