Move strtab.h to libhts

This commit is contained in:
Andreas Öman 2008-04-07 16:23:52 +00:00
parent d1f24092a2
commit 58633ae2d7
11 changed files with 1 additions and 69 deletions

View file

@ -34,7 +34,6 @@
#include "dvb.h"
#include "dvb_support.h"
#include "dvb_muxconfig.h"
#include "strtab.h"
#include "psi.h"
#include "transports.h"

View file

@ -31,7 +31,6 @@
#include "http.h"
#include "ajaxui.h"
#include "channels.h"
#include "strtab.h"
#include "psi.h"
#include "transports.h"

View file

@ -31,7 +31,6 @@
#include "dvb_dvr.h"
#include "dvb_muxconfig.h"
#include "dvb_support.h"
#include "strtab.h"
#include "transports.h"
static struct strtab fectab[] = {

View file

@ -33,7 +33,6 @@
#include "tvhead.h"
#include "dvb_support.h"
#include "strtab.h"
#include "dvb.h"
/*

1
http.c
View file

@ -38,7 +38,6 @@
#include "teletext.h"
#include "dispatch.h"
#include "dvb.h"
#include "strtab.h"
#include "rtp.h"
#include "tsmux.h"
#include "http.h"

1
psi.c
View file

@ -30,7 +30,6 @@
#include "transports.h"
#include "dvb_support.h"
#include "tsdemux.h"
#include "strtab.h"
#include "parsers.h"
int

1
pvr.c
View file

@ -42,7 +42,6 @@
#include "epg.h"
#include "dispatch.h"
#include "buffer.h"
#include "strtab.h"
#include "ffmuxer.h"
#include "spawn.h"

1
rtsp.c
View file

@ -36,7 +36,6 @@
#include "teletext.h"
#include "dispatch.h"
#include "dvb.h"
#include "strtab.h"
#include "rtp.h"
#include "tsmux.h"
#include "tcp.h"

View file

@ -1,60 +0,0 @@
/*
* tvheadend
* Copyright (C) 2007 Andreas Öman
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef STRTAB_H_
#define STRTAB_H_
#include <string.h>
struct strtab {
const char *str;
int val;
};
static int str2val0(const char *str, struct strtab tab[], int l)
__attribute((unused));
static int
str2val0(const char *str, struct strtab tab[], int l)
{
int i;
for(i = 0; i < l; i++)
if(!strcasecmp(str, tab[i].str))
return tab[i].val;
return -1;
}
#define str2val(str, tab) str2val0(str, tab, sizeof(tab) / sizeof(tab[0]))
static const char * val2str0(int val, struct strtab tab[], int l)
__attribute__((unused));
static const char *
val2str0(int val, struct strtab tab[], int l)
{
int i;
for(i = 0; i < l; i++)
if(tab[i].val == val)
return tab[i].str;
return NULL;
}
#define val2str(val, tab) val2str0(val, tab, sizeof(tab) / sizeof(tab[0]))
#endif /* STRTAB_H_ */

View file

@ -52,7 +52,6 @@
#include "buffer.h"
#include "channels.h"
#include "cwc.h"
#include "strtab.h"
#define TRANSPORT_HASH_WIDTH 101

View file

@ -26,6 +26,7 @@
#include <libhts/htstv.h>
#include <libhts/htscfg.h>
#include <libhts/avg.h>
#include <libhts/hts_strtab.h>
#include "refstr.h"
#include <libavcodec/avcodec.h>