summaryrefslogtreecommitdiff
path: root/radiotools.c
diff options
context:
space:
mode:
Diffstat (limited to 'radiotools.c')
-rw-r--r--radiotools.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/radiotools.c b/radiotools.c
index c30239d..d180575 100644
--- a/radiotools.c
+++ b/radiotools.c
@@ -1875,8 +1875,32 @@ void tmc_parser(unsigned char *data, int len)
default: printf(" todo, exit.\n");
}
}
-
}
+const char* ptynr2string(int nr)
+{
+ switch (nr) {
+ // Source: http://www.ebu.ch/trev_255-beale.pdf
+ case 0: return tr("unknown program type");
+ case 1: return tr("News");
+ case 2: return tr("Current affairs");
+ case 3: return tr("Information");
+ case 4: return tr("Sport");
+ case 5: return tr("Education");
+ case 6: return tr("Drama");
+ case 7: return tr("Culture");
+ case 8: return tr("Science");
+ case 9: return tr("Varied");
+ case 10: return tr("Pop music");
+ case 11: return tr("Rock music");
+ case 12: return tr("M.O.R. music");
+ case 13: return tr("Light classical");
+ case 14: return tr("Serious classical");
+ case 15: return tr("Other music");
+ // 16-30 "Spares"
+ case 31: return tr("Alarm");
+ default: return "?";
+ }
+}
//--------------- End -----------------------------------------------------------------