~ubuntu-branches/debian/sid/libembperl-perl/sid

« back to all changes in this revision

Viewing changes to epparse.c

  • Committer: Bazaar Package Importer
  • Author(s): Gunnar Wolf
  • Date: 2007-03-26 11:49:17 UTC
  • mfrom: (3.1.2 edgy)
  • Revision ID: james.westby@ubuntu.com-20070326114917-717f30vfkvbdasd5
Tags: 2.2.0-1.2
* Non-maintainer upload.
* No longer spawns Apache processes to run the test scripts, as it leads
  to FTBFS (Closes: #416016)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*###################################################################################
2
2
#
3
 
#   Embperl - Copyright (c) 1997-2004 Gerald Richter / ECOS
 
3
#   Embperl - Copyright (c) 1997-2005 Gerald Richter / ECOS
4
4
#
5
5
#   You may distribute under the terms of either the GNU General Public
6
6
#   License or the Artistic License, as specified in the Perl README file.
9
9
#   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10
10
#   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11
11
#
12
 
#   $Id: epparse.c,v 1.14 2004/08/16 07:36:17 richter Exp $
 
12
#   $Id: epparse.c 387723 2006-03-22 05:02:29Z richter $
13
13
#
14
14
###################################################################################*/
15
15
 
178
178
                {
179
179
                strncpy (r -> errdat1, "BuildTokenHash", sizeof (r -> errdat1)) ;
180
180
                sprintf (r -> errdat2, "%s => %s does not contain any tokens", pKey, pAttr) ;
181
 
                return rcNotFound ;
 
181
                return rcTokenNotFound ;
182
182
                }
183
183
 
184
184
            hv_store(pSubHash, "--cptr", sizeof ("--cptr") - 1, newSViv ((IV)pNewTokenTable), 0) ;
425
425
                {
426
426
                strncpy (r -> errdat1, "BuildTokenHash", sizeof (r -> errdat1)) ;
427
427
                sprintf (r -> errdat2, " EndTag %s for %s not found", pTable[i].sText, s) ;
428
 
                return rcNotFound ;
 
428
                return rcTokenNotFound ;
429
429
                }
430
430
            
431
431
            }
444
444
                {
445
445
                strncpy (r -> errdat1, "BuildTokenHash", sizeof (r -> errdat1)) ;
446
446
                sprintf (r -> errdat2, " StartTag %s for %s not found", pTable[i].sText, s) ;
447
 
                return rcNotFound ;
 
447
                return rcTokenNotFound ;
448
448
                }
449
449
            
450
450
            }
854
854
                                            pToken -> bDontEat) ;
855
855
                        if (rc == ok)
856
856
                            bInsideMustExist = 0 ;
857
 
                        else if (pToken -> bInsideMustExist && rc == rcNotFound)
 
857
                        else if (pToken -> bInsideMustExist && rc == rcTokenNotFound)
858
858
                            {
859
859
                            rc = ok ;
860
860
                            /*
876
876
                            if (!(xNewNode = Node_appendChild (r -> pApp, pDomTree, xParentNode, 0, (tNodeType)pTokenTable -> nDefNodeType, 0, pCurrStart, pCurr - pCurrStart, level, GetLineNoOf (r, pCurrStart), NULL)))
877
877
                                return 1 ;
878
878
                            }
879
 
                        else if (rc != rcNotFound)
 
879
                        else if (rc != rcTokenNotFound)
880
880
                            {
881
881
                            return rc ;
882
882
                            }
1015
1015
                    return 1 ;
1016
1016
                }
1017
1017
            *ppCurr = pCurr ;
1018
 
            return bInsideMustExist?rcNotFound:ok ;
 
1018
            return bInsideMustExist?rcTokenNotFound:ok ;
1019
1019
            }
1020
1020
        else if (sEndText == NULL ||
1021
1021
            ((*pCurr == *sEndText && (strncmp (pCurr, sEndText, nEndText) == 0)) || 
1044
1044
            if (!pCDATAStart && !sStopText && (bDontEat & 2) == 0)
1045
1045
                pCurr += nEndText ;
1046
1046
            *ppCurr = pCurr ;
1047
 
            return bInsideMustExist?rcNotFound:ok ;
 
1047
            return bInsideMustExist?rcTokenNotFound:ok ;
1048
1048
            }
1049
1049
        else if (!pToken && bFollow < 2)
1050
1050
            pCurr++ ;
1063
1063
            return 1 ;
1064
1064
 
1065
1065
    *ppCurr = pCurr ;
1066
 
    return bInsideMustExist?rcNotFound:ok ;
 
1066
    return bInsideMustExist?rcTokenNotFound:ok ;
1067
1067
    }
1068
1068
 
1069
1069
 
1147
1147
    if (!(xNode = Node_appendChild (r -> pApp, pDomTree, xDocNode, 0, ntypAttr, 0, NULL, xDomTreeAttr, 0, 0, NULL)))
1148
1148
        return rcOutOfMemory ;
1149
1149
 
1150
 
    if (!(xNode = Node_appendChild (r -> pApp, pDomTree, xNode, 0, ntypAttrValue, 0, NULL, r -> Component.xCurrDomTree, 0, 0, NULL)))
 
1150
    if (!(xNode = Node_appendChild (r -> pApp, pDomTree, xNode, 0, ntypAttrValue, 0, (char *)&(r -> Component.xCurrDomTree), sizeof (r -> Component.xCurrDomTree), 0, 0, NULL)))
1151
1151
        return rcOutOfMemory ;
1152
1152
 
1153
1153
    /* Add at least one child node to document to make insertafter at the beginning of the document work */