| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Based on default implementation from libxslt 1.1.22 and xsltICUSort.c | 44 // Based on default implementation from libxslt 1.1.22 and xsltICUSort.c |
| 45 // example. | 45 // example. |
| 46 void xsltUnicodeSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts, in
t nbsorts) | 46 void xsltUnicodeSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts, in
t nbsorts) |
| 47 { | 47 { |
| 48 #ifdef XSLT_REFACTORED | 48 #ifdef XSLT_REFACTORED |
| 49 xsltStyleItemSortPtr comp; | 49 xsltStyleItemSortPtr comp; |
| 50 #else | 50 #else |
| 51 xsltStylePreCompPtr comp; | 51 xsltStylePreCompPtr comp; |
| 52 #endif | 52 #endif |
| 53 xmlXPathObjectPtr* resultsTab[XSLT_MAX_SORT]; | 53 xmlXPathObjectPtr* resultsTab[XSLT_MAX_SORT]; |
| 54 xmlXPathObjectPtr* results = 0; | 54 xmlXPathObjectPtr* results = nullptr; |
| 55 xmlNodeSetPtr list = 0; | 55 xmlNodeSetPtr list = nullptr; |
| 56 int depth; | 56 int depth; |
| 57 xmlNodePtr node; | 57 xmlNodePtr node; |
| 58 int tempstype[XSLT_MAX_SORT], temporder[XSLT_MAX_SORT]; | 58 int tempstype[XSLT_MAX_SORT], temporder[XSLT_MAX_SORT]; |
| 59 | 59 |
| 60 if (!ctxt || !sorts || nbsorts <= 0 || nbsorts >= XSLT_MAX_SORT) | 60 if (!ctxt || !sorts || nbsorts <= 0 || nbsorts >= XSLT_MAX_SORT) |
| 61 return; | 61 return; |
| 62 if (!sorts[0]) | 62 if (!sorts[0]) |
| 63 return; | 63 return; |
| 64 comp = static_cast<xsltStylePreComp*>(sorts[0]->psvi); | 64 comp = static_cast<xsltStylePreComp*>(sorts[0]->psvi); |
| 65 if (!comp) | 65 if (!comp) |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 } | 266 } |
| 267 if (resultsTab[j]) { | 267 if (resultsTab[j]) { |
| 268 for (int i = 0; i < len; ++i) | 268 for (int i = 0; i < len; ++i) |
| 269 xmlXPathFreeObject(resultsTab[j][i]); | 269 xmlXPathFreeObject(resultsTab[j][i]); |
| 270 xmlFree(resultsTab[j]); | 270 xmlFree(resultsTab[j]); |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace blink | 275 } // namespace blink |
| OLD | NEW |