summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a6c2ef5)
raw | patch | inline | side by side (parent: a6c2ef5)
author | ishmal <ishmal@users.sourceforge.net> | |
Thu, 29 Mar 2007 17:10:50 +0000 (17:10 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Thu, 29 Mar 2007 17:10:50 +0000 (17:10 +0000) |
21 files changed:
diff --git a/src/dom/charclass.h b/src/dom/charclass.h
index 1f39c7e8df89fe25d1905dc79ed8bec01715bffa..adf18dd090abfe0f67c9cd8e5595af702679a89b 100644 (file)
--- a/src/dom/charclass.h
+++ b/src/dom/charclass.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/dom/cssparser.cpp b/src/dom/cssparser.cpp
index 8f245c06dfa90d0d9f3cee647e8ab9aa05f4229a..d6aaac13d51d55b4adc85eea25493d782b8f2d91 100644 (file)
--- a/src/dom/cssparser.cpp
+++ b/src/dom/cssparser.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/dom/cssparser.h b/src/dom/cssparser.h
index 816936dc38914d8d3336a6d6a8b46fb44508f250..f03b243da5230c8dc9ae428dcc5308757ed78dc2 100644 (file)
--- a/src/dom/cssparser.h
+++ b/src/dom/cssparser.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glib.h>
#include "dom.h"
virtual bool parseFile(const DOMString &str);
-protected:
+private:
DOMString parsebuf;
long parselen;
/**
*
*/
- void error(char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void error(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
/**
* Get the character at the given location in the buffer.
diff --git a/src/dom/io/domstream.h b/src/dom/io/domstream.h
index 2ffeef4e33bb41883e7cc345df317f1a998d9bdc..273782b6776872aa3660300d5fb4f3ad05f0ac77 100644 (file)
--- a/src/dom/io/domstream.h
+++ b/src/dom/io/domstream.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
index f634acbe72b895a73bc73daac088e72298025490..9ac24dc7525a4690b7e326548496bf6c6322b254 100644 (file)
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
index 4af5ada2b49f05284554ada30ab448320fb653d2..ea0807f32cf9ee5191f9fa95b46f3b37a1e15851 100644 (file)
--- a/src/dom/io/gzipstream.h
+++ b/src/dom/io/gzipstream.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/dom/jsdombind.cpp b/src/dom/jsdombind.cpp
index d38722636f617414fc537e3d5b7f308b50fd75a6..2bb9d23c864faa418a2d9972e8f2e46c11b89ec8 100644 (file)
--- a/src/dom/jsdombind.cpp
+++ b/src/dom/jsdombind.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/dom/jsdombind.h b/src/dom/jsdombind.h
index 33a71816a03359d29f8aa6c0a623cfb75a2d659b..eb2f54659a5bd7b1c2c33495b4599c98544e034c 100644 (file)
--- a/src/dom/jsdombind.h
+++ b/src/dom/jsdombind.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glib.h>
-
#include "jsengine.h"
/**
* Ouput a printf-formatted error message
*/
- void error(char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void error(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
/**
* Ouput a printf-formatted error message
*/
- void trace(char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void trace(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
JSRuntime *rt;
diff --git a/src/dom/jsengine.cpp b/src/dom/jsengine.cpp
index 38b856c3c83aa30fb89dd23dfd47cfcd73d6749b..680d5a671a88429eb60f2338e59ad2cd327127fb 100644 (file)
--- a/src/dom/jsengine.cpp
+++ b/src/dom/jsengine.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/dom/jsengine.h b/src/dom/jsengine.h
index f47a7a4c7d1fe8661db28d56d482584957ceafb2..b7bbe2bc1a2a308fc13a2e787dc05afae837bb56 100644 (file)
--- a/src/dom/jsengine.h
+++ b/src/dom/jsengine.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glib.h>
-
#include "dom.h"
#include "js/jsapi.h"
/**
* Ouput a printf-formatted error message
*/
- void error(char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void error(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
/**
* Ouput a printf-formatted error message
*/
- void trace(char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void trace(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
JSRuntime *rt;
diff --git a/src/dom/lsimpl.cpp b/src/dom/lsimpl.cpp
index 8848a42e4250e7aceab6af9a17b1a6a71486c99f..84d12ddfb0f4dd1db8e44d7815ed8efca3a874e1 100644 (file)
--- a/src/dom/lsimpl.cpp
+++ b/src/dom/lsimpl.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/dom/lsimpl.h b/src/dom/lsimpl.h
index d73998e133bcea41d081862c68670085a6a6d131..0dd0dc62cb38b658c5d6a443a7112fefd23fc445 100644 (file)
--- a/src/dom/lsimpl.h
+++ b/src/dom/lsimpl.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glib.h>
-
#include "domimpl.h"
#include "events.h"
#include "traversal.h"
void spaces();
- void po(char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void po(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
void pos(const DOMString &str);
diff --git a/src/dom/mingwenv.bat b/src/dom/mingwenv.bat
index f9ec1e7c51b33d0cdd22e5970560d3d56cb733b3..996566e7b3d37f7d2fc23ee07618ee56221c9470 100644 (file)
--- a/src/dom/mingwenv.bat
+++ b/src/dom/mingwenv.bat
-set PATH=c:\mingw4\bin;%PATH%\r
+set PATH=c:\mingw\bin;%PATH%\r
set RM=del\r
index 307b44e01a8a3bd99b8fab75965716a1e248a2e9..548077dd5f2a78ac17a0be47c8e9340229573424 100644 (file)
--- a/src/dom/svg/svgparser.h
+++ b/src/dom/svg/svgparser.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glib.h>
#include "svgimpl.h"
-protected:
+private:
/**
* Get the next character in the parse buf, 0 if out
/**
*
*/
- void error(char *format, ...) G_GNUC_PRINTF(2,3);
+ void error(char *format, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp
index 9b1102b61e93391e859b2ae77f724208c966716b..af808f40dfc99c508b6872d469d58ad818bea29e 100644 (file)
--- a/src/dom/uri.cpp
+++ b/src/dom/uri.cpp
//# http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#components
//#########################################################################
+int URI::parseHex(int p0, int &result)
+{
+ int p = p0;
+ int val = 0;
+
+ //# Upper 4
+ XMLCh ch = peek(p);
+ if (ch >= '0' && ch <= '9')
+ val += (ch - '0');
+ else if (ch >= 'a' && ch <= 'f')
+ val += (10 + ch - 'a');
+ else if (ch >= 'A' && ch <= 'F')
+ val += (10 + ch - 'A');
+ else
+ {
+ error("parseHex : unexpected character : %c", ch);
+ return -1;
+ }
+ p++;
+ val <<= 4;
+
+ //# Lower 4
+ ch = peek(p);
+ if (ch >= '0' && ch <= '9')
+ val += (ch - '0');
+ else if (ch >= 'a' && ch <= 'f')
+ val += (10 + ch - 'a');
+ else if (ch >= 'A' && ch <= 'F')
+ val += (10 + ch - 'A');
+ else
+ {
+ error("parseHex : unexpected character : %c", ch);
+ return -1;
+ }
+ result = val;
+ return p;
+}
+
+
+
+int URI::parseEntity(int p0, int &result)
+{
+ int p = p0;
+ XMLCh ch = peek(p);
+ if (ch != '&')
+ return p0;
+ p++;
+ if (!match(p, "#x"))
+ {
+ error("parseEntity: expected '#x'");
+ return -1;
+ }
+ p += 2;
+ int val;
+ p = parseHex(p, val);
+ if (p<0)
+ return -1;
+ result = val;
+ return p;
+}
+
+int URI::parseAsciiEntity(int p0, int &result)
+{
+ int p = p0;
+ XMLCh ch = peek(p);
+ if (ch != '%')
+ return p0;
+ p++;
+ int val;
+ p = parseHex(p, val);
+ if (p<0)
+ return -1;
+ result = val;
+ return p;
+}
+
+
int URI::parseScheme(int p0)
{
int p = p0;
ch = peek(p);
if (ch == '?' || ch == '#')
break;
- path.push_back((XMLCh)ch);
- p++;
+ else if (ch == '&') //IRI entity
+ {
+ int val;
+ p2 = parseEntity(p, val);
+ if (p2<p)
+ {
+ return -1;
+ }
+ p = p2;
+ path.push_back((XMLCh)val);
+ }
+ else if (ch == '%') //ascii hex excape
+ {
+ int val;
+ p2 = parseAsciiEntity(p, val);
+ if (p2<p)
+ {
+ return -1;
+ }
+ p = p2;
+ path.push_back((XMLCh)val);
+ }
+ else
+ {
+ path.push_back((XMLCh)ch);
+ p++;
+ }
}
return p;
diff --git a/src/dom/uri.h b/src/dom/uri.h
index 8b95686b8c6d3d681737439eff4e6ce8a80ec04b..57c5c5554e68b35109bfede589b05d2912cd9037 100644 (file)
--- a/src/dom/uri.h
+++ b/src/dom/uri.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glib.h>
-
#include "dom.h"
DOMString fragment;
- void error(const char *fmt, ...) G_GNUC_PRINTF(2,3);
-
- void trace(const char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void error(const char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
+ void trace(const char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
int peek(int p);
int match(int p, char *key);
+ int parseHex(int p, int &result);
+
+ int parseEntity(int p, int &result);
+
+ int parseAsciiEntity(int p, int &result);
+
int parseScheme(int p);
int parseHierarchicalPart(int p0);
index 7dbd07be5ed0cee79a1d53e8d27415c5106661b2..fc4c7bad4ada74b5c186aaf2266c6977b1fe1812 100644 (file)
--- a/src/dom/util/ziptool.cpp
+++ b/src/dom/util/ziptool.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
/**
*
*/
- void error(char *fmt, ...);
+ void error(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
/**
*
*/
- void trace(char *fmt, ...);
+ void trace(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
/**
*
private:
//debug messages
- void error(char *fmt, ...);
- void trace(char *fmt, ...);
+ void error(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
+
+ void trace(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
bool compressWindow();
diff --git a/src/dom/util/ziptool.h b/src/dom/util/ziptool.h
index 120fe568a62d0023dd3f3954ffeab9270927e551..f8cf01cc84b9268ed669ccf705490603feb2e33f 100644 (file)
--- a/src/dom/util/ziptool.h
+++ b/src/dom/util/ziptool.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glib.h>
#include <vector>
#include <string>
std::string fileName;
//debug messages
- void error(char *fmt, ...) G_GNUC_PRINTF(2,3);
- void trace(char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void error(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
+
+ void trace(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
unsigned long crc;
private:
//debug messages
- void error(char *fmt, ...) G_GNUC_PRINTF(2,3);
- void trace(char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void error(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
+ void trace(char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
//# Private writing methods
diff --git a/src/dom/xmlreader.h b/src/dom/xmlreader.h
index f616fd1e12c8712e22262e7538252c255f54afde..16ab883a0ac751e0beb0d7fcd4892e124ba2437d 100644 (file)
--- a/src/dom/xmlreader.h
+++ b/src/dom/xmlreader.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <glib.h>
-
#include "dom.h"
namespace org
org::w3c::dom::DocumentPtr parseFile(char *fileName);
-protected:
+private:
- void error(char *format, ...) G_GNUC_PRINTF(2,3);
+ void error(char *format, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
int get(int ch);
int peek(int ch);
index d299973f9bc7e576bfaa323eaa911f096634a4b3..916158ec23fabdfda241308bd7359303a447b8e1 100644 (file)
--- a/src/dom/xpathparser.cpp
+++ b/src/dom/xpathparser.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2006 Bob Jamison
+ * Copyright (C) 2006-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/dom/xpathparser.h b/src/dom/xpathparser.h
index 7a5b7cb55c3076894b58614b9b25f763f182c9f4..2a604aa61eb8d65bb084d11bf226bb7dcc362f27 100644 (file)
--- a/src/dom/xpathparser.h
+++ b/src/dom/xpathparser.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <stdio.h>
#include <stdarg.h>
-#include <glib.h>
#include <string>
#include <vector>
/**
*
*/
- void trace(const char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void trace(const char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
/**
*
/**
*
*/
- void error(const char *fmt, ...) G_GNUC_PRINTF(2,3);
+ void error(const char *fmt, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
//#################################
//# LEXICAL SCANNING