summaryrefslogtreecommitdiff
path: root/redland/raptor/raptor-1.4.18.rindex.patch
blob: dc038d3842aa61d03c046fbd43a4a13515ef1acd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--- misc/raptor-1.4.18/librdfa/curie.c	2008-06-14 07:33:37.000000000 +0200
+++ misc/raptor-1.4.18/librdfa/curie.c	2011-09-27 14:48:34.000000000 +0200
@@ -122,7 +122,7 @@
       {
          // if we have a relative URI, chop off the name of the file
          // and replace it with the relative pathname
-         char* end_index = rindex(context->base, '/');
+         char* end_index = strrchr(context->base, '/');
 
          if(end_index != NULL)
          {
@@ -130,7 +130,7 @@
             char* end_index2;
 
             tmpstr = rdfa_replace_string(tmpstr, context->base);
-            end_index2= rindex(tmpstr, '/');
+            end_index2= strrchr(tmpstr, '/');
             end_index2++;
             *end_index2 = '\0';
 
--- misc/raptor-1.4.18/librdfa/rdfa.c	2008-06-16 04:02:58.000000000 +0200
+++ misc/build/raptor-1.4.18/librdfa/rdfa.c	2011-09-27 15:03:12.000000000 +0200
@@ -163,7 +163,7 @@
       {
          char* href_start = strstr(base_start, "href=");
          char* uri_start = href_start + 6;
-         char* uri_end = index(uri_start, '"');
+         char* uri_end = strchr(uri_start, '"');
 
          if((uri_start != NULL) && (uri_end != NULL))
          {
@@ -898,8 +898,8 @@
       if(context->xml_literal != NULL)
       {
          // get the data between the first tag and the last tag
-         content_start = index(context->xml_literal, '>');
-         content_end = rindex(context->xml_literal, '<');
+         content_start = strchr(context->xml_literal, '>');
+         content_end = strrchr(context->xml_literal, '<');
          
          if((content_start != NULL) && (content_end != NULL))
          {
--- misc/raptor-1.4.18/librdfa/triple.c	2008-06-14 07:33:37.000000000 +0200
+++ misc/build/raptor-1.4.18/librdfa/triple.c	2011-09-27 15:02:59.000000000 +0200
@@ -437,7 +437,7 @@
       current_object_literal = context->content;
       type = RDF_TYPE_PLAIN_LITERAL;
    }
-   else if(index(context->xml_literal, '<') == NULL)
+   else if(strchr(context->xml_literal, '<') == NULL)
    {      
       current_object_literal = context->plain_literal;
       type = RDF_TYPE_PLAIN_LITERAL;
@@ -467,7 +467,7 @@
    // [current element], i.e., not including the element itself, and
    // giving it a datatype of rdf:XMLLiteral.
    if((current_object_literal == NULL) &&
-      (index(context->xml_literal, '<') != NULL) &&
+      (strchr(context->xml_literal, '<') != NULL) &&
       ((context->datatype == NULL) ||
        (strcmp(context->datatype,
                "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") == 0)))