annotate osdep/strsep.c @ 23510:a6c619ee9d30

Teletext support for tv:// (v4l and v4l2 only) modified patch from Otvos Attila oattila at chello dot hu Module uses zvbi library for all low-level VBI operations (like I/O with vbi device, converting vbi pages into usefull vbi_page stuctures, rendering them into RGB32 images). All teletext related stuff (except properties, slave commands and rendering osd in text mode or RGB32 rendered teletext pages in spu mode) is implemented in tvi_vbi.c New properties: teletext_page - switching between pages teletext_mode - switch between on/off/opaque/transparent modes teletext_format - (currently read-only) allows to get format info (black/white,gray,text) teletext_half_page - trivial zooming (displaying top/bottom half of teletext page) New slave commands: teletext_add_dec - user interface for jumping to any page by editing page number interactively teletext_go_link - goes though links, specified on current page
author voroshil
date Sun, 10 Jun 2007 00:06:12 +0000
parents 936209c39ed1
children 5cfef41a1771
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5393
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
1 /* strsep implementation for systems that do not have it in libc */
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
2
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
3 #include <stdio.h>
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
4 #include <string.h>
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
5
16985
08cac43f1e38 Unify include paths, -I.. is in CFLAGS.
diego
parents: 9380
diff changeset
6 #include "config.h"
5393
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
7
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
8 char *strsep(char **stringp, const char *delim) {
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
9 char *begin, *end;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
10
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
11 begin = *stringp;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
12 if(begin == NULL)
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
13 return NULL;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
14
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
15 if(delim[0] == '\0' || delim[1] == '\0') {
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
16 char ch = delim[0];
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
17
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
18 if(ch == '\0')
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
19 end = NULL;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
20 else {
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
21 if(*begin == ch)
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
22 end = begin;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
23 else if(*begin == '\0')
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
24 end = NULL;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
25 else
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
26 end = strchr(begin + 1, ch);
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
27 }
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
28 }
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
29 else
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
30 end = strpbrk(begin, delim);
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
31
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
32 if(end) {
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
33 *end++ = '\0';
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
34 *stringp = end;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
35 }
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
36 else
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
37 *stringp = NULL;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
38
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
39 return begin;
cbf0fed4d211 Add a configure test for the strsep function (it's missing on solaris)
jkeil
parents:
diff changeset
40 }