Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clear out as many gcc warnings as I can

  • Loading branch information...
commit e9af892c13196218de9395179f47f9c5e618b3ae 1 parent 9fd5023
Kyle Maxwell authored
Showing with 51 additions and 35 deletions.
  1. +2 −2 parsley.c
  2. +2 −27 regexp.c
  3. +36 −0 regexp.h
  4. +0 −5 util.c
  5. +11 −1 util.h
View
4 parsley.c
@@ -27,7 +27,7 @@ int yywrap(void){
return 1;
}
-static struct ll {
+struct ll {
xmlChar *name;
struct ll *next;
};
@@ -199,7 +199,7 @@ collate(xmlNodePtr xml) {
xmlNodePtr child = xml->children;
int n = _xmlChildElementCount(xml);
- xmlNodePtr** name_nodes = malloc(n * sizeof(xmlNodePtr));
+ xmlNodePtr* name_nodes = malloc(n * sizeof(xmlNodePtr));
xmlNodePtr* lists = malloc(n * sizeof(xmlNodePtr));
bool* empty = malloc(n * sizeof(bool));
bool* multi = malloc(n * sizeof(bool));
View
29 regexp.c
@@ -8,6 +8,7 @@
*
* Authors:
* Joel W. Reed <joelwreed@gmail.com>
+ * Some modification by Kyle Maxwell
*
* TODO:
* functions:
@@ -15,33 +16,7 @@
* regexp:replace
* regexp:test
*/
-
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
-
-#include <libxslt/xsltconfig.h>
-#include <libxslt/xsltutils.h>
-#include <libxslt/xsltInternals.h>
-#include <libxslt/extensions.h>
-#include <libexslt/exsltexports.h>
-
-#include <pcre.h>
-#include <string.h>
-
-/* make sure init function is exported on win32 */
-#if defined(_WIN32)
- #define PLUGINPUBFUN __declspec(dllexport)
-#else
- #define PLUGINPUBFUN
-#endif
-
-/**
- * EXSLT_REGEXP_NAMESPACE:
- *
- * Namespace for EXSLT regexp functions
- */
-#define EXSLT_REGEXP_NAMESPACE ((const xmlChar *) "http://exslt.org/regular-expressions")
+#include "regexp.h"
static void
exsltRegexpFlagsFromString(const xmlChar* flagstr,
View
36 regexp.h
@@ -0,0 +1,36 @@
+#ifndef REGEXP_H_INCLUDED
+#define REGEXP_H_INCLUDED
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#include <libxslt/xsltconfig.h>
+#include <libxslt/xsltutils.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/extensions.h>
+#include <libexslt/exsltexports.h>
+
+#include <pcre.h>
+#include <string.h>
+
+/* make sure init function is exported on win32 */
+#if defined(_WIN32)
+ #define PLUGINPUBFUN __declspec(dllexport)
+#else
+ #define PLUGINPUBFUN
+#endif
+
+/**
+ * EXSLT_REGEXP_NAMESPACE:
+ *
+ * Namespace for EXSLT regexp functions
+ */
+#define EXSLT_REGEXP_NAMESPACE ((const xmlChar *) "http://exslt.org/regular-expressions")
+
+void
+PLUGINPUBFUN exslt_org_regular_expressions_init (void);
+
+
+
+#endif
View
5 util.c
@@ -1,9 +1,4 @@
#include "util.h"
-#include "parsley.h"
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdbool.h>
static bool parsley_exslt_registered = false;
View
12 util.h
@@ -4,6 +4,17 @@
#include <stdio.h>
#include <json/json.h>
#include "parsed_xpath.h"
+#include "parsley.h"
+#include "parser.h"
+#include "regexp.h"
+#include "printbuf.h"
+#include "functions.h"
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <ctype.h>
+#include <libexslt/exslt.h>
FILE* parsley_fopen(char*, char*);
char* sprintbuf_parsley_header(struct printbuf *);
@@ -13,5 +24,4 @@ int parsley_key_flags(char*);
char* parsley_key_tag(char*);
pxpathPtr parsley_key_filter(char*);
-
#endif

0 comments on commit e9af892

Please sign in to comment.
Something went wrong with that request. Please try again.