You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(383) |
Nov
(221) |
Dec
(28) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(11) |
Feb
|
Mar
(340) |
Apr
(1) |
May
|
Jun
(49) |
Jul
|
Aug
(5) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
|
From: Jacob M. <mo...@us...> - 2002-10-17 17:52:43
|
Update of /tmp/moorman/foo In directory usw-pr-cvs1:/home/moorman/ox/foo Added Files: foo.nib Log Message: Added foo.nib. --- NEW FILE --- |
|
From: Max H. <fin...@us...> - 2002-10-17 17:31:28
|
Update of /cvsroot/jabberfox/JabberFoX2 In directory usw-pr-cvs1:/tmp/cvs-serv23643 Modified Files: .cvswrappers Log Message: local .cvswrappers Index: .cvswrappers =================================================================== RCS file: /cvsroot/jabberfox/JabberFoX2/.cvswrappers,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- .cvswrappers 23 Mar 2002 12:42:40 -0000 1.1.1.1 +++ .cvswrappers 17 Oct 2002 17:31:25 -0000 1.2 @@ -22,19 +22,19 @@ # and value is a single-quote delimited value. # Wrapped files. -*.nib -k 'b' -m 'COPY' -*.nib -k 'b' -m 'COPY' -*.palette -k 'b'-m 'COPY' -*.rtfd -k 'b' -m 'COPY' -*.wbpalette -k 'b' -m 'COPY' -*.glyphgenerator -k 'b'-m 'COPY' -*.clr -k 'b' -m 'COPY' -*.eomodeld -k 'b' -m 'COPY' + +*.nib -k 'b' -f '$CVSROOT/CVSROOT/cvs-unwrap %s' -t '$CVSROOT/CVSROOT/cvs-wrap %s %s' -m 'COPY' +*.palette -k 'b' -f '$CVSROOT/CVSROOT/cvs-unwrap %s' -t '$CVSROOT/CVSROOT/cvs-wrap %s %s' -m 'COPY' +*.rtfd -k 'b' -f '$CVSROOT/CVSROOT/cvs-unwrap %s' -t '$CVSROOT/CVSROOT/cvs-wrap %s %s' -m 'COPY' +*.wbpalette -k 'b' -f '$CVSROOT/CVSROOT/cvs-unwrap %s' -t '$CVSROOT/CVSROOT/cvs-wrap %s %s' -m 'COPY' +*.glyphgenerator -k 'b' -f '$CVSROOT/CVSROOT/cvs-unwrap %s' -t '$CVSROOT/CVSROOT/cvs-wrap %s %s' -m 'COPY' +*.clr -k 'b' -f '$CVSROOT/CVSROOT/cvs-unwrap %s' -t '$CVSROOT/CVSROOT/cvs-wrap %s %s' -m 'COPY' +*.eomodeld -k 'b' -f '$CVSROOT/CVSROOT/cvs-unwrap %s' -t '$CVSROOT/CVSROOT/cvs-wrap %s %s' -m 'COPY' # Wrapped directories. -*.wrapdir -k 'b' -m 'COPY' +*.wrapdir -k 'b' -f '$CVSROOT/CVSROOT/cvs-unwrap %s' -t '$CVSROOT/CVSROOT/cvs-wrap %s %s' -m 'COPY' # Binary files. |
|
From: Max H. <fin...@us...> - 2002-09-09 17:43:36
|
Update of /cvsroot/jabberfox/JabberFoX2/Expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv13747/Expat/lib
Modified Files:
ascii.h asciitab.h expat.h iasciitab.h latin1tab.h utf8tab.h
xmlparse.c xmlrole.c xmlrole.h xmltok.c xmltok.h xmltok_impl.c
xmltok_ns.c
Added Files:
internal.h winconfig.h
Removed Files:
expat.h.in
Log Message:
Updated to 1.95.5; fixed some compile warnings on 10.2; updated project file to latest ProjectBuilder
--- NEW FILE ---
/* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following definitions are made:
FASTCALL -- Used for most internal functions to specify that the
fastest possible calling convention be used.
inline -- Used for selected internal functions for which inlining
may improve performance on some platforms.
*/
#if defined(__GNUC__)
/* Last minute instability reported with egcs on a RedHat Linux 7.3
box; argh!
*/
/* #define FASTCALL __attribute__((stdcall, regparm(3))) */
#elif defined(WIN32)
/* XXX This seems to have an unexpected negative effect on Windows so
we'll disable it for now on that platform. It may be reconsidered
for a future release if it can be made more effective.
*/
/* #define FASTCALL __fastcall */
#endif
#ifndef FASTCALL
#define FASTCALL
#endif
#ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline)
#ifdef __GNUC__
#define inline __inline
#endif /* __GNUC__ */
#endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
#define inline inline
#else
#ifndef inline
#define inline
#endif
#endif
--- NEW FILE ---
/*================================================================
** Copyright 2000, Clark Cooper
** All rights reserved.
**
** This is free software. You are permitted to copy, distribute, or modify
** it under the terms of the MIT/X license (contained in the COPYING file
** with this distribution.)
*/
#ifndef WINCONFIG_H
#define WINCONFIG_H
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <memory.h>
#include <string.h>
#define XML_NS 1
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
/* we will assume all Windows platforms are little endian */
#define BYTEORDER 1234
/* Windows has memmove() available. */
#define HAVE_MEMMOVE
#endif /* ndef WINCONFIG_H */
Index: ascii.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/ascii.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ascii.h 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ ascii.h 9 Sep 2002 17:43:01 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#define ASCII_A 0x41
Index: asciitab.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/asciitab.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- asciitab.h 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ asciitab.h 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
Index: expat.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/expat.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- expat.h 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ expat.h 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,30 +1,91 @@
-/*
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#ifndef XmlParse_INCLUDED
#define XmlParse_INCLUDED 1
+#ifdef __VMS
[...1134 lines suppressed...]
+ long int value;
+} XML_Feature;
+
+XMLPARSEAPI(const XML_Feature *)
+XML_GetFeatureList(void);
+
+
+/* Expat follows the GNU/Linux convention of odd number minor version for
+ beta/development releases and even number minor version for stable
+ releases. Micro is bumped with each release, and set to 0 with each
+ change to major or minor version.
+*/
#define XML_MAJOR_VERSION 1
#define XML_MINOR_VERSION 95
-#define XML_MICRO_VERSION 2
-#define VERSION "expat_1.95.2"
+#define XML_MICRO_VERSION 5
#ifdef __cplusplus
}
Index: iasciitab.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/iasciitab.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- iasciitab.h 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ iasciitab.h 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
Index: latin1tab.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/latin1tab.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- latin1tab.h 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ latin1tab.h 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
Index: utf8tab.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/utf8tab.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- utf8tab.h 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ utf8tab.h 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
Index: xmlparse.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/xmlparse.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlparse.c 23 Mar 2002 12:42:57 -0000 1.1.1.1
+++ xmlparse.c 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,30 +1,41 @@
-/*
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
+#include <stddef.h>
+#include <string.h> /* memset(), memcpy() */
+
#ifdef COMPILED_FROM_DSP
[...7126 lines suppressed...]
- if (! name)
- return 0;
+ if (!name)
+ return NULL;
ret = (ELEMENT_TYPE *) lookup(&dtd.elementTypes, name, sizeof(ELEMENT_TYPE));
- if (! ret)
- return 0;
+ if (!ret)
+ return NULL;
if (ret->name != name)
poolDiscard(&dtd.pool);
else {
poolFinish(&dtd.pool);
if (!setElementTypePrefix(parser, ret))
- return 0;
+ return NULL;
}
return ret;
-} /* End getElementType */
+}
Index: xmlrole.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/xmlrole.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlrole.c 23 Mar 2002 12:42:57 -0000 1.1.1.1
+++ xmlrole.c 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,17 +1,16 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
-static char RCSId[]
- = "$Header: /cvsroot/jabberfox/JabberFoX2/Expat/lib/xmlrole.c,v 1.1.1.1 2002/03/23 12:42:57 fingolfin Exp $";
-
#ifdef COMPILED_FROM_DSP
[...1643 lines suppressed...]
-void XmlPrologStateInit(PROLOG_STATE *state)
+void
+XmlPrologStateInit(PROLOG_STATE *state)
{
state->handler = prolog0;
#ifdef XML_DTD
state->documentEntity = 1;
state->includeLevel = 0;
+ state->inEntityValue = 0;
#endif /* XML_DTD */
}
#ifdef XML_DTD
-void XmlPrologStateInitExternalEntity(PROLOG_STATE *state)
+void
+XmlPrologStateInitExternalEntity(PROLOG_STATE *state)
{
state->handler = externalSubset0;
state->documentEntity = 0;
Index: xmlrole.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/xmlrole.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlrole.h 23 Mar 2002 12:42:57 -0000 1.1.1.1
+++ xmlrole.h 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,11 +1,16 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#ifndef XmlRole_INCLUDED
#define XmlRole_INCLUDED 1
+#ifdef __VMS
+/* 0 1 2 3 0 1 2 3
+ 1234567890123456789012345678901 1234567890123456789012345678901 */
+#define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt
+#endif
+
#include "xmltok.h"
#ifdef __cplusplus
@@ -17,6 +22,7 @@
XML_ROLE_NONE = 0,
XML_ROLE_XML_DECL,
XML_ROLE_INSTANCE_START,
+ XML_ROLE_DOCTYPE_NONE,
XML_ROLE_DOCTYPE_NAME,
XML_ROLE_DOCTYPE_SYSTEM_ID,
XML_ROLE_DOCTYPE_PUBLIC_ID,
@@ -24,11 +30,13 @@
XML_ROLE_DOCTYPE_CLOSE,
XML_ROLE_GENERAL_ENTITY_NAME,
XML_ROLE_PARAM_ENTITY_NAME,
+ XML_ROLE_ENTITY_NONE,
XML_ROLE_ENTITY_VALUE,
XML_ROLE_ENTITY_SYSTEM_ID,
XML_ROLE_ENTITY_PUBLIC_ID,
XML_ROLE_ENTITY_COMPLETE,
XML_ROLE_ENTITY_NOTATION_NAME,
+ XML_ROLE_NOTATION_NONE,
XML_ROLE_NOTATION_NAME,
XML_ROLE_NOTATION_SYSTEM_ID,
XML_ROLE_NOTATION_NO_SYSTEM_ID,
@@ -44,11 +52,13 @@
XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
XML_ROLE_ATTRIBUTE_ENUM_VALUE,
XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
+ XML_ROLE_ATTLIST_NONE,
XML_ROLE_ATTLIST_ELEMENT_NAME,
XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
XML_ROLE_FIXED_ATTRIBUTE_VALUE,
+ XML_ROLE_ELEMENT_NONE,
XML_ROLE_ELEMENT_NAME,
XML_ROLE_CONTENT_ANY,
XML_ROLE_CONTENT_EMPTY,
@@ -64,6 +74,8 @@
XML_ROLE_CONTENT_ELEMENT_REP,
XML_ROLE_CONTENT_ELEMENT_OPT,
XML_ROLE_CONTENT_ELEMENT_PLUS,
+ XML_ROLE_PI,
+ XML_ROLE_COMMENT,
#ifdef XML_DTD
XML_ROLE_TEXT_DECL,
XML_ROLE_IGNORE_SECT,
@@ -73,15 +85,17 @@
};
typedef struct prolog_state {
- int (*handler)(struct prolog_state *state,
- int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc);
+ int (FASTCALL *handler) (struct prolog_state *state,
+ int tok,
+ const char *ptr,
+ const char *end,
+ const ENCODING *enc);
unsigned level;
+ int role_none;
#ifdef XML_DTD
unsigned includeLevel;
int documentEntity;
+ int inEntityValue;
#endif /* XML_DTD */
} PROLOG_STATE;
Index: xmltok.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/xmltok.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmltok.c 23 Mar 2002 12:42:57 -0000 1.1.1.1
+++ xmltok.c 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,14 +1,16 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#ifdef COMPILED_FROM_DSP
-# include "winconfig.h"
+#include "winconfig.h"
+#elif defined(MACOS_CLASSIC)
[...1347 lines suppressed...]
+ if (state == XML_CONTENT_STATE)
+ break;
+ *encPtr = encodingTable[UTF_16LE_ENC];
+ return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
}
break;
}
@@ -1553,9 +1619,9 @@
ENCODING *
XmlInitUnknownEncodingNS(void *mem,
- int *table,
- int (*convert)(void *userData, const char *p),
- void *userData)
+ int *table,
+ int (*convert)(void *userData, const char *p),
+ void *userData)
{
ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData);
if (enc)
Index: xmltok.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/xmltok.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmltok.h 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ xmltok.h 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#ifndef XmlTok_INCLUDED
@@ -11,19 +10,21 @@
#endif
/* The following token may be returned by XmlContentTok */
-#define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be start of
- illegal ]]> sequence */
-/* The following tokens may be returned by both XmlPrologTok and XmlContentTok */
-#define XML_TOK_NONE -4 /* The string to be scanned is empty */
-#define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan;
- might be part of CRLF sequence */
-#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
-#define XML_TOK_PARTIAL -1 /* only part of a token */
+#define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be
+ start of illegal ]]> sequence */
+/* The following tokens may be returned by both XmlPrologTok and
+ XmlContentTok.
+*/
+#define XML_TOK_NONE -4 /* The string to be scanned is empty */
+#define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan;
+ might be part of CRLF sequence */
+#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
+#define XML_TOK_PARTIAL -1 /* only part of a token */
#define XML_TOK_INVALID 0
/* The following tokens are returned by XmlContentTok; some are also
- returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok */
-
+ returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok.
+*/
#define XML_TOK_START_TAG_WITH_ATTS 1
#define XML_TOK_START_TAG_NO_ATTS 2
#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
@@ -33,22 +34,24 @@
#define XML_TOK_DATA_NEWLINE 7
#define XML_TOK_CDATA_SECT_OPEN 8
#define XML_TOK_ENTITY_REF 9
-#define XML_TOK_CHAR_REF 10 /* numeric character reference */
+#define XML_TOK_CHAR_REF 10 /* numeric character reference */
-/* The following tokens may be returned by both XmlPrologTok and XmlContentTok */
-#define XML_TOK_PI 11 /* processing instruction */
-#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
+/* The following tokens may be returned by both XmlPrologTok and
+ XmlContentTok.
+*/
+#define XML_TOK_PI 11 /* processing instruction */
+#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
#define XML_TOK_COMMENT 13
-#define XML_TOK_BOM 14 /* Byte order mark */
+#define XML_TOK_BOM 14 /* Byte order mark */
/* The following tokens are returned only by XmlPrologTok */
#define XML_TOK_PROLOG_S 15
-#define XML_TOK_DECL_OPEN 16 /* <!foo */
-#define XML_TOK_DECL_CLOSE 17 /* > */
+#define XML_TOK_DECL_OPEN 16 /* <!foo */
+#define XML_TOK_DECL_CLOSE 17 /* > */
#define XML_TOK_NAME 18
#define XML_TOK_NMTOKEN 19
-#define XML_TOK_POUND_NAME 20 /* #name */
-#define XML_TOK_OR 21 /* | */
+#define XML_TOK_POUND_NAME 20 /* #name */
+#define XML_TOK_OR 21 /* | */
#define XML_TOK_PERCENT 22
#define XML_TOK_OPEN_PAREN 23
#define XML_TOK_CLOSE_PAREN 24
@@ -59,14 +62,14 @@
#define XML_TOK_INSTANCE_START 29
/* The following occur only in element type declarations */
-#define XML_TOK_NAME_QUESTION 30 /* name? */
-#define XML_TOK_NAME_ASTERISK 31 /* name* */
-#define XML_TOK_NAME_PLUS 32 /* name+ */
-#define XML_TOK_COND_SECT_OPEN 33 /* <![ */
-#define XML_TOK_COND_SECT_CLOSE 34 /* ]]> */
-#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
-#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
-#define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */
+#define XML_TOK_NAME_QUESTION 30 /* name? */
+#define XML_TOK_NAME_ASTERISK 31 /* name* */
+#define XML_TOK_NAME_PLUS 32 /* name+ */
+#define XML_TOK_COND_SECT_OPEN 33 /* <![ */
+#define XML_TOK_COND_SECT_CLOSE 34 /* ]]> */
+#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
+#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
+#define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */
#define XML_TOK_COMMA 38
/* The following token is returned only by XmlAttributeValueTok */
@@ -75,8 +78,9 @@
/* The following token is returned only by XmlCdataSectionTok */
#define XML_TOK_CDATA_SECT_CLOSE 40
-/* With namespace processing this is returned by XmlPrologTok
- for a name with a colon. */
+/* With namespace processing this is returned by XmlPrologTok for a
+ name with a colon.
+*/
#define XML_TOK_PREFIXED_NAME 41
#ifdef XML_DTD
@@ -121,64 +125,73 @@
struct encoding;
typedef struct encoding ENCODING;
+typedef int (FASTCALL *SCANNER)(const ENCODING *,
+ const char *,
+ const char *,
+ const char **);
+
struct encoding {
- int (*scanners[XML_N_STATES])(const ENCODING *,
- const char *,
- const char *,
- const char **);
- int (*literalScanners[XML_N_LITERAL_TYPES])(const ENCODING *,
- const char *,
- const char *,
- const char **);
- int (*sameName)(const ENCODING *,
- const char *, const char *);
- int (*nameMatchesAscii)(const ENCODING *,
- const char *, const char *, const char *);
- int (*nameLength)(const ENCODING *, const char *);
- const char *(*skipS)(const ENCODING *, const char *);
- int (*getAtts)(const ENCODING *enc, const char *ptr,
- int attsMax, ATTRIBUTE *atts);
- int (*charRefNumber)(const ENCODING *enc, const char *ptr);
- int (*predefinedEntityName)(const ENCODING *, const char *, const char *);
- void (*updatePosition)(const ENCODING *,
- const char *ptr,
- const char *end,
- POSITION *);
- int (*isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
- const char **badPtr);
- void (*utf8Convert)(const ENCODING *enc,
- const char **fromP,
- const char *fromLim,
- char **toP,
- const char *toLim);
- void (*utf16Convert)(const ENCODING *enc,
- const char **fromP,
- const char *fromLim,
- unsigned short **toP,
- const unsigned short *toLim);
+ SCANNER scanners[XML_N_STATES];
+ SCANNER literalScanners[XML_N_LITERAL_TYPES];
+ int (FASTCALL *sameName)(const ENCODING *,
+ const char *,
+ const char *);
+ int (FASTCALL *nameMatchesAscii)(const ENCODING *,
+ const char *,
+ const char *,
+ const char *);
+ int (FASTCALL *nameLength)(const ENCODING *, const char *);
+ const char *(FASTCALL *skipS)(const ENCODING *, const char *);
+ int (FASTCALL *getAtts)(const ENCODING *enc,
+ const char *ptr,
+ int attsMax,
+ ATTRIBUTE *atts);
+ int (FASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
+ int (FASTCALL *predefinedEntityName)(const ENCODING *,
+ const char *,
+ const char *);
+ void (FASTCALL *updatePosition)(const ENCODING *,
+ const char *ptr,
+ const char *end,
+ POSITION *);
+ int (FASTCALL *isPublicId)(const ENCODING *enc,
+ const char *ptr,
+ const char *end,
+ const char **badPtr);
+ void (FASTCALL *utf8Convert)(const ENCODING *enc,
+ const char **fromP,
+ const char *fromLim,
+ char **toP,
+ const char *toLim);
+ void (FASTCALL *utf16Convert)(const ENCODING *enc,
+ const char **fromP,
+ const char *fromLim,
+ unsigned short **toP,
+ const unsigned short *toLim);
int minBytesPerChar;
char isUtf8;
char isUtf16;
};
-/*
-Scan the string starting at ptr until the end of the next complete token,
-but do not scan past eptr. Return an integer giving the type of token.
+/* Scan the string starting at ptr until the end of the next complete
+ token, but do not scan past eptr. Return an integer giving the
+ type of token.
-Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set.
+ Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set.
-Return XML_TOK_PARTIAL when the string does not contain a complete token;
-nextTokPtr will not be set.
+ Return XML_TOK_PARTIAL when the string does not contain a complete
+ token; nextTokPtr will not be set.
-Return XML_TOK_INVALID when the string does not start a valid token; nextTokPtr
-will be set to point to the character which made the token invalid.
+ Return XML_TOK_INVALID when the string does not start a valid
+ token; nextTokPtr will be set to point to the character which made
+ the token invalid.
-Otherwise the string starts with a valid token; nextTokPtr will be set to point
-to the character following the end of that token.
+ Otherwise the string starts with a valid token; nextTokPtr will be
+ set to point to the character following the end of that token.
-Each data character counts as a single token, but adjacent data characters
-may be returned together. Similarly for characters in the prolog outside
-literals, comments and processing instructions.
+ Each data character counts as a single token, but adjacent data
+ characters may be returned together. Similarly for characters in
+ the prolog outside literals, comments and processing instructions.
*/
@@ -201,9 +214,9 @@
#endif /* XML_DTD */
-/* This is used for performing a 2nd-level tokenization on
-the content of a literal that has already been returned by XmlTok. */
-
+/* This is used for performing a 2nd-level tokenization on the content
+ of a literal that has already been returned by XmlTok.
+*/
#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \
(((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
@@ -251,15 +264,15 @@
} INIT_ENCODING;
int XmlParseXmlDecl(int isGeneralTextEntity,
- const ENCODING *enc,
- const char *ptr,
- const char *end,
- const char **badPtr,
- const char **versionPtr,
- const char **versionEndPtr,
- const char **encodingNamePtr,
- const ENCODING **namedEncodingPtr,
- int *standalonePtr);
+ const ENCODING *enc,
+ const char *ptr,
+ const char *end,
+ const char **badPtr,
+ const char **versionPtr,
+ const char **versionEndPtr,
+ const char **encodingNamePtr,
+ const ENCODING **namedEncodingPtr,
+ int *standalonePtr);
int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncoding(void);
@@ -270,28 +283,28 @@
int XmlSizeOfUnknownEncoding(void);
ENCODING *
XmlInitUnknownEncoding(void *mem,
- int *table,
- int (*conv)(void *userData, const char *p),
- void *userData);
+ int *table,
+ int (*conv)(void *userData, const char *p),
+ void *userData);
int XmlParseXmlDeclNS(int isGeneralTextEntity,
- const ENCODING *enc,
- const char *ptr,
- const char *end,
- const char **badPtr,
- const char **versionPtr,
- const char **versionEndPtr,
- const char **encodingNamePtr,
- const ENCODING **namedEncodingPtr,
- int *standalonePtr);
+ const ENCODING *enc,
+ const char *ptr,
+ const char *end,
+ const char **badPtr,
+ const char **versionPtr,
+ const char **versionEndPtr,
+ const char **encodingNamePtr,
+ const ENCODING **namedEncodingPtr,
+ int *standalonePtr);
int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncodingNS(void);
const ENCODING *XmlGetUtf16InternalEncodingNS(void);
ENCODING *
XmlInitUnknownEncodingNS(void *mem,
- int *table,
- int (*conv)(void *userData, const char *p),
- void *userData);
+ int *table,
+ int (*conv)(void *userData, const char *p),
+ void *userData);
#ifdef __cplusplus
}
#endif
Index: xmltok_impl.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/xmltok_impl.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmltok_impl.c 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ xmltok_impl.c 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#ifndef IS_INVALID_CHAR
@@ -10,7 +9,7 @@
#define INVALID_LEAD_CASE(n, ptr, nextTokPtr) \
case BT_LEAD ## n: \
[...1585 lines suppressed...]
- const char *ptr,
- const char *end,
- POSITION *pos)
+static void FASTCALL
+PREFIX(updatePosition)(const ENCODING *enc,
+ const char *ptr,
+ const char *end,
+ POSITION *pos)
{
while (ptr != end) {
switch (BYTE_TYPE(enc, ptr)) {
@@ -1748,7 +1758,7 @@
pos->lineNumber++;
ptr += MINBPC(enc);
if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF)
- ptr += MINBPC(enc);
+ ptr += MINBPC(enc);
pos->columnNumber = (unsigned)-1;
break;
default:
Index: xmltok_ns.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/lib/xmltok_ns.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmltok_ns.c 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ xmltok_ns.c 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,22 +1,25 @@
-const ENCODING *NS(XmlGetUtf8InternalEncoding)(void)
+const ENCODING *
+NS(XmlGetUtf8InternalEncoding)(void)
{
return &ns(internal_utf8_encoding).enc;
}
-const ENCODING *NS(XmlGetUtf16InternalEncoding)(void)
+const ENCODING *
+NS(XmlGetUtf16InternalEncoding)(void)
{
-#if XML_BYTE_ORDER == 12
+#if BYTEORDER == 1234
return &ns(internal_little2_encoding).enc;
-#elif XML_BYTE_ORDER == 21
+#elif BYTEORDER == 4321
return &ns(internal_big2_encoding).enc;
#else
const short n = 1;
- return *(const char *)&n ? &ns(internal_little2_encoding).enc : &ns(internal_big2_encoding).enc;
+ return (*(const char *)&n
+ ? &ns(internal_little2_encoding).enc
+ : &ns(internal_big2_encoding).enc);
#endif
}
-static
-const ENCODING *NS(encodings)[] = {
+static const ENCODING *NS(encodings)[] = {
&ns(latin1_encoding).enc,
&ns(ascii_encoding).enc,
&ns(utf8_encoding).enc,
@@ -26,21 +29,25 @@
&ns(utf8_encoding).enc /* NO_ENC */
};
-static
-int NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
- const char **nextTokPtr)
+static int FASTCALL
+NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
+ const char **nextTokPtr)
{
- return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_PROLOG_STATE, ptr, end, nextTokPtr);
+ return initScan(NS(encodings), (const INIT_ENCODING *)enc,
+ XML_PROLOG_STATE, ptr, end, nextTokPtr);
}
-static
-int NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
- const char **nextTokPtr)
+static int FASTCALL
+NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
+ const char **nextTokPtr)
{
- return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_CONTENT_STATE, ptr, end, nextTokPtr);
+ return initScan(NS(encodings), (const INIT_ENCODING *)enc,
+ XML_CONTENT_STATE, ptr, end, nextTokPtr);
}
-int NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr, const char *name)
+int
+NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr,
+ const char *name)
{
int i = getEncodingIndex(name);
if (i == UNKNOWN_ENC)
@@ -54,8 +61,8 @@
return 1;
}
-static
-const ENCODING *NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end)
+static const ENCODING *
+NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end)
{
#define ENCODING_MAX 128
char buf[ENCODING_MAX];
@@ -73,26 +80,27 @@
return NS(encodings)[i];
}
-int NS(XmlParseXmlDecl)(int isGeneralTextEntity,
- const ENCODING *enc,
- const char *ptr,
- const char *end,
- const char **badPtr,
- const char **versionPtr,
- const char **versionEndPtr,
- const char **encodingName,
- const ENCODING **encoding,
- int *standalone)
+int
+NS(XmlParseXmlDecl)(int isGeneralTextEntity,
+ const ENCODING *enc,
+ const char *ptr,
+ const char *end,
+ const char **badPtr,
+ const char **versionPtr,
+ const char **versionEndPtr,
+ const char **encodingName,
+ const ENCODING **encoding,
+ int *standalone)
{
return doParseXmlDecl(NS(findEncoding),
- isGeneralTextEntity,
- enc,
- ptr,
- end,
- badPtr,
- versionPtr,
- versionEndPtr,
- encodingName,
- encoding,
- standalone);
+ isGeneralTextEntity,
+ enc,
+ ptr,
+ end,
+ badPtr,
+ versionPtr,
+ versionEndPtr,
+ encodingName,
+ encoding,
+ standalone);
}
--- expat.h.in DELETED ---
|
|
From: Max H. <fin...@us...> - 2002-09-09 17:43:34
|
Update of /cvsroot/jabberfox/JabberFoX2/Expat/doc
In directory usw-pr-cvs1:/tmp/cvs-serv13747/Expat/doc
Modified Files:
reference.html style.css
Added Files:
valid-xhtml10.png xmlwf.1 xmlwf.sgml
Log Message:
Updated to 1.95.5; fixed some compile warnings on 10.2; updated project file to latest ProjectBuilder
--- NEW FILE ---
PNG
!Ò¨ ÒóÝÏ WOË<sé]ÔÆÍÀ9`ro:Ä-¶Å²´ö~Äs°r;¿t;@7×Þ?ܨèÓÄo§Â}YU5ïñCò+m÷ ÓnÈf»
ýVÏ1èËmY
qàótðÖG'¯^/ÒÖ'ÜZ0Q]Ã¥âGÃXÎC·Ð¢d]L.éàÂU`e}B°Æ{®ÁzzR¬½¼"+1!×°kq+±¦(%Y[Ðe.ÜPÚ)XòòòÁgø*âãò5±´?ÔëXN³mut¾'»vy#/ßJÂYHÂ˸$¼ *.ñ½Ç׿Ç^× £»yßÇ«µ®ÓKK½Ñà
mÃÐ;}ó ½y
W4óG=+æ;<¡8ú»#ä÷ã¡Î-ƬW±¹ãTXSí¸R³
aeÄUae¦[oÕsÐOTeѸ٠[Õ{£T<Øü¨ø¢®ßæthÂ5sS]ícºðRXÑf5aËÂïÍIy<Þ 6ÐÑ #áãÏAZ´bIbêâ>æ*oÊÑ
G`¸£ý¼fï3ï
;yß_+'H½6sáÖÝsGµAoѪhåáµ9AØq>g<rzN
Ö]¿¸68á
üÇ
Ç.öëõ/;î<ºïh$<[.+éðfah#ÄðÏÉMéÿ!H·øÆÿcûöÏ
ù!P9DAaúMþ¢Éªî;
--- NEW FILE ---
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <st...@gg...>.
.TH "XMLWF" "1" "22 April 2002" "" ""
.SH NAME
xmlwf \- Determines if an XML document is well-formed
.SH SYNOPSIS
\fBxmlwf\fR [ \fB-s\fR] [ \fB-n\fR] [ \fB-p\fR] [ \fB-x\fR] [ \fB-e \fIencoding\fB\fR] [ \fB-w\fR] [ \fB-d \fIoutput-dir\fB\fR] [ \fB-c\fR] [ \fB-m\fR] [ \fB-r\fR] [ \fB-t\fR] [ \fB-v\fR] [ \fBfile ...\fR]
.SH "DESCRIPTION"
.PP
\fBxmlwf\fR uses the Expat library to determine
if an XML document is well-formed. It is non-validating.
.PP
If you do not specify any files on the command-line,
and you have a recent version of xmlwf, the input
file will be read from stdin.
.SH "WELL-FORMED DOCUMENTS"
.PP
A well-formed document must adhere to the
following rules:
.TP 0.2i
\(bu
The file begins with an XML declaration. For instance,
<?xml version="1.0" standalone="yes"?>.
\fBNOTE:\fR xmlwf does not currently
check for a valid XML declaration.
.TP 0.2i
\(bu
Every start tag is either empty (<tag/>)
or has a corresponding end tag.
.TP 0.2i
\(bu
There is exactly one root element. This element must contain
all other elements in the document. Only comments, white
space, and processing instructions may come after the close
of the root element.
.TP 0.2i
\(bu
All elements nest properly.
.TP 0.2i
\(bu
All attribute values are enclosed in quotes (either single
or double).
.PP
If the document has a DTD, and it strictly complies with that
DTD, then the document is also considered \fBvalid\fR.
xmlwf is a non-validating parser -- it does not check the DTD.
However, it does support external entities (see the -x option).
.SH "OPTIONS"
.PP
When an option includes an argument, you may specify the argument either
separate ("d output") or mashed ("-doutput"). xmlwf supports both.
.TP
\fB-c\fR
If the input file is well-formed and xmlwf doesn't
encounter any errors, the input file is simply copied to
the output directory unchanged.
This implies no namespaces (turns off -n) and
requires -d to specify an output file.
.TP
\fB-d output-dir\fR
Specifies a directory to contain transformed
representations of the input files.
By default, -d outputs a canonical representation
(described below).
You can select different output formats using -c and -m.
The output filenames will
be exactly the same as the input filenames or "STDIN" if the input is
coming from STDIN. Therefore, you must be careful that the
output file does not go into the same directory as the input
file. Otherwise, xmlwf will delete the input file before
it generates the output file (just like running
cat < file > file in most shells).
Two structurally equivalent XML documents have a byte-for-byte
identical canonical XML representation.
Note that ignorable white space is considered significant and
is treated equivalently to data.
More on canonical XML can be found at
http://www.jclark.com/xml/canonxml.html .
.TP
\fB-e encoding\fR
Specifies the character encoding for the document, overriding
any document encoding declaration. xmlwf
has four built-in encodings:
US-ASCII,
UTF-8,
UTF-16, and
ISO-8859-1.
Also see the -w option.
.TP
\fB-m\fR
Outputs some strange sort of XML file that completely
describes the the input file, including character postitions.
Requires -d to specify an output file.
.TP
\fB-n\fR
Turns on namespace processing. (describe namespaces)
-c disables namespaces.
.TP
\fB-p\fR
Tells xmlwf to process external DTDs and parameter
entities.
Normally xmlwf never parses parameter entities.
-p tells it to always parse them.
-p implies -x.
.TP
\fB-r\fR
Normally xmlwf memory-maps the XML file before parsing.
-r turns off memory-mapping and uses normal file IO calls instead.
Of course, memory-mapping is automatically turned off
when reading from STDIN.
.TP
\fB-s\fR
Prints an error if the document is not standalone.
A document is standalone if it has no external subset and no
references to parameter entities.
.TP
\fB-t\fR
Turns on timings. This tells Expat to parse the entire file,
but not perform any processing.
This gives a fairly accurate idea of the raw speed of Expat itself
without client overhead.
-t turns off most of the output options (-d, -m -c, ...).
.TP
\fB-v\fR
Prints the version of the Expat library being used, and then exits.
.TP
\fB-w\fR
Enables Windows code pages.
Normally, xmlwf will throw an error if it runs across
an encoding that it is not equipped to handle itself. With
-w, xmlwf will try to use a Windows code page. See
also -e.
.TP
\fB-x\fR
Turns on parsing external entities.
Non-validating parsers are not required to resolve external
entities, or even expand entities at all.
Expat always expands internal entities (?),
but external entity parsing must be enabled explicitly.
External entities are simply entities that obtain their
data from outside the XML file currently being parsed.
This is an example of an internal entity:
.nf
<!ENTITY vers '1.0.2'>
.fi
And here are some examples of external entities:
.nf
<!ENTITY header SYSTEM "header-&vers;.xml"> (parsed)
<!ENTITY logo SYSTEM "logo.png" PNG> (unparsed)
.fi
.TP
\fB--\fR
For some reason, xmlwf specifically ignores "--"
anywhere it appears on the command line.
.PP
Older versions of xmlwf do not support reading from STDIN.
.SH "OUTPUT"
.PP
If an input file is not well-formed, xmlwf outputs
a single line describing the problem to STDOUT.
If a file is well formed, xmlwf outputs nothing.
Note that the result code is \fBnot\fR set.
.SH "BUGS"
.PP
According to the W3C standard, an XML file without a
declaration at the beginning is not considered well-formed.
However, xmlwf allows this to pass.
.PP
xmlwf returns a 0 - noerr result, even if the file is
not well-formed. There is no good way for a program to use
xmlwf to quickly check a file -- it must parse xmlwf's STDOUT.
.PP
The errors should go to STDERR, not stdout.
.PP
There should be a way to get -d to send its output to STDOUT
rather than forcing the user to send it to a file.
.PP
I have no idea why anyone would want to use the -d, -c
and -m options. If someone could explain it to me, I'd
like to add this information to this manpage.
.SH "ALTERNATIVES"
.PP
Here are some XML validators on the web:
.nf
http://www.hcrc.ed.ac.uk/~richard/xml-check.html
http://www.stg.brown.edu/service/xmlvalid/
http://www.scripting.com/frontier5/xml/code/xmlValidator.html
http://www.xml.com/pub/a/tools/ruwf/check.html
--- NEW FILE ---
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>Scott</firstname>">
<!ENTITY dhsurname "<surname>Bronson</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>December 5, 2001</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>1</manvolnum>">
<!ENTITY dhemail "<email>br...@ri...</email>">
<!ENTITY dhusername "Scott Bronson">
<!ENTITY dhucpackage "<refentrytitle>XMLWF</refentrytitle>">
<!ENTITY dhpackage "xmlwf">
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2001</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>Determines if an XML document is well-formed</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhpackage;</command>
<arg><option>-s</option></arg>
<arg><option>-n</option></arg>
<arg><option>-p</option></arg>
<arg><option>-x</option></arg>
<arg><option>-e <replaceable>encoding</replaceable></option></arg>
<arg><option>-w</option></arg>
<arg><option>-d <replaceable>output-dir</replaceable></option></arg>
<arg><option>-c</option></arg>
<arg><option>-m</option></arg>
<arg><option>-r</option></arg>
<arg><option>-t</option></arg>
<arg><option>-v</option></arg>
<arg>file ...</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>&dhpackage;</command> uses the Expat library to determine
if an XML document is well-formed. It is non-validating.
</para>
<para>
If you do not specify any files on the command-line,
and you have a recent version of &dhpackage;, the input
file will be read from stdin.
</para>
</refsect1>
<refsect1>
<title>WELL-FORMED DOCUMENTS</title>
<para>
A well-formed document must adhere to the
following rules:
</para>
<itemizedlist>
<listitem><para>
The file begins with an XML declaration. For instance,
<literal><?xml version="1.0" standalone="yes"?></literal>.
<emphasis>NOTE:</emphasis> &dhpackage; does not currently
check for a valid XML declaration.
</para></listitem>
<listitem><para>
Every start tag is either empty (<tag/>)
or has a corresponding end tag.
</para></listitem>
<listitem><para>
There is exactly one root element. This element must contain
all other elements in the document. Only comments, white
space, and processing instructions may come after the close
of the root element.
</para></listitem>
<listitem><para>
All elements nest properly.
</para></listitem>
<listitem><para>
All attribute values are enclosed in quotes (either single
or double).
</para></listitem>
</itemizedlist>
<para>
If the document has a DTD, and it strictly complies with that
DTD, then the document is also considered <emphasis>valid</emphasis>.
&dhpackage; is a non-validating parser -- it does not check the DTD.
However, it does support external entities (see the -x option).
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<para>
When an option includes an argument, you may specify the argument either
separate ("d output") or mashed ("-doutput"). &dhpackage; supports both.
</para>
<variablelist>
<varlistentry>
<term><option>-c</option></term>
<listitem>
<para>
If the input file is well-formed and &dhpackage; doesn't
encounter any errors, the input file is simply copied to
the output directory unchanged.
This implies no namespaces (turns off -n) and
requires -d to specify an output file.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d output-dir</option></term>
<listitem>
<para>
Specifies a directory to contain transformed
representations of the input files.
By default, -d outputs a canonical representation
(described below).
You can select different output formats using -c and -m.
</para>
<para>
The output filenames will
be exactly the same as the input filenames or "STDIN" if the input is
coming from STDIN. Therefore, you must be careful that the
output file does not go into the same directory as the input
file. Otherwise, &dhpackage; will delete the input file before
it generates the output file (just like running
<literal>cat < file > file</literal> in most shells).
</para>
<para>
Two structurally equivalent XML documents have a byte-for-byte
identical canonical XML representation.
Note that ignorable white space is considered significant and
is treated equivalently to data.
More on canonical XML can be found at
http://www.jclark.com/xml/canonxml.html .
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-e encoding</option></term>
<listitem>
<para>
Specifies the character encoding for the document, overriding
any document encoding declaration. &dhpackage;
has four built-in encodings:
<literal>US-ASCII</literal>,
<literal>UTF-8</literal>,
<literal>UTF-16</literal>, and
<literal>ISO-8859-1</literal>.
Also see the -w option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option></term>
<listitem>
<para>
Outputs some strange sort of XML file that completely
describes the the input file, including character postitions.
Requires -d to specify an output file.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-n</option></term>
<listitem>
<para>
Turns on namespace processing. (describe namespaces)
-c disables namespaces.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p</option></term>
<listitem>
<para>
Tells xmlwf to process external DTDs and parameter
entities.
</para>
<para>
Normally &dhpackage; never parses parameter entities.
-p tells it to always parse them.
-p implies -x.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-r</option></term>
<listitem>
<para>
Normally &dhpackage; memory-maps the XML file before parsing.
-r turns off memory-mapping and uses normal file IO calls instead.
Of course, memory-mapping is automatically turned off
when reading from STDIN.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option></term>
<listitem>
<para>
Prints an error if the document is not standalone.
A document is standalone if it has no external subset and no
references to parameter entities.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-t</option></term>
<listitem>
<para>
Turns on timings. This tells Expat to parse the entire file,
but not perform any processing.
This gives a fairly accurate idea of the raw speed of Expat itself
without client overhead.
-t turns off most of the output options (-d, -m -c, ...).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<listitem>
<para>
Prints the version of the Expat library being used, and then exits.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-w</option></term>
<listitem>
<para>
Enables Windows code pages.
Normally, &dhpackage; will throw an error if it runs across
an encoding that it is not equipped to handle itself. With
-w, &dhpackage; will try to use a Windows code page. See
also -e.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-x</option></term>
<listitem>
<para>
Turns on parsing external entities.
</para>
<para>
Non-validating parsers are not required to resolve external
entities, or even expand entities at all.
Expat always expands internal entities (?),
but external entity parsing must be enabled explicitly.
</para>
<para>
External entities are simply entities that obtain their
data from outside the XML file currently being parsed.
</para>
<para>
This is an example of an internal entity:
<literallayout>
<!ENTITY vers '1.0.2'>
</literallayout>
</para>
<para>
And here are some examples of external entities:
<literallayout>
<!ENTITY header SYSTEM "header-&vers;.xml"> (parsed)
<!ENTITY logo SYSTEM "logo.png" PNG> (unparsed)
</literallayout>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--</option></term>
<listitem>
<para>
For some reason, &dhpackage; specifically ignores "--"
anywhere it appears on the command line.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Older versions of &dhpackage; do not support reading from STDIN.
</para>
</refsect1>
<refsect1>
<title>OUTPUT</title>
<para>
If an input file is not well-formed, &dhpackage; outputs
a single line describing the problem to STDOUT.
If a file is well formed, &dhpackage; outputs nothing.
Note that the result code is <emphasis>not</emphasis> set.
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
According to the W3C standard, an XML file without a
declaration at the beginning is not considered well-formed.
However, &dhpackage; allows this to pass.
</para>
<para>
&dhpackage; returns a 0 - noerr result, even if the file is
not well-formed. There is no good way for a program to use
xmlwf to quickly check a file -- it must parse xmlwf's STDOUT.
</para>
<para>
The errors should go to STDERR, not stdout.
</para>
<para>
There should be a way to get -d to send its output to STDOUT
rather than forcing the user to send it to a file.
</para>
<para>
I have no idea why anyone would want to use the -d, -c
and -m options. If someone could explain it to me, I'd
like to add this information to this manpage.
</para>
</refsect1>
<refsect1>
<title>ALTERNATIVES</title>
<para>
Here are some XML validators on the web:
<literallayout>
http://www.hcrc.ed.ac.uk/~richard/xml-check.html
http://www.stg.brown.edu/service/xmlvalid/
http://www.scripting.com/frontier5/xml/code/xmlValidator.html
http://www.xml.com/pub/a/tools/ruwf/check.html
(on a page with no less than 15 ads! Shame!)
</literallayout>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<literallayout>
The Expat home page: http://www.libexpat.org/
The W3 XML specification: http://www.w3.org/TR/REC-xml
</literallayout>
</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>
This manual page was written by &dhusername; &dhemail; for
the &debian; system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the <acronym>GNU</acronym> Free Documentation
License, Version 1.1.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
Index: reference.html
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/doc/reference.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- reference.html 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ reference.html 9 Sep 2002 17:43:01 -0000 1.2
@@ -1,171 +1,180 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/REC-html40/loose.dtd">
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-
<!-- Copyright 1999,2000 Clark Cooper <coo...@ne...>
All rights reserved.
This is free software. You may distribute or modify according to
[...2339 lines suppressed...]
+<dl>
+ <dt><code>XML_FEATURE_SIZEOF_XML_CHAR</code></dt>
+ <dd>The number of bytes occupied by one <code>XML_Char</code>
+ character.</dd>
+ <dt><code>XML_FEATURE_SIZEOF_XML_LCHAR</code></dt>
+ <dd>The number of bytes occupied by one <code>XML_LChar</code>
+ character.</dd>
+ <dt><code>XML_FEATURE_CONTEXT_BYTES</code></dt>
+ <dd>The maximum number of characters of context which can be
+ reported by <code><a href= "#XML_GetInputContext"
+ >XML_GetInputContext</a></code>.</dd>
</dl>
+</div>
+<hr />
+<p><a href="http://validator.w3.org/check/referer"><img
+ src="valid-xhtml10.png" alt="Valid XHTML 1.0!"
+ height="31" width="88" class="noborder" /></a></p>
</body>
</html>
Index: style.css
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/doc/style.css,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- style.css 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ style.css 9 Sep 2002 17:43:01 -0000 1.2
@@ -2,25 +2,29 @@
background-color: white
}
+.noborder {
+ border-width: 0px;
+}
+
.eg {
padding-left: 1em;
padding-top: .5em;
+ padding-bottom: .5em;
border: solid thin;
margin: 1em 0;
background-color: tan;
- margin-left: 5%;
+ margin-left: 2em;
margin-right: 10%;
}
.handler {
width: 100%;
border-top-width: thin;
- margin-left: 5%;
margin-bottom: 1em;
}
.handler p {
- margin-left: 3%;
+ margin-left: 2em;
}
.setter {
@@ -38,7 +42,7 @@
}
.fcndef {
- margin-left: 5%;
+ margin-left: 2em;
margin-bottom: 2em;
}
|
|
From: Max H. <fin...@us...> - 2002-09-09 17:43:34
|
Update of /cvsroot/jabberfox/JabberFoX2/Expat
In directory usw-pr-cvs1:/tmp/cvs-serv13747/Expat
Modified Files:
COPYING Changes README
Added Files:
expat_config.h
Removed Files:
config.h
Log Message:
Updated to 1.95.5; fixed some compile warnings on 10.2; updated project file to latest ProjectBuilder
--- NEW FILE ---
/* expat_config.h. Generated by configure. */
/* expat_config.h.in. Generated from configure.in by autoheader. */
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#define BYTEORDER 4321
/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "exp...@ma..."
/* Define to the full name of this package. */
#define PACKAGE_NAME "expat"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "expat 1.95.5"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "expat"
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.95.5"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* whether byteorder is bigendian */
#define WORDS_BIGENDIAN 1
/* Define to specify how much context to retain around the current parse
point. */
#define XML_CONTEXT_BYTES 1024
/* Define to make parameter entity parsing functionality available. */
#define XML_DTD 1
/* Define to make XML Namespaces functionality available. */
#define XML_NS 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */
Index: COPYING
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/COPYING,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- COPYING 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ COPYING 9 Sep 2002 17:42:50 -0000 1.2
@@ -1,5 +1,6 @@
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
and Clark Cooper
+Copyright (c) 2001, 2002 Expat maintainers.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Index: Changes
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/Changes,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Changes 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ Changes 9 Sep 2002 17:43:00 -0000 1.2
@@ -1,46 +1,99 @@
+Release 1.95.5 Fri Sep 6 2002
+ - Added XML_UseForeignDTD() for improved SAX2 support.
+ - Added XML_GetFeatureList().
+ - Defined XML_Bool type and the values XML_TRUE and XML_FALSE.
+ - Use an incomplete struct instead of a void* for the parser
+ (may not retain).
+ - Fixed UTF-8 decoding bug that caused legal UTF-8 to be rejected.
+ - Finally fixed bug where default handler would report DTD
+ events that were already handled by another handler.
+ Initial patch contributed by Darryl Miller.
+ - Removed unnecessary DllMain() function that caused static
+ linking into a DLL to be difficult.
+ - Added VC++ projects for building static libraries.
+ - Reduced line-length for all source code and headers to be
+ no longer than 80 characters, to help with AS/400 support.
+ - Reduced memory copying during parsing (SF patch #600964).
+ - Fixed a variety of bugs: see SF issues 580793, 434664,
+ 483514, 580503, 581069, 584041, 584183, 584832, 585537,
+ 596555, 596678, 598352, 598944, 599715, 600479, 600971.
+
+Release 1.95.4 Fri Jul 12 2002
+ - Added support for VMS, contributed by Craig Berry. See
+ vms/README.vms for more information.
+ - Added Mac OS (classic) support, with a makefile for MPW,
+ contributed by Thomas Wegner and Daryle Walker.
+ - Added Borland C++ Builder 5 / BCC 5.5 support, contributed
+ by Patrick McConnell (SF patch #538032).
+ - Fixed a variety of bugs: see SF issues 441449, 563184,
+ 564342, 566334, 566901, 569461, 570263, 575168, 579196.
+ - Made skippedEntityHandler conform to SAX2 (see source comment)
+ - Re-implemented WFC: Entity Declared from XML 1.0 spec and
+ added a new error "entity declared in parameter entity":
+ see SF bug report 569461 and SF patch 578161
+ - Re-implemented section 5.1 from XML 1.0 spec:
+ see SF bug report 570263 and SF patch 578161
+
+Release 1.95.3 Mon Jun 3 2002
+ - Added a project to the MSVC workspace to create a wchar_t
+ version of the library; the DLLs are named libexpatw.dll.
+ - Changed the name of the Windows DLLs from expat.dll to
+ libexpat.dll; this fixes SF bug #432456.
+ - Added the XML_ParserReset() API function.
+ - Fixed XML_SetReturnNSTriplet() to work for element names.
+ - Made the XML_UNICODE builds usable (thanks, Karl!).
+ - Allow xmlwf to read from standard input.
+ - Install a man page for xmlwf on Unix systems.
+ - Fixed many bugs; see SF bug reports 231864, 461380, 464837,
+ 466885, 469226, 477667, 484419, 487840, 494749, 496505,
+ 547350. Other bugs which we can't test as easily may also
+ have been fixed, especially in the area of build support.
+
Release 1.95.2 Fri Jul 27 2001
- - Nore changes to make MSVC happy with the build; add a single
- workspace to support both the library and xmlwf applicatiion.
- - Added a Windows installer for Windows users; includes
- xmlwf.exe.
- - Added compile-time constants that can be used to determine the
- Expat version
- - Removed a lot of GNU-specific dependencies to aide portability
- among the various Unix flavors.
- - Fix the UTF-8 BOM bug.
- - Cleaned up warning messages for several compilers.
- - Added the -Wall, -Wstrict-prototypes options for GCC.
+ - More changes to make MSVC happy with the build; add a single
+ workspace to support both the library and xmlwf application.
+ - Added a Windows installer for Windows users; includes
+ xmlwf.exe.
+ - Added compile-time constants that can be used to determine the
+ Expat version
+ - Removed a lot of GNU-specific dependencies to aide portability
+ among the various Unix flavors.
+ - Fix the UTF-8 BOM bug.
+ - Cleaned up warning messages for several compilers.
+ - Added the -Wall, -Wstrict-prototypes options for GCC.
+
Release 1.95.1 Sun Oct 22 15:11:36 EDT 2000
- - Changes to get expat to build under Microsoft compiler
- - Removed all aborts and instead return an UNEXPECTED_STATE error.
- - Fixed a bug where a stray '%' in an entity value would cause an
- abort.
- - Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for
- finding this oversight.
- - Changed default patterns in lib/Makefile.in to fit non-GNU makes
- Thanks to ro...@un... for reporting and providing an
- account to test on.
- - The reference had the wrong label for XML_SetStartNamespaceDecl.
- Reported by an anonymous user.
+ - Changes to get expat to build under Microsoft compiler
+ - Removed all aborts and instead return an UNEXPECTED_STATE error.
+ - Fixed a bug where a stray '%' in an entity value would cause an
+ abort.
+ - Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for
+ finding this oversight.
+ - Changed default patterns in lib/Makefile.in to fit non-GNU makes
+ Thanks to ro...@un... for reporting and providing an
+ account to test on.
+ - The reference had the wrong label for XML_SetStartNamespaceDecl.
+ Reported by an anonymous user.
+
Release 1.95.0 Fri Sep 29 2000
- - XML_ParserCreate_MM
- Allows you to set a memory management suite to replace the
- standard malloc,realloc, and free.
- - XML_SetReturnNSTriplet
- If you turn this feature on when namespace processing is in
- effect, then qualified, prefixed element and attribute names
- are returned as "uri|name|prefix" where '|' is whatever
- separator character is used in namespace processing.
- - Merged in features from perl-expat
- o XML_SetElementDeclHandler
- o XML_SetAttlistDeclHandler
- o XML_SetXmlDeclHandler
- o XML_SetEntityDeclHandler
- o StartDoctypeDeclHandler takes 3 additional parameters:
- sysid, pubid, has_internal_subset
- o Many paired handler setters (like XML_SetElementHandler)
- now have corresponding individual handler setters
- o XML_GetInputContext for getting the input context of
- the current parse position.
- - Added reference material
- - Packaged into a distribution that builds a sharable library
+ - XML_ParserCreate_MM
+ Allows you to set a memory management suite to replace the
+ standard malloc,realloc, and free.
+ - XML_SetReturnNSTriplet
+ If you turn this feature on when namespace processing is in
+ effect, then qualified, prefixed element and attribute names
+ are returned as "uri|name|prefix" where '|' is whatever
+ separator character is used in namespace processing.
+ - Merged in features from perl-expat
+ o XML_SetElementDeclHandler
+ o XML_SetAttlistDeclHandler
+ o XML_SetXmlDeclHandler
+ o XML_SetEntityDeclHandler
+ o StartDoctypeDeclHandler takes 3 additional parameters:
+ sysid, pubid, has_internal_subset
+ o Many paired handler setters (like XML_SetElementHandler)
+ now have corresponding individual handler setters
+ o XML_GetInputContext for getting the input context of
+ the current parse position.
+ - Added reference material
+ - Packaged into a distribution that builds a sharable library
Index: README
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/README,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- README 23 Mar 2002 12:42:55 -0000 1.1.1.1
+++ README 9 Sep 2002 17:43:01 -0000 1.2
@@ -1,7 +1,7 @@
- Expat, Release 1.95.2
+ Expat, Release 1.95.5
-This is expat, a C library for parsing XML, written by James Clark.
+This is Expat, a C library for parsing XML, written by James Clark.
Expat is a stream-oriented XML parser. This means that you register
handlers with the parser before starting the parse. These handlers
are called when the parser discovers the associated structures in the
@@ -17,15 +17,26 @@
with this package. This license is the same as the MIT/X Consortium
license.
-Versions of expat that have an odd minor version (the middle number in
+Versions of Expat that have an odd minor version (the middle number in
the release above), are development releases and should be considered
as beta software. Releases with even minor version numbers are
intended to be production grade software.
-To build expat, you first run the configuration shell script in the
-top level distribution directory:
+If you are building Expat from a check-out from the CVS repository,
+you need to run a script that generates the configure script using the
+GNU autoconf and libtool tools. To do this, you need to have
+autoconf 2.52 or newer and libtool 1.4 or newer. Run the script like
+this:
- ./configure
+ ./buildconf.sh
+
+Once this has been done, follow the same instructions as for building
+from a source distribution.
+
+To build Expat from a source distribution, you first run the
+configuration shell script in the top level distribution directory:
+
+ ./configure
There are many options which you may provide to configure (which you
can discover by running configure with the --help option). But the
@@ -36,19 +47,41 @@
into /home/me/mystuff/lib, /home/me/mystuff/include, and
/home/me/mystuff/bin, you can tell configure about that with:
- ./configure --prefix=/home/me/mystuff
+ ./configure --prefix=/home/me/mystuff
After running the configure script, the "make" command will build
things and "make install" will install things into their proper
location. Note that you need to have write permission into the
directories into which things will be installed.
-When building for use with C++, you may need to add additional
-compiler flags to support proper interaction with exceptions. This
-can be done by setting the CFLAGS environment variable. For example,
-when using GCC, you can use:
+If you are interested in building Expat to provide document
+information in UTF-16 rather than the default UTF-8, following these
+instructions:
+
+ 1. For UTF-16 output as unsigned short (and version/error
+ strings as char), run:
+
+ ./configure CPPFLAGS=-DXML_UNICODE
+
+ For UTF-16 output as wchar_t (incl. version/error strings),
+ run:
+
+ ./configure CFLAGS="-g -O2 -fshort-wchar" \
+ CPPFLAGS=-DXML_UNICODE_WCHAR_T
+
+ 2. Edit the MakeFile, changing:
- CFLAGS=-fexceptions ./configure
+ LIBRARY = libexpat.la
+
+ to:
+
+ LIBRARY = libexpatw.la
+
+ (Note the additional "w" in the library name.)
+
+ 3. Run "make buildlib" (which builds the library only).
+
+ 4. Run "make installlib" (which installs the library only).
Note for Solaris users: The "ar" command is usually located in
"/usr/ccs/bin", which is not in the default PATH. You will need to
@@ -57,16 +90,23 @@
properly -- appearantly it does not understand .PHONY directives). If
you're using ksh or bash, use this command to build:
- PATH=/usr/ccs/bin:$PATH make
+ PATH=/usr/ccs/bin:$PATH make
+
+When using Expat with a project using autoconf for configuration, you
+can use the probing macro in conftools/expat.m4 to determine how to
+include Expat. See the comments at the top of that file for more
+information.
A reference manual is available in the file doc/reference.html in this
distribution.
-The homepage for this project is http://expat.sourceforge.net/. There
+The homepage for this project is http://www.libexpat.org/. There
are links there to connect you to the bug reports page. If you need
to report a bug when you don't have access to a browser, you may also
-send a bug report by email to exp...@li....
+send a bug report by email to exp...@ma....
Discussion related to the direction of future expat development takes
-place on exp...@li.... Archives of this list
-may be found at http://www.geocrawler.com/redir-sf.php3?list=expat-discuss.
+place on exp...@ma.... Archives of this list and
+other Expat-related lists may be found at:
+
+ http://mail.libexpat.org/mailman-21/listinfo/
--- config.h DELETED ---
|
|
From: Max H. <fin...@us...> - 2002-09-09 17:43:08
|
Update of /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf
In directory usw-pr-cvs1:/tmp/cvs-serv13747/Expat/xmlwf
Modified Files:
codepage.c codepage.h ct.c filemap.h readfilemap.c
unixfilemap.c xmlfile.c xmlfile.h xmlmime.c xmlmime.h xmlurl.h
xmlwf.c
Added Files:
win32filemap.c xmlwin32url.cxx
Removed Files:
wfcheck.c wfcheck.h wfcheckmessage.c
Log Message:
Updated to 1.95.5; fixed some compile warnings on 10.2; updated project file to latest ProjectBuilder
--- NEW FILE ---
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#define STRICT 1
#define WIN32_LEAN_AND_MEAN 1
#ifdef XML_UNICODE_WCHAR_T
#ifndef XML_UNICODE
#define XML_UNICODE
#endif
#endif
#ifdef XML_UNICODE
#define UNICODE
#define _UNICODE
#endif /* XML_UNICODE */
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include "filemap.h"
static void win32perror(const TCHAR *);
int
filemap(const TCHAR *name,
void (*processor)(const void *, size_t, const TCHAR *, void *arg),
void *arg)
{
HANDLE f;
HANDLE m;
DWORD size;
DWORD sizeHi;
void *p;
f = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
FILE_FLAG_SEQUENTIAL_SCAN, NULL);
if (f == INVALID_HANDLE_VALUE) {
win32perror(name);
return 0;
}
size = GetFileSize(f, &sizeHi);
if (size == (DWORD)-1) {
win32perror(name);
return 0;
}
if (sizeHi) {
_ftprintf(stderr, _T("%s: bigger than 2Gb\n"), name);
return 0;
}
/* CreateFileMapping barfs on zero length files */
if (size == 0) {
static const char c = '\0';
processor(&c, 0, name, arg);
CloseHandle(f);
return 1;
}
m = CreateFileMapping(f, NULL, PAGE_READONLY, 0, 0, NULL);
if (m == NULL) {
win32perror(name);
CloseHandle(f);
return 0;
}
p = MapViewOfFile(m, FILE_MAP_READ, 0, 0, 0);
if (p == NULL) {
win32perror(name);
CloseHandle(m);
CloseHandle(f);
return 0;
}
processor(p, size, name, arg);
UnmapViewOfFile(p);
CloseHandle(m);
CloseHandle(f);
return 1;
}
static void
win32perror(const TCHAR *s)
{
LPVOID buf;
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &buf,
0,
NULL)) {
_ftprintf(stderr, _T("%s: %s"), s, buf);
fflush(stderr);
LocalFree(buf);
}
else
_ftprintf(stderr, _T("%s: unknown Windows error\n"), s);
}
--- NEW FILE ---
#include "expat.h"
#ifdef XML_UNICODE
#define UNICODE
#endif
#include <windows.h>
#include <urlmon.h>
#include <wininet.h>
#include <stdio.h>
#include <tchar.h>
#include "xmlurl.h"
#include "xmlmime.h"
static int
processURL(XML_Parser parser, IMoniker *baseMoniker, const XML_Char *url);
typedef void (*StopHandler)(void *, HRESULT);
class Callback : public IBindStatusCallback {
public:
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID,void **);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
// IBindStatusCallback methods
STDMETHODIMP OnStartBinding(DWORD, IBinding *);
STDMETHODIMP GetPriority(LONG *);
STDMETHODIMP OnLowResource(DWORD);
STDMETHODIMP OnProgress(ULONG, ULONG, ULONG, LPCWSTR);
STDMETHODIMP OnStopBinding(HRESULT, LPCWSTR);
STDMETHODIMP GetBindInfo(DWORD *, BINDINFO *);
STDMETHODIMP OnDataAvailable(DWORD, DWORD, FORMATETC *, STGMEDIUM *);
STDMETHODIMP OnObjectAvailable(REFIID, IUnknown *);
Callback(XML_Parser, IMoniker *, StopHandler, void *);
~Callback();
int externalEntityRef(const XML_Char *context,
const XML_Char *systemId, const XML_Char *publicId);
private:
XML_Parser parser_;
IMoniker *baseMoniker_;
DWORD totalRead_;
ULONG ref_;
IBinding *pBinding_;
StopHandler stopHandler_;
void *stopArg_;
};
STDMETHODIMP_(ULONG)
Callback::AddRef()
{
return ref_++;
}
STDMETHODIMP_(ULONG)
Callback::Release()
{
if (--ref_ == 0) {
delete this;
return 0;
}
return ref_;
}
STDMETHODIMP
Callback::QueryInterface(REFIID riid, void** ppv)
{
if (IsEqualGUID(riid, IID_IUnknown))
*ppv = (IUnknown *)this;
else if (IsEqualGUID(riid, IID_IBindStatusCallback))
*ppv = (IBindStatusCallback *)this;
else
return E_NOINTERFACE;
((LPUNKNOWN)*ppv)->AddRef();
return S_OK;
}
STDMETHODIMP
Callback::OnStartBinding(DWORD, IBinding* pBinding)
{
pBinding_ = pBinding;
pBinding->AddRef();
return S_OK;
}
STDMETHODIMP
Callback::GetPriority(LONG *)
{
return E_NOTIMPL;
}
STDMETHODIMP
Callback::OnLowResource(DWORD)
{
return E_NOTIMPL;
}
STDMETHODIMP
Callback::OnProgress(ULONG, ULONG, ULONG, LPCWSTR)
{
return S_OK;
}
STDMETHODIMP
Callback::OnStopBinding(HRESULT hr, LPCWSTR szError)
{
if (pBinding_) {
pBinding_->Release();
pBinding_ = 0;
}
if (baseMoniker_) {
baseMoniker_->Release();
baseMoniker_ = 0;
}
stopHandler_(stopArg_, hr);
return S_OK;
}
STDMETHODIMP
Callback::GetBindInfo(DWORD* pgrfBINDF, BINDINFO* pbindinfo)
{
*pgrfBINDF = BINDF_ASYNCHRONOUS;
return S_OK;
}
static void
reportError(XML_Parser parser)
{
int code = XML_GetErrorCode(parser);
const XML_Char *message = XML_ErrorString(code);
if (message)
_ftprintf(stderr, _T("%s:%d:%ld: %s\n"),
XML_GetBase(parser),
XML_GetErrorLineNumber(parser),
XML_GetErrorColumnNumber(parser),
message);
else
_ftprintf(stderr, _T("%s: (unknown message %d)\n"),
XML_GetBase(parser), code);
}
STDMETHODIMP
Callback::OnDataAvailable(DWORD grfBSCF,
DWORD dwSize,
FORMATETC *pfmtetc,
STGMEDIUM* pstgmed)
{
if (grfBSCF & BSCF_FIRSTDATANOTIFICATION) {
IWinInetHttpInfo *hp;
HRESULT hr = pBinding_->QueryInterface(IID_IWinInetHttpInfo,
(void **)&hp);
if (SUCCEEDED(hr)) {
char contentType[1024];
DWORD bufSize = sizeof(contentType);
DWORD flags = 0;
contentType[0] = 0;
hr = hp->QueryInfo(HTTP_QUERY_CONTENT_TYPE, contentType,
&bufSize, 0, NULL);
if (SUCCEEDED(hr)) {
char charset[CHARSET_MAX];
getXMLCharset(contentType, charset);
if (charset[0]) {
#ifdef XML_UNICODE
XML_Char wcharset[CHARSET_MAX];
XML_Char *p1 = wcharset;
const char *p2 = charset;
while ((*p1++ = (unsigned char)*p2++) != 0)
;
XML_SetEncoding(parser_, wcharset);
#else
XML_SetEncoding(parser_, charset);
#endif
}
}
hp->Release();
}
}
if (!parser_)
return E_ABORT;
if (pstgmed->tymed == TYMED_ISTREAM) {
while (totalRead_ < dwSize) {
#define READ_MAX (64*1024)
DWORD nToRead = dwSize - totalRead_;
if (nToRead > READ_MAX)
nToRead = READ_MAX;
void *buf = XML_GetBuffer(parser_, nToRead);
if (!buf) {
_ftprintf(stderr, _T("out of memory\n"));
return E_ABORT;
}
DWORD nRead;
HRESULT hr = pstgmed->pstm->Read(buf, nToRead, &nRead);
if (SUCCEEDED(hr)) {
totalRead_ += nRead;
if (!XML_ParseBuffer(parser_,
nRead,
(grfBSCF & BSCF_LASTDATANOTIFICATION) != 0
&& totalRead_ == dwSize)) {
reportError(parser_);
return E_ABORT;
}
}
}
}
return S_OK;
}
STDMETHODIMP
Callback::OnObjectAvailable(REFIID, IUnknown *)
{
return S_OK;
}
int
Callback::externalEntityRef(const XML_Char *context,
const XML_Char *systemId,
const XML_Char *publicId)
{
XML_Parser entParser = XML_ExternalEntityParserCreate(parser_, context, 0);
XML_SetBase(entParser, systemId);
int ret = processURL(entParser, baseMoniker_, systemId);
XML_ParserFree(entParser);
return ret;
}
Callback::Callback(XML_Parser parser, IMoniker *baseMoniker,
StopHandler stopHandler, void *stopArg)
: parser_(parser),
baseMoniker_(baseMoniker),
ref_(0),
pBinding_(0),
totalRead_(0),
stopHandler_(stopHandler),
stopArg_(stopArg)
{
if (baseMoniker_)
baseMoniker_->AddRef();
}
Callback::~Callback()
{
if (pBinding_)
pBinding_->Release();
if (baseMoniker_)
baseMoniker_->Release();
}
static int
externalEntityRef(void *arg,
const XML_Char *context,
const XML_Char *base,
const XML_Char *systemId,
const XML_Char *publicId)
{
return ((Callback *)arg)->externalEntityRef(context, systemId, publicId);
}
static HRESULT
openStream(XML_Parser parser,
IMoniker *baseMoniker,
const XML_Char *uri,
StopHandler stopHandler, void *stopArg)
{
if (!XML_SetBase(parser, uri))
return E_OUTOFMEMORY;
HRESULT hr;
IMoniker *m;
#ifdef XML_UNICODE
hr = CreateURLMoniker(0, uri, &m);
#else
LPWSTR uriw = new wchar_t[strlen(uri) + 1];
for (int i = 0;; i++) {
uriw[i] = uri[i];
if (uriw[i] == 0)
break;
}
hr = CreateURLMoniker(baseMoniker, uriw, &m);
delete [] uriw;
#endif
if (FAILED(hr))
return hr;
IBindStatusCallback *cb = new Callback(parser, m, stopHandler, stopArg);
XML_SetExternalEntityRefHandler(parser, externalEntityRef);
XML_SetExternalEntityRefHandlerArg(parser, cb);
cb->AddRef();
IBindCtx *b;
if (FAILED(hr = CreateAsyncBindCtx(0, cb, 0, &b))) {
cb->Release();
m->Release();
return hr;
}
cb->Release();
IStream *pStream;
hr = m->BindToStorage(b, 0, IID_IStream, (void **)&pStream);
if (SUCCEEDED(hr)) {
if (pStream)
pStream->Release();
}
if (hr == MK_S_ASYNCHRONOUS)
hr = S_OK;
m->Release();
b->Release();
return hr;
}
struct QuitInfo {
const XML_Char *url;
HRESULT hr;
int stop;
};
static void
winPerror(const XML_Char *url, HRESULT hr)
{
LPVOID buf;
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_HMODULE,
GetModuleHandleA("urlmon.dll"),
hr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &buf,
0,
NULL)
|| FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_SYSTEM,
0,
hr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &buf,
0,
NULL)) {
/* The system error messages seem to end with a newline. */
_ftprintf(stderr, _T("%s: %s"), url, buf);
fflush(stderr);
LocalFree(buf);
}
else
_ftprintf(stderr, _T("%s: error %x\n"), url, hr);
}
static void
threadQuit(void *p, HRESULT hr)
{
QuitInfo *qi = (QuitInfo *)p;
qi->hr = hr;
qi->stop = 1;
}
extern "C"
int
XML_URLInit(void)
{
return SUCCEEDED(CoInitialize(0));
}
extern "C"
void
XML_URLUninit(void)
{
CoUninitialize();
}
static int
processURL(XML_Parser parser, IMoniker *baseMoniker,
const XML_Char *url)
{
QuitInfo qi;
qi.stop = 0;
qi.url = url;
XML_SetBase(parser, url);
HRESULT hr = openStream(parser, baseMoniker, url, threadQuit, &qi);
if (FAILED(hr)) {
winPerror(url, hr);
return 0;
}
else if (FAILED(qi.hr)) {
winPerror(url, qi.hr);
return 0;
}
MSG msg;
while (!qi.stop && GetMessage (&msg, NULL, 0, 0)) {
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return 1;
}
extern "C"
int
XML_ProcessURL(XML_Parser parser,
const XML_Char *url,
unsigned flags)
{
return processURL(parser, 0, url);
}
Index: codepage.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/codepage.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- codepage.c 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ codepage.c 9 Sep 2002 17:43:02 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#include "codepage.h"
@@ -11,7 +10,8 @@
#include <windows.h>
-int codepageMap(int cp, int *map)
+int
+codepageMap(int cp, int *map)
{
int i;
CPINFO info;
@@ -26,38 +26,41 @@
break;
lim = info.LeadByte[i + 1];
for (j = info.LeadByte[i]; j < lim; j++)
- map[j] = -2;
+ map[j] = -2;
}
}
for (i = 0; i < 256; i++) {
if (map[i] == -1) {
- char c = i;
+ char c = (char)i;
unsigned short n;
if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS,
- &c, 1, &n, 1) == 1)
+ &c, 1, &n, 1) == 1)
map[i] = n;
}
}
return 1;
}
-int codepageConvert(int cp, const char *p)
+int
+codepageConvert(int cp, const char *p)
{
unsigned short c;
if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS,
- p, 2, &c, 1) == 1)
+ p, 2, &c, 1) == 1)
return c;
return -1;
}
#else /* not WIN32 */
-int codepageMap(int cp, int *map)
+int
+codepageMap(int cp, int *map)
{
return 0;
}
-int codepageConvert(int cp, const char *p)
+int
+codepageConvert(int cp, const char *p)
{
return -1;
}
Index: codepage.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/codepage.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- codepage.h 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ codepage.h 9 Sep 2002 17:43:03 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
int codepageMap(int cp, int *map);
Index: ct.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/ct.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ct.c 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ ct.c 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,7 +1,7 @@
#define CHARSET_MAX 41
-static
-const char *getTok(const char **pp)
+static const char *
+getTok(const char **pp)
{
enum { inAtom, inString, init, inComment };
int state = init;
@@ -15,50 +15,50 @@
case '\t':
case '\n':
if (state == inAtom)
- return tokStart;
+ return tokStart;
break;
case '(':
if (state == inAtom)
- return tokStart;
+ return tokStart;
if (state != inString)
- state++;
+ state++;
break;
case ')':
if (state > init)
- --state;
+ --state;
else if (state != inString)
- return 0;
+ return 0;
break;
case ';':
case '/':
case '=':
if (state == inAtom)
- return tokStart;
+ return tokStart;
if (state == init)
- return (*pp)++;
+ return (*pp)++;
break;
case '\\':
++*pp;
if (**pp == '\0')
- return 0;
+ return 0;
break;
case '"':
switch (state) {
case inString:
- ++*pp;
- return tokStart;
+ ++*pp;
+ return tokStart;
case inAtom:
- return tokStart;
+ return tokStart;
case init:
- tokStart = *pp;
- state = inString;
- break;
+ tokStart = *pp;
+ state = inString;
+ break;
}
break;
default:
if (state == init) {
- tokStart = *pp;
- state = inAtom;
+ tokStart = *pp;
+ state = inAtom;
}
break;
}
@@ -69,8 +69,8 @@
/* key must be lowercase ASCII */
-static
-int matchkey(const char *start, const char *end, const char *key)
+static int
+matchkey(const char *start, const char *end, const char *key)
{
if (!start)
return 0;
@@ -80,7 +80,8 @@
return *key == '\0';
}
-void getXMLCharset(const char *buf, char *charset)
+void
+getXMLCharset(const char *buf, char *charset)
{
const char *next, *p;
@@ -102,33 +103,33 @@
if (*p == ';') {
p = getTok(&next);
if (matchkey(p, next, "charset")) {
- p = getTok(&next);
- if (p && *p == '=') {
- p = getTok(&next);
- if (p) {
- char *s = charset;
- if (*p == '"') {
- while (++p != next - 1) {
- if (*p == '\\')
- ++p;
- if (s == charset + CHARSET_MAX - 1) {
- charset[0] = '\0';
- break;
- }
- *s++ = *p;
- }
- *s++ = '\0';
- }
- else {
- if (next - p > CHARSET_MAX - 1)
- break;
- while (p != next)
- *s++ = *p++;
- *s = 0;
- break;
- }
- }
- }
+ p = getTok(&next);
+ if (p && *p == '=') {
+ p = getTok(&next);
+ if (p) {
+ char *s = charset;
+ if (*p == '"') {
+ while (++p != next - 1) {
+ if (*p == '\\')
+ ++p;
+ if (s == charset + CHARSET_MAX - 1) {
+ charset[0] = '\0';
+ break;
+ }
+ *s++ = *p;
+ }
+ *s++ = '\0';
+ }
+ else {
+ if (next - p > CHARSET_MAX - 1)
+ break;
+ while (p != next)
+ *s++ = *p++;
+ *s = 0;
+ break;
+ }
+ }
+ }
}
}
else
@@ -136,7 +137,8 @@
}
}
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
char buf[CHARSET_MAX];
getXMLCharset(argv[1], buf);
Index: filemap.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/filemap.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- filemap.h 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ filemap.h 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,17 +1,17 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
-
#include <stddef.h>
#ifdef XML_UNICODE
int filemap(const wchar_t *name,
- void (*processor)(const void *, size_t, const wchar_t *, void *arg),
- void *arg);
+ void (*processor)(const void *, size_t,
+ const wchar_t *, void *arg),
+ void *arg);
#else
int filemap(const char *name,
- void (*processor)(const void *, size_t, const char *, void *arg),
- void *arg);
+ void (*processor)(const void *, size_t,
+ const char *, void *arg),
+ void *arg);
#endif
Index: readfilemap.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/readfilemap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- readfilemap.c 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ readfilemap.c 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#include <sys/types.h>
@@ -27,9 +26,12 @@
#endif
#endif
-int filemap(const char *name,
- void (*processor)(const void *, size_t, const char *, void *arg),
- void *arg)
+#include "filemap.h"
+
+int
+filemap(const char *name,
+ void (*processor)(const void *, size_t, const char *, void *arg),
+ void *arg)
{
size_t nbytes;
int fd;
Index: unixfilemap.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/unixfilemap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- unixfilemap.c 23 Mar 2002 12:42:58 -0000 1.1.1.1
+++ unixfilemap.c 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#include <sys/types.h>
@@ -18,9 +17,10 @@
#include "filemap.h"
-int filemap(const char *name,
- void (*processor)(const void *, size_t, const char *, void *arg),
- void *arg)
+int
+filemap(const char *name,
+ void (*processor)(const void *, size_t, const char *, void *arg),
+ void *arg)
{
int fd;
size_t nbytes;
@@ -42,10 +42,10 @@
fprintf(stderr, "%s: not a regular file\n", name);
return 0;
}
-
+
nbytes = sb.st_size;
p = (void *)mmap((caddr_t)0, (size_t)nbytes, PROT_READ,
- MAP_FILE|MAP_PRIVATE, fd, (off_t)0);
+ MAP_FILE|MAP_PRIVATE, fd, (off_t)0);
if (p == (void *)-1) {
perror(name);
close(fd);
Index: xmlfile.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/xmlfile.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlfile.c 23 Mar 2002 12:42:59 -0000 1.1.1.1
+++ xmlfile.c 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#include <stdio.h>
@@ -8,6 +7,11 @@
#include <stddef.h>
#include <string.h>
#include <fcntl.h>
+#ifdef COMPILED_FROM_DSP
+#include "winconfig.h"
+#else
+#include "expat_config.h"
+#endif
#include "expat.h"
#include "xmlfile.h"
#include "xmltchar.h"
@@ -17,7 +21,7 @@
#include <io.h>
#endif
-#ifdef _POSIX_SOURCE
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -36,36 +40,33 @@
#endif
-
typedef struct {
XML_Parser parser;
int *retPtr;
} PROCESS_ARGS;
-static
-void reportError(XML_Parser parser, const XML_Char *filename)
+static void
+reportError(XML_Parser parser, const XML_Char *filename)
{
int code = XML_GetErrorCode(parser);
const XML_Char *message = XML_ErrorString(code);
if (message)
ftprintf(stdout, T("%s:%d:%d: %s\n"),
- filename,
- XML_GetErrorLineNumber(parser),
- XML_GetErrorColumnNumber(parser),
- message);
+ filename,
+ XML_GetErrorLineNumber(parser),
+ XML_GetErrorColumnNumber(parser),
+ message);
else
ftprintf(stderr, T("%s: (unknown message %d)\n"), filename, code);
}
-static
-void processFile(const void *data,
- size_t size,
- const XML_Char *filename,
- void *args)
+static void
+processFile(const void *data, size_t size,
+ const XML_Char *filename, void *args)
{
XML_Parser parser = ((PROCESS_ARGS *)args)->parser;
int *retPtr = ((PROCESS_ARGS *)args)->retPtr;
- if (!XML_Parse(parser, data, size, 1)) {
+ if (XML_Parse(parser, data, size, 1) == XML_STATUS_ERROR) {
reportError(parser, filename);
*retPtr = 0;
}
@@ -75,16 +76,17 @@
#ifdef WIN32
-static
-int isAsciiLetter(XML_Char c)
+static int
+isAsciiLetter(XML_Char c)
{
return (T('a') <= c && c <= T('z')) || (T('A') <= c && c <= T('Z'));
}
#endif /* WIN32 */
-static
-const XML_Char *resolveSystemId(const XML_Char *base, const XML_Char *systemId, XML_Char **toFree)
+static const XML_Char *
+resolveSystemId(const XML_Char *base, const XML_Char *systemId,
+ XML_Char **toFree)
{
XML_Char *s;
*toFree = 0;
@@ -96,7 +98,8 @@
#endif
)
return systemId;
- *toFree = (XML_Char *)malloc((tcslen(base) + tcslen(systemId) + 2)*sizeof(XML_Char));
+ *toFree = (XML_Char *)malloc((tcslen(base) + tcslen(systemId) + 2)
+ * sizeof(XML_Char));
if (!*toFree)
return systemId;
tcscpy(*toFree, base);
@@ -111,12 +114,12 @@
return *toFree;
}
-static
-int externalEntityRefFilemap(XML_Parser parser,
- const XML_Char *context,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId)
+static int
+externalEntityRefFilemap(XML_Parser parser,
+ const XML_Char *context,
+ const XML_Char *base,
+ const XML_Char *systemId,
+ const XML_Char *publicId)
{
int result;
XML_Char *s;
@@ -134,47 +137,57 @@
return result;
}
-static
-int processStream(const XML_Char *filename, XML_Parser parser)
+static int
+processStream(const XML_Char *filename, XML_Parser parser)
{
- int fd = topen(filename, O_BINARY|O_RDONLY);
- if (fd < 0) {
- tperror(filename);
- return 0;
+ /* passing NULL for filename means read intput from stdin */
+ int fd = 0; /* 0 is the fileno for stdin */
+
+ if (filename != NULL) {
+ fd = topen(filename, O_BINARY|O_RDONLY);
+ if (fd < 0) {
+ tperror(filename);
+ return 0;
+ }
}
for (;;) {
int nread;
char *buf = XML_GetBuffer(parser, READ_SIZE);
if (!buf) {
- close(fd);
- ftprintf(stderr, T("%s: out of memory\n"), filename);
+ if (filename != NULL)
+ close(fd);
+ ftprintf(stderr, T("%s: out of memory\n"),
+ filename != NULL ? filename : "xmlwf");
return 0;
}
nread = read(fd, buf, READ_SIZE);
if (nread < 0) {
- tperror(filename);
- close(fd);
+ tperror(filename != NULL ? filename : "STDIN");
+ if (filename != NULL)
+ close(fd);
return 0;
}
- if (!XML_ParseBuffer(parser, nread, nread == 0)) {
- reportError(parser, filename);
- close(fd);
+ if (XML_ParseBuffer(parser, nread, nread == 0) == XML_STATUS_ERROR) {
+ reportError(parser, filename != NULL ? filename : "STDIN");
+ if (filename != NULL)
+ close(fd);
return 0;
}
if (nread == 0) {
- close(fd);
+ if (filename != NULL)
+ close(fd);
break;;
}
}
return 1;
}
-static
-int externalEntityRefStream(XML_Parser parser,
- const XML_Char *context,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId)
+static int
+externalEntityRefStream(XML_Parser parser,
+ const XML_Char *context,
+ const XML_Char *base,
+ const XML_Char *systemId,
+ const XML_Char *publicId)
{
XML_Char *s;
const XML_Char *filename;
@@ -188,9 +201,10 @@
return ret;
}
-int XML_ProcessFile(XML_Parser parser,
- const XML_Char *filename,
- unsigned flags)
+int
+XML_ProcessFile(XML_Parser parser,
+ const XML_Char *filename,
+ unsigned flags)
{
int result;
@@ -201,9 +215,9 @@
if (flags & XML_EXTERNAL_ENTITIES)
XML_SetExternalEntityRefHandler(parser,
- (flags & XML_MAP_FILE)
- ? externalEntityRefFilemap
- : externalEntityRefStream);
+ (flags & XML_MAP_FILE)
+ ? externalEntityRefFilemap
+ : externalEntityRefStream);
if (flags & XML_MAP_FILE) {
PROCESS_ARGS args;
args.retPtr = &result;
Index: xmlfile.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/xmlfile.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlfile.h 23 Mar 2002 12:42:59 -0000 1.1.1.1
+++ xmlfile.h 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,11 +1,10 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#define XML_MAP_FILE 01
#define XML_EXTERNAL_ENTITIES 02
extern int XML_ProcessFile(XML_Parser parser,
- const XML_Char *filename,
- unsigned flags);
+ const XML_Char *filename,
+ unsigned flags);
Index: xmlmime.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/xmlmime.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlmime.c 23 Mar 2002 12:42:59 -0000 1.1.1.1
+++ xmlmime.c 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,8 +1,8 @@
#include <string.h>
#include "xmlmime.h"
-static
-const char *getTok(const char **pp)
+static const char *
+getTok(const char **pp)
{
/* inComment means one level of nesting; inComment+1 means two levels etc */
enum { inAtom, inString, init, inComment };
@@ -12,57 +12,57 @@
switch (**pp) {
case '\0':
if (state == inAtom)
- return tokStart;
+ return tokStart;
return 0;
case ' ':
case '\r':
case '\t':
case '\n':
if (state == inAtom)
- return tokStart;
+ return tokStart;
break;
case '(':
if (state == inAtom)
- return tokStart;
+ return tokStart;
if (state != inString)
- state++;
+ state++;
break;
case ')':
if (state > init)
- --state;
+ --state;
else if (state != inString)
- return 0;
+ return 0;
break;
case ';':
case '/':
case '=':
if (state == inAtom)
- return tokStart;
+ return tokStart;
if (state == init)
- return (*pp)++;
+ return (*pp)++;
break;
case '\\':
++*pp;
if (**pp == '\0')
- return 0;
+ return 0;
break;
case '"':
switch (state) {
case inString:
- ++*pp;
- return tokStart;
+ ++*pp;
+ return tokStart;
case inAtom:
- return tokStart;
+ return tokStart;
case init:
- tokStart = *pp;
- state = inString;
- break;
+ tokStart = *pp;
+ state = inString;
+ break;
}
break;
default:
if (state == init) {
- tokStart = *pp;
- state = inAtom;
+ tokStart = *pp;
+ state = inAtom;
}
break;
}
@@ -73,8 +73,8 @@
/* key must be lowercase ASCII */
-static
-int matchkey(const char *start, const char *end, const char *key)
+static int
+matchkey(const char *start, const char *end, const char *key)
{
if (!start)
return 0;
@@ -84,7 +84,8 @@
return *key == '\0';
}
-void getXMLCharset(const char *buf, char *charset)
+void
+getXMLCharset(const char *buf, char *charset)
{
const char *next, *p;
@@ -108,34 +109,34 @@
if (*p == ';') {
p = getTok(&next);
if (matchkey(p, next, "charset")) {
- p = getTok(&next);
- if (p && *p == '=') {
- p = getTok(&next);
- if (p) {
- char *s = charset;
- if (*p == '"') {
- while (++p != next - 1) {
- if (*p == '\\')
- ++p;
- if (s == charset + CHARSET_MAX - 1) {
- charset[0] = '\0';
- break;
- }
- *s++ = *p;
- }
- *s++ = '\0';
- }
- else {
- if (next - p > CHARSET_MAX - 1)
- break;
- while (p != next)
- *s++ = *p++;
- *s = 0;
- break;
- }
- }
- }
- break;
+ p = getTok(&next);
+ if (p && *p == '=') {
+ p = getTok(&next);
+ if (p) {
+ char *s = charset;
+ if (*p == '"') {
+ while (++p != next - 1) {
+ if (*p == '\\')
+ ++p;
+ if (s == charset + CHARSET_MAX - 1) {
+ charset[0] = '\0';
+ break;
+ }
+ *s++ = *p;
+ }
+ *s++ = '\0';
+ }
+ else {
+ if (next - p > CHARSET_MAX - 1)
+ break;
+ while (p != next)
+ *s++ = *p++;
+ *s = 0;
+ break;
+ }
+ }
+ }
+ break;
}
}
else
@@ -147,7 +148,8 @@
#include <stdio.h>
-int main(int argc, char **argv)
+int
+main(int argc, char *argv[])
{
char buf[CHARSET_MAX];
if (argc <= 1)
Index: xmlmime.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/xmlmime.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlmime.h 23 Mar 2002 12:42:59 -0000 1.1.1.1
+++ xmlmime.h 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,4 +1,3 @@
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -8,9 +7,10 @@
#define CHARSET_MAX 41
/* Figure out the charset to use from the ContentType.
-buf contains the body of the header field (the part after "Content-Type:").
-charset gets the charset to use. It must be at least CHARSET_MAX chars long.
-charset will be empty if the default charset should be used. */
+ buf contains the body of the header field (the part after "Content-Type:").
+ charset gets the charset to use. It must be at least CHARSET_MAX chars
+ long. charset will be empty if the default charset should be used.
+*/
void getXMLCharset(const char *buf, char *charset);
Index: xmlurl.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/xmlurl.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlurl.h 23 Mar 2002 12:42:59 -0000 1.1.1.1
+++ xmlurl.h 9 Sep 2002 17:43:04 -0000 1.2
@@ -5,8 +5,8 @@
int XML_URLInit();
void XML_URLUninit();
int XML_ProcessURL(XML_Parser parser,
- const XML_Char *url,
- unsigned flags);
+ const XML_Char *url,
+ unsigned flags);
#ifdef __cplusplus
}
Index: xmlwf.c
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Expat/xmlwf/xmlwf.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xmlwf.c 23 Mar 2002 12:42:59 -0000 1.1.1.1
+++ xmlwf.c 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+ See the file COPYING for copying permission.
*/
#include <stdio.h>
@@ -21,7 +20,8 @@
#define NSSEP T('\001')
-static void characterData(void *userData, const XML_Char *s, int len)
+static void
+characterData(void *userData, const XML_Char *s, int len)
{
FILE *fp = userData;
for (; len > 0; --len, ++s) {
@@ -56,7 +56,8 @@
}
}
-static void attributeValue(FILE *fp, const XML_Char *s)
+static void
+attributeValue(FILE *fp, const XML_Char *s)
{
puttc(T('='), fp);
puttc(T('"'), fp);
@@ -106,12 +107,14 @@
/* Lexicographically comparing UTF-8 encoded attribute values,
is equivalent to lexicographically comparing based on the character number. */
-static int attcmp(const void *att1, const void *att2)
+static int
+attcmp(const void *att1, const void *att2)
{
return tcscmp(*(const XML_Char **)att1, *(const XML_Char **)att2);
}
-static void startElement(void *userData, const XML_Char *name, const XML_Char **atts)
+static void
+startElement(void *userData, const XML_Char *name, const XML_Char **atts)
{
int nAtts;
const XML_Char **p;
@@ -134,7 +137,8 @@
puttc(T('>'), fp);
}
-static void endElement(void *userData, const XML_Char *name)
+static void
+endElement(void *userData, const XML_Char *name)
{
FILE *fp = userData;
puttc(T('<'), fp);
@@ -143,7 +147,8 @@
puttc(T('>'), fp);
}
-static int nsattcmp(const void *p1, const void *p2)
+static int
+nsattcmp(const void *p1, const void *p2)
{
const XML_Char *att1 = *(const XML_Char **)p1;
const XML_Char *att2 = *(const XML_Char **)p2;
@@ -154,7 +159,8 @@
return tcscmp(att1, att2);
}
-static void startElementNS(void *userData, const XML_Char *name, const XML_Char **atts)
+static void
+startElementNS(void *userData, const XML_Char *name, const XML_Char **atts)
{
int nAtts;
int nsi;
@@ -202,7 +208,8 @@
puttc(T('>'), fp);
}
-static void endElementNS(void *userData, const XML_Char *name)
+static void
+endElementNS(void *userData, const XML_Char *name)
{
FILE *fp = userData;
const XML_Char *sep;
@@ -220,7 +227,9 @@
#ifndef W3C14N
-static void processingInstruction(void *userData, const XML_Char *target, const XML_Char *data)
+static void
+processingInstruction(void *userData, const XML_Char *target,
+ const XML_Char *data)
{
FILE *fp = userData;
puttc(T('<'), fp);
@@ -234,78 +243,92 @@
#endif /* not W3C14N */
-static void defaultCharacterData(XML_Parser parser, const XML_Char *s, int len)
+static void
+defaultCharacterData(void *userData, const XML_Char *s, int len)
{
- XML_DefaultCurrent(parser);
+ XML_DefaultCurrent((XML_Parser) userData);
}
-static void defaultStartElement(XML_Parser parser, const XML_Char *name, const XML_Char **atts)
+static void
+defaultStartElement(void *userData, const XML_Char *name,
+ const XML_Char **atts)
{
- XML_DefaultCurrent(parser);
+ XML_DefaultCurrent((XML_Parser) userData);
}
-static void defaultEndElement(XML_Parser parser, const XML_Char *name)
+static void
+defaultEndElement(void *userData, const XML_Char *name)
{
- XML_DefaultCurrent(parser);
+ XML_DefaultCurrent((XML_Parser) userData);
}
-static void defaultProcessingInstruction(XML_Parser parser, const XML_Char *target, const XML_Char *data)
+static void
+defaultProcessingInstruction(void *userData, const XML_Char *target,
+ const XML_Char *data)
{
- XML_DefaultCurrent(parser);
+ XML_DefaultCurrent((XML_Parser) userData);
}
-static void nopCharacterData(XML_Parser parser, const XML_Char *s, int len)
+static void
+nopCharacterData(void *userData, const XML_Char *s, int len)
{
}
-static void nopStartElement(XML_Parser parser, const XML_Char *name, const XML_Char **atts)
+static void
+nopStartElement(void *userData, const XML_Char *name, const XML_Char **atts)
{
}
-static void nopEndElement(XML_Parser parser, const XML_Char *name)
+static void
+nopEndElement(void *userData, const XML_Char *name)
{
}
-static void nopProcessingInstruction(XML_Parser parser, const XML_Char *target, const XML_Char *data)
+static void
+nopProcessingInstruction(void *userData, const XML_Char *target,
+ const XML_Char *data)
{
}
-static void markup(XML_Parser parser, const XML_Char *s, int len)
+static void
+markup(void *userData, const XML_Char *s, int len)
{
- FILE *fp = XML_GetUserData(parser);
+ FILE *fp = XML_GetUserData((XML_Parser) userData);
for (; len > 0; --len, ++s)
puttc(*s, fp);
}
-static
-void metaLocation(XML_Parser parser)
+static void
+metaLocation(XML_Parser parser)
{
const XML_Char *uri = XML_GetBase(parser);
if (uri)
ftprintf(XML_GetUserData(parser), T(" uri=\"%s\""), uri);
ftprintf(XML_GetUserData(parser),
T(" byte=\"%ld\" nbytes=\"%d\" line=\"%d\" col=\"%d\""),
- XML_GetCurrentByteIndex(parser),
- XML_GetCurrentByteCount(parser),
- XML_GetCurrentLineNumber(parser),
- XML_GetCurrentColumnNumber(parser));
+ XML_GetCurrentByteIndex(parser),
+ XML_GetCurrentByteCount(parser),
+ XML_GetCurrentLineNumber(parser),
+ XML_GetCurrentColumnNumber(parser));
}
-static
-void metaStartDocument(XML_Parser parser)
+static void
+metaStartDocument(void *userData)
{
- fputts(T("<document>\n"), XML_GetUserData(parser));
+ fputts(T("<document>\n"), XML_GetUserData((XML_Parser) userData));
}
-static
-void metaEndDocument(XML_Parser parser)
+static void
+metaEndDocument(void *userData)
{
- fputts(T("</document>\n"), XML_GetUserData(parser));
+ fputts(T("</document>\n"), XML_GetUserData((XML_Parser) userData));
}
-static
-void metaStartElement(XML_Parser parser, const XML_Char *name, const XML_Char **atts)
+static void
+metaStartElement(void *userData, const XML_Char *name,
+ const XML_Char **atts)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
const XML_Char **specifiedAttsEnd
= atts + XML_GetSpecifiedAttributeCount(parser);
@@ -324,11 +347,11 @@
ftprintf(fp, T("<attribute name=\"%s\" value=\""), atts[0]);
characterData(fp, atts[1], tcslen(atts[1]));
if (atts >= specifiedAttsEnd)
- fputts(T("\" defaulted=\"yes\"/>\n"), fp);
+ fputts(T("\" defaulted=\"yes\"/>\n"), fp);
else if (atts == idAttPtr)
- fputts(T("\" id=\"yes\"/>\n"), fp);
+ fputts(T("\" id=\"yes\"/>\n"), fp);
else
- fputts(T("\"/>\n"), fp);
+ fputts(T("\"/>\n"), fp);
} while (*(atts += 2));
fputts(T("</starttag>\n"), fp);
}
@@ -336,18 +359,21 @@
fputts(T("/>\n"), fp);
}
-static
-void metaEndElement(XML_Parser parser, const XML_Char *name)
+static void
+metaEndElement(void *userData, const XML_Char *name)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
ftprintf(fp, T("<endtag name=\"%s\""), name);
metaLocation(parser);
fputts(T("/>\n"), fp);
}
-static
-void metaProcessingInstruction(XML_Parser parser, const XML_Char *target, const XML_Char *data)
+static void
+metaProcessingInstruction(void *userData, const XML_Char *target,
+ const XML_Char *data)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
ftprintf(fp, T("<pi target=\"%s\" data=\""), target);
characterData(fp, data, tcslen(data));
@@ -356,9 +382,10 @@
fputts(T("/>\n"), fp);
}
-static
-void metaComment(XML_Parser parser, const XML_Char *data)
+static void
+metaComment(void *userData, const XML_Char *data)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
fputts(T("<comment data=\""), fp);
characterData(fp, data, tcslen(data));
@@ -367,27 +394,30 @@
fputts(T("/>\n"), fp);
}
-static
-void metaStartCdataSection(XML_Parser parser)
+static void
+metaStartCdataSection(void *userData)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
fputts(T("<startcdata"), fp);
metaLocation(parser);
fputts(T("/>\n"), fp);
}
-static
-void metaEndCdataSection(XML_Parser parser)
+static void
+metaEndCdataSection(void *userData)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
fputts(T("<endcdata"), fp);
metaLocation(parser);
fputts(T("/>\n"), fp);
}
-static
-void metaCharacterData(XML_Parser parser, const XML_Char *s, int len)
+static void
+metaCharacterData(void *userData, const XML_Char *s, int len)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
fputts(T("<chars str=\""), fp);
characterData(fp, s, len);
@@ -396,35 +426,38 @@
fputts(T("/>\n"), fp);
}
-static
-void metaStartDoctypeDecl(XML_Parser parser,
- const XML_Char *doctypeName,
- const XML_Char *sysid,
- const XML_Char *pubid,
- int has_internal_subset)
+static void
+metaStartDoctypeDecl(void *userData,
+ const XML_Char *doctypeName,
+ const XML_Char *sysid,
+ const XML_Char *pubid,
+ int has_internal_subset)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
ftprintf(fp, T("<startdoctype name=\"%s\""), doctypeName);
metaLocation(parser);
fputts(T("/>\n"), fp);
}
-static
-void metaEndDoctypeDecl(XML_Parser parser)
+static void
+metaEndDoctypeDecl(void *userData)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
fputts(T("<enddoctype"), fp);
metaLocation(parser);
fputts(T("/>\n"), fp);
}
-static
-void metaNotationDecl(XML_Parser parser,
- const XML_Char *notationName,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId)
+static void
+metaNotationDecl(void *userData,
+ const XML_Char *notationName,
+ const XML_Char *base,
+ const XML_Char *systemId,
+ const XML_Char *publicId)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
ftprintf(fp, T("<notation name=\"%s\""), notationName);
if (publicId)
@@ -439,17 +472,18 @@
}
-static
-void metaEntityDecl(XML_Parser parser,
- const XML_Char *entityName,
- int is_param,
- const XML_Char *value,
- int value_length,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId,
- const XML_Char *notationName)
+static void
+metaEntityDecl(void *userData,
+ const XML_Char *entityName,
+ int is_param,
+ const XML_Char *value,
+ int value_length,
+ const XML_Char *base,
+ const XML_Char *systemId,
+ const XML_Char *publicId,
+ const XML_Char *notationName)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
if (value) {
@@ -482,11 +516,12 @@
}
}
-static
-void metaStartNamespaceDecl(XML_Parser parser,
- const XML_Char *prefix,
- const XML_Char *uri)
+static void
+metaStartNamespaceDecl(void *userData,
+ const XML_Char *prefix,
+ const XML_Char *uri)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
fputts(T("<startns"), fp);
if (prefix)
@@ -500,9 +535,10 @@
fputts(T("/>\n"), fp);
}
-static
-void metaEndNamespaceDecl(XML_Parser parser, const XML_Char *prefix)
+static void
+metaEndNamespaceDecl(void *userData, const XML_Char *prefix)
{
+ XML_Parser parser = (XML_Parser) userData;
FILE *fp = XML_GetUserData(parser);
if (!prefix)
fputts(T("<endns/>\n"), fp);
@@ -510,16 +546,14 @@
ftprintf(fp, T("<endns prefix=\"%s\"/>\n"), prefix);
}
-static
-int unknownEncodingConvert(void *data, const char *p)
+static int
+unknownEncodingConvert(void *data, const char *p)
{
return codepageConvert(*(int *)data, p);
}
-static
-int unknownEncoding(void *userData,
- const XML_Char *name,
- XML_Encoding *info)
+static int
+unknownEncoding(void *userData, const XML_Char *name, XML_Encoding *info)
{
int cp;
static const XML_Char prefixL[] = T("windows-");
@@ -554,30 +588,65 @@
return 1;
}
-static
-int notStandalone(void *userData)
+static int
+notStandalone(void *userData)
{
return 0;
}
-static
-void usage(const XML_Char *prog)
+static void
+showVersion(XML_Char *prog)
{
- ftprintf(stderr, T("usage: %s [-n] [-p] [-r] [-s] [-w] [-x] [-d output-dir] [-e encoding] file ...\n"), prog);
- exit(1);
+ XML_Char *s = prog;
+ XML_Char ch;
+ const XML_Feature *features = XML_GetFeatureList();
+ while ((ch = *s) != 0) {
+ if (ch == '/'
+#ifdef WIN32
+ || ch == '\\'
+#endif
+ )
+ prog = s + 1;
+ ++s;
+ }
+ ftprintf(stdout, T("%s using %s\n"), prog, XML_ExpatVersion());
+ if (features != NULL && features[0].feature != XML_FEATURE_END) {
+ int i = 1;
+ ftprintf(stdout, T("%s"), features[0].name);
+ if (features[0].value)
+ ftprintf(stdout, T("=%ld"), features[0].value);
+ while (features[i].feature != XML_FEATURE_END) {
+ ftprintf(stdout, T(", %s"), features[i].name);
+ if (features[i].value)
+ ftprintf(stdout, T("=%ld"), features[i].value);
+ ++i;
+ }
+ ftprintf(stdout, T("\n"));
+ }
}
-int tmain(int argc, XML_Char **argv)
+static void
+usage(const XML_Char *prog, int rc)
+{
+ ftprintf(stderr,
+ T("usage: %s [-n] [-p] [-r] [-s] [-w] [-x] [-d output-dir] "
+ "[-e encoding] file ...\n"), prog);
+ exit(rc);
+}
+
+int
+tmain(int argc, XML_Char **argv)
{
int i, j;
- const XML_Char *outputDir = 0;
- const XML_Char *encoding = 0;
+ const XML_Char *outputDir = NULL;
+ const XML_Char *encoding = NULL;
unsigned processFlags = XML_MAP_FILE;
int windowsCodePages = 0;
int outputType = 0;
int useNamespaces = 0;
int requireStandalone = 0;
int paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
+ int useStdin = 0;
#ifdef _MSC_VER
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF);
@@ -588,10 +657,10 @@
while (i < argc) {
if (j == 0) {
if (argv[i][0] != T('-'))
- break;
+ break;
if (argv[i][1] == T('-') && argv[i][2] == T('\0')) {
- i++;
- break;
+ i++;
+ break;
}
j++;
}
@@ -634,39 +703,48 @@
break;
case T('d'):
if (argv[i][j + 1] == T('\0')) {
- if (++i == argc)
- usage(argv[0]);
- outputDir = argv[i];
+ if (++i == argc)
+ usage(argv[0], 2);
+ outputDir = argv[i];
}
else
- outputDir = argv[i] + j + 1;
+ outputDir = argv[i] + j + 1;
i++;
j = 0;
break;
case T('e'):
if (argv[i][j + 1] == T('\0')) {
- if (++i == argc)
- usage(argv[0]);
- encoding = argv[i];
+ if (++i == argc)
+ usage(argv[0], 2);
+ encoding = argv[i];
}
else
- encoding = argv[i] + j + 1;
+ encoding = argv[i] + j + 1;
i++;
j = 0;
break;
+ case T('h'):
+ usage(argv[0], 0);
+ return 0;
+ case T('v'):
+ showVersion(argv[0]);
+ return 0;
case T('\0'):
if (j > 1) {
- i++;
- j = 0;
- break;
+ i++;
+ j = 0;
+ break;
}
/* fall through */
default:
- usage(argv[0]);
+ usage(argv[0], 2);
}
}
- if (i == argc)
- usage(argv[0]);
+ if (i == argc) {
+ useStdin = 1;
+ processFlags &= ~XML_MAP_FILE;
+ i--;
+ }
for (; i < argc; i++) {
FILE *fp = 0;
XML_Char *outName = 0;
@@ -681,28 +759,29 @@
XML_SetParamEntityParsing(parser, paramEntityParsing);
if (outputType == 't') {
/* This is for doing timings; this gives a more realistic estimate of
- the parsing time. */
+ the parsing time. */
outputDir = 0;
XML_SetElementHandler(parser, nopStartElement, nopEndElement);
XML_SetCharacterDataHandler(parser, nopCharacterData);
XML_SetProcessingInstructionHandler(parser, nopProcessingInstruction);
}
else if (outputDir) {
- const XML_Char *file = argv[i];
+ const XML_Char *file = useStdin ? T("STDIN") : argv[i];
if (tcsrchr(file, T('/')))
- file = tcsrchr(file, T('/')) + 1;
+ file = tcsrchr(file, T('/')) + 1;
#ifdef WIN32
if (tcsrchr(file, T('\\')))
- file = tcsrchr(file, T('\\')) + 1;
+ file = tcsrchr(file, T('\\')) + 1;
#endif
- outName = malloc((tcslen(outputDir) + tcslen(file) + 2) * sizeof(XML_Char));
+ outName = malloc((tcslen(outputDir) + tcslen(file) + 2)
+ * sizeof(XML_Char));
tcscpy(outName, outputDir);
tcscat(outName, T("/"));
tcscat(outName, file);
fp = tfopen(outName, T("wb"));
if (!fp) {
- tperror(outName);
- exit(1);
+ tperror(outName);
+ exit(1);
}
setvbuf(fp, NULL, _IOFBF, 16384);
#ifdef XML_UNICODE
@@ -711,46 +790,50 @@
XML_SetUserData(parser, fp);
switch (outputType) {
case 'm':
- XML_UseParserAsHandlerArg(parser);
- XML_SetElementHandler(parser, metaStartElement, metaEndElement);
- XML_SetProcessingInstructionHandler(parser, metaProcessingInstruction);
- XML_SetCommentHandler(parser, metaComment);
- XML_SetCdataSectionHandler(parser, metaStartCdataSection, metaEndCdataSection);
- XML_SetCharacterDataHandler(parser, metaCharacterData);
- XML_SetDoctypeDeclHandler(parser, metaStartDoctypeDecl, metaEndDoctypeDecl);
- XML_SetEntityDeclHandler(parser, metaEntityDecl);
- XML_SetNotationDeclHandler(parser, metaNotationDecl);
- XML_SetNamespaceDeclHandler(parser, metaStartNamespaceDecl, metaEndNamespaceDecl);
- metaStartDocument(parser);
- break;
+ XML_UseParserAsHandlerArg(parser);
+ XML_SetElementHandler(parser, metaStartElement, metaEndElement);
+ XML_SetProcessingInstructionHandler(parser, metaProcessingInstruction);
+ XML_SetCommentHandler(parser, metaComment);
+ XML_SetCdataSectionHandler(parser, metaStartCdataSection,
+ metaEndCdataSection);
+ XML_SetCharacterDataHandler(parser, metaCharacterData);
+ XML_SetDoctypeDeclHandler(parser, metaStartDoctypeDecl,
+ metaEndDoctypeDecl);
+ XML_SetEntityDeclHandler(parser, metaEntityDecl);
+ XML_SetNotationDeclHandler(parser, metaNotationDecl);
+ XML_SetNamespaceDeclHandler(parser, metaStartNamespaceDecl,
+ metaEndNamespaceDecl);
+ metaStartDocument(parser);
+ break;
case 'c':
- XML_UseParserAsHandlerArg(parser);
- XML_SetDefaultHandler(parser, markup);
- XML_SetElementHandler(parser, defaultStartElement, defaultEndElement);
- XML_SetCharacterDataHandler(parser, defaultCharacterData);
- XML_SetProcessingInstructionHandler(parser, defaultProcessingInstruction);
- break;
+ XML_UseParserAsHandlerArg(parser);
+ XML_SetDefaultHandler(parser, markup);
+ XML_SetElementHandler(parser, defaultStartElement, defaultEndElement);
+ XML_SetCharacterDataHandler(parser, defaultCharacterData);
+ XML_SetProcessingInstructionHandler(parser,
+ defaultProcessingInstruction);
+ break;
default:
- if (useNamespaces)
- XML_SetElementHandler(parser, startElementNS, endElementNS);
- else
- XML_SetElementHandler(parser, startElement, endElement);
- XML_SetCharacterDataHandler(parser, characterData);
+ if (useNamespaces)
+ XML_SetElementHandler(parser, startElementNS, endElementNS);
+ else
+ XML_SetElementHandler(parser, startElement, endElement);
+ XML_SetCharacterDataHandler(parser, characterData);
#ifndef W3C14N
- XML_SetProcessingInstructionHandler(parser, processingInstruction);
+ XML_SetProcessingInstructionHandler(parser, processingInstruction);
#endif /* not W3C14N */
- break;
+ break;
}
}
if (windowsCodePages)
XML_SetUnknownEncodingHandler(parser, unknownEncoding, 0);
- result = XML_ProcessFile(parser, argv[i], processFlags);
+ result = XML_ProcessFile(parser, useStdin ? NULL : argv[i], processFlags);
if (outputDir) {
if (outputType == 'm')
- metaEndDocument(parser);
+ metaEndDocument(parser);
fclose(fp);
if (!result)
- tremove(outName);
+ tremove(outName);
free(outName);
}
XML_ParserFree(parser);
--- wfcheck.c DELETED ---
--- wfcheck.h DELETED ---
--- wfcheckmessage.c DELETED ---
|
|
From: Max H. <fin...@us...> - 2002-09-09 17:43:08
|
Update of /cvsroot/jabberfox/JabberFoX2/Shared/GUI
In directory usw-pr-cvs1:/tmp/cvs-serv13747/Shared/GUI
Modified Files:
NSTextField+Misc.m
Log Message:
Updated to 1.95.5; fixed some compile warnings on 10.2; updated project file to latest ProjectBuilder
Index: NSTextField+Misc.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Shared/GUI/NSTextField+Misc.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- NSTextField+Misc.m 23 Mar 2002 12:43:23 -0000 1.1.1.1
+++ NSTextField+Misc.m 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: NSTextField+Misc.m,v 1.1.1.1 2002/03/23 12:43:23 fingolfin Exp $
+// $Id: NSTextField+Misc.m,v 1.2 2002/09/09 17:43:04 fingolfin Exp $
// JabberFoX
//
// Created by maxhorn on Wed Oct 31 2001.
@@ -13,9 +13,9 @@
- (BOOL)isEmpty
{
- NSTextView *text = [self currentEditor];
+ NSText *text = [self currentEditor];
if (text)
- return [[text textStorage] length] == 0;
+ return [[text string] length] == 0;
else
return [[self stringValue] length] == 0;
}
|
|
From: Max H. <fin...@us...> - 2002-09-09 17:43:08
|
Update of /cvsroot/jabberfox/JabberFoX2/JabberFoX.pbproj
In directory usw-pr-cvs1:/tmp/cvs-serv13747/JabberFoX.pbproj
Modified Files:
maxhorn.pbxuser project.pbxproj
Log Message:
Updated to 1.95.5; fixed some compile warnings on 10.2; updated project file to latest ProjectBuilder
Index: maxhorn.pbxuser
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/JabberFoX.pbproj/maxhorn.pbxuser,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- maxhorn.pbxuser 9 Aug 2002 13:36:03 -0000 1.6
+++ maxhorn.pbxuser 9 Sep 2002 17:43:04 -0000 1.7
@@ -94,11 +94,6 @@
};
0430D2AD00911E007F000001 = {
activeExec = 0;
- customExecs = {
- macosx = (
- 0143333700C165EE7F000001,
- );
- };
};
043EABA2007206177F000001 = {
activeExec = 0;
@@ -146,9 +141,10 @@
};
29B97313FDCFA39411CA2CEA = {
activeBuildStyle = 013FBBC3006AE7997F000001;
- activeTarget = 29B97326FDCFA39411CA2CEA;
+ activeExecutable = 2C5156D300BF09A37F000001;
+ activeTarget = 0430D2AD00911E007F000001;
addToTargets = (
- F5A0F91C02BA93F5018043A9,
+ 012E736F0066BBEE7F000001,
);
breakpoints = (
01879D1F00C1AB547F000001,
@@ -170,17 +166,265 @@
F55C7C9302BE0C0701A8102A,
F55C7C9402BE0C0701A8102A,
);
+ executables = (
+ 0143333700C165EE7F000001,
+ 2C5156D300BF09A37F000001,
+ );
perUserDictionary = {
+ PBXPerProjectTemplateStateSaveDate = 53282239;
+ "PBXTemplateGeometry-F5314676015831810DCA290F" = {
+ ContentSize = "{685, 434}";
+ LeftSlideOut = {
+ Collapsed = NO;
+ Frame = "{{0, 23}, {685, 411}}";
+ Split0 = {
+ ActiveTab = 2;
+ Collapsed = NO;
+ Frame = "{{0, 0}, {685, 411}}";
+ Split0 = {
+ Frame = "{{0, 221}, {685, 190}}";
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Debugger = {
+ Collapsed = NO;
+ Frame = "{{0, 0}, {952, 321}}";
+ Split0 = {
+ Frame = "{{0, 24}, {952, 297}}";
+ Split0 = {
+ Frame = "{{0, 0}, {468, 297}}";
+ };
+ Split1 = {
+ DebugVariablesTableConfiguration = (
+ Name,
+ 126.803,
+ Value,
+ 150.074,
+ Summary,
+ 172.123,
+ );
+ Frame = "{{477, 0}, {475, 297}}";
+ };
+ SplitCount = 2;
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Frame = "{{0, 0}, {100, 50}}";
+ };
+ Tab1 = {
+ Frame = "{{0, 0}, {100, 50}}";
+ };
+ TabCount = 2;
+ TabsVisible = YES;
+ };
+ Frame = "{{0, 0}, {952, 321}}";
+ LauncherConfigVersion = 7;
+ };
+ Tab1 = {
+ Frame = "{{0, 0}, {781, 452}}";
+ LauncherConfigVersion = 3;
+ Runner = {
+ Frame = "{{0, 0}, {781, 452}}";
+ };
+ };
+ Tab2 = {
+ BuildMessageFrame = "{{0, 0}, {687, 149}}";
+ BuildTranscriptFrame = "{{0, 158}, {687, 59}}";
+ Frame = "{{0, 0}, {685, 215}}";
+ };
+ Tab3 = {
+ Frame = "{{0, 0}, {612, 295}}";
+ };
+ TabCount = 4;
+ TabsVisible = NO;
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Frame = "{{0, 0}, {300, 533}}";
+ GroupTreeTableConfiguration = (
+ TargetStatusColumn,
+ 18,
+ MainColumn,
+ 267,
+ );
+ };
+ Tab1 = {
+ ClassesFrame = "{{0, 0}, {280, 398}}";
+ ClassesTreeTableConfiguration = (
+ PBXBookColumnIdentifier,
+ 20,
+ PBXClassColumnIdentifier,
+ 237,
+ );
+ Frame = "{{0, 0}, {278, 659}}";
+ MembersFrame = "{{0, 407}, {280, 252}}";
+ MembersTreeTableConfiguration = (
+ PBXBookColumnIdentifier,
+ 20,
+ PBXMethodColumnIdentifier,
+ 236,
+ );
+ };
+ Tab2 = {
+ Frame = "{{0, 0}, {200, 100}}";
+ };
+ Tab3 = {
+ Frame = "{{0, 0}, {200, 100}}";
+ TargetTableConfiguration = (
+ ActiveObject,
+ 16,
+ ObjectNames,
+ 202.296,
+ );
+ };
+ Tab4 = {
+ BreakpointsTreeTableConfiguration = (
+ breakpointColumn,
+ 197,
+ enabledColumn,
+ 31,
+ );
+ Frame = "{{0, 0}, {250, 100}}";
+ };
+ TabCount = 5;
+ TabsVisible = NO;
+ };
+ StatusViewVisible = YES;
+ Template = F5314676015831810DCA290F;
+ ToolbarVisible = YES;
+ WindowLocation = "{153, 296}";
+ };
+ "PBXTemplateGeometry-F5CA7ECB015C094F0DCA290F" = {
+ ContentSize = "{668, 621}";
+ LeftSlideOut = {
+ Collapsed = NO;
+ Frame = "{{0, 0}, {668, 621}}";
+ Split0 = {
+ Collapsed = NO;
+ Frame = "{{0, 0}, {668, 621}}";
+ Split0 = {
+ Frame = "{{0, 0}, {668, 621}}";
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Debugger = {
+ Collapsed = NO;
+ Frame = "{{0, 0}, {484, 208}}";
+ Split0 = {
+ Frame = "{{0, 24}, {484, 184}}";
+ Split0 = {
+ Frame = "{{0, 0}, {236, 184}}";
+ };
+ Split1 = {
+ DebugVariablesTableConfiguration = (
+ Name,
+ 123,
+ Value,
+ 85,
+ Summary,
+ 62.123,
+ );
+ Frame = "{{245, 0}, {239, 184}}";
+ };
+ SplitCount = 2;
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Frame = "{{0, 0}, {100, 50}}";
+ };
+ Tab1 = {
+ Frame = "{{0, 0}, {100, 50}}";
+ };
+ TabCount = 2;
+ TabsVisible = YES;
+ };
+ Frame = "{{0, 0}, {484, 208}}";
+ LauncherConfigVersion = 7;
+ };
+ Tab1 = {
+ Frame = "{{0, 0}, {664, 208}}";
+ LauncherConfigVersion = 3;
+ Runner = {
+ Frame = "{{0, 0}, {664, 208}}";
+ };
+ };
+ Tab2 = {
+ BuildMessageFrame = "{{0, 0}, {666, 43}}";
+ BuildTranscriptFrame = "{{0, 52}, {666, 0}}";
+ Frame = "{{0, 0}, {664, 50}}";
+ };
+ Tab3 = {
+ Frame = "{{0, 0}, {612, 295}}";
+ };
+ TabCount = 4;
+ TabsVisible = NO;
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Frame = "{{0, 0}, {313, 531}}";
+ GroupTreeTableConfiguration = (
+ TargetStatusColumn,
+ 18,
+ MainColumn,
+ 280,
+ );
+ };
+ Tab1 = {
+ ClassesFrame = "{{0, 0}, {280, 398}}";
+ ClassesTreeTableConfiguration = (
+ PBXBookColumnIdentifier,
+ 20,
+ PBXClassColumnIdentifier,
+ 237,
+ );
+ Frame = "{{0, 0}, {278, 659}}";
+ MembersFrame = "{{0, 407}, {280, 252}}";
+ MembersTreeTableConfiguration = (
+ PBXBookColumnIdentifier,
+ 20,
+ PBXMethodColumnIdentifier,
+ 236,
+ );
+ };
+ Tab2 = {
+ Frame = "{{0, 0}, {200, 100}}";
+ };
+ Tab3 = {
+ Frame = "{{0, 0}, {200, 557}}";
+ TargetTableConfiguration = (
+ ActiveObject,
+ 16,
+ ObjectNames,
+ 202.296,
+ );
+ };
+ Tab4 = {
+ BreakpointsTreeTableConfiguration = (
+ breakpointColumn,
+ 197,
+ enabledColumn,
+ 31,
+ );
+ Frame = "{{0, 0}, {250, 100}}";
+ };
+ TabCount = 5;
+ TabsVisible = NO;
+ };
+ StatusViewVisible = NO;
+ Template = F5CA7ECB015C094F0DCA290F;
+ ToolbarVisible = NO;
+ WindowLocation = "{48, 349}";
+ };
PBXWorkspaceConfiguration = {
ContentSize = "{948, 742}";
LeftSlideOut = {
ActiveTab = 0;
Frame = "{{0, 23}, {948, 719}}";
Split0 = {
- ActiveTab = 0;
+ ActiveTab = 2;
Frame = "{{294, 0}, {654, 719}}";
Split0 = {
- Frame = "{{0, 360}, {654, 359}}";
+ Frame = "{{0, 253}, {654, 466}}";
};
SplitCount = 1;
Tab0 = {
@@ -255,6 +499,9 @@
TabCount = 5;
};
};
+ PBXWorkspaceStateSaveDate = 53282239;
+ };
+ projectwideBuildSettings = {
};
userBookmarkGroup = F56579AC0178F13401A8102A;
wantsIndex = 1;
@@ -262,11 +509,9 @@
};
29B97326FDCFA39411CA2CEA = {
activeExec = 0;
- targetExecs = {
- macosx = (
- 2C5156D300BF09A37F000001,
- );
- };
+ executables = (
+ 2C5156D300BF09A37F000001,
+ );
};
2BA05E0400A0F4087F000001 = {
activeExec = 0;
@@ -296,6 +541,7 @@
},
);
isa = PBXExecutable;
+ name = JabberFoX;
shlibInfoDictList = (
);
sourceDirectories = (
@@ -342,8 +588,6 @@
};
F53B7F7500CC2C4A01000001 = {
activeExec = 0;
- customExecs = {
- };
};
F53EA57C02BD37C501A8102A = {
fRef = F53EA57502BCF99C01A8102A;
@@ -457,13 +701,9 @@
};
F5773C43017A2C3A01A8102A = {
activeExec = 0;
- customExecs = {
- };
};
F5773C46017A2E5201A8102A = {
activeExec = 0;
- customExecs = {
- };
};
F58324A501986CF301A8102A = {
fRef = F5DA5C720194292001A8102A;
@@ -511,13 +751,9 @@
};
F59D0B8D0242A34301A8102A = {
activeExec = 0;
- customExecs = {
- };
};
F5A0F91C02BA93F5018043A9 = {
activeExec = 0;
- customExecs = {
- };
};
F5AC33B20240EEF701A8102A = {
fileReference = 1469DA880064975E7F000001;
@@ -551,8 +787,6 @@
};
F5DA5C6A019427DD01A8102A = {
activeExec = 0;
- customExecs = {
- };
};
F5E8223B017B63D301A8102A = {
fRef = 0277AACE009225C77F000001;
Index: project.pbxproj
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/JabberFoX.pbproj/project.pbxproj,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- project.pbxproj 20 Jun 2002 16:53:53 -0000 1.4
+++ project.pbxproj 9 Sep 2002 17:43:04 -0000 1.5
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 34;
+ objectVersion = 38;
objects = {
00E4AD06006DD4277F000001 = {
isa = PBXFileReference;
@@ -231,8 +231,8 @@
productName = Message;
productReference = 013FBBC2006AE7997F000001;
[...979 lines suppressed...]
+ runOnlyForDeploymentPostprocessing = 0;
};
F5FB053201EAB3D301562867 = {
buildActionMask = 2147483647;
files = (
);
isa = PBXFrameworksBuildPhase;
- name = "Frameworks & Libraries";
+ runOnlyForDeploymentPostprocessing = 0;
};
F5FB053301EAB3D301562867 = {
buildActionMask = 2147483647;
files = (
);
isa = PBXRezBuildPhase;
- name = "ResourceManager Resources";
+ runOnlyForDeploymentPostprocessing = 0;
};
F5FB053401EAB40801562867 = {
children = (
|
|
From: Max H. <fin...@us...> - 2002-09-09 17:43:08
|
Update of /cvsroot/jabberfox/JabberFoX2/Shared/General
In directory usw-pr-cvs1:/tmp/cvs-serv13747/Shared/General
Modified Files:
NSAttributedString+XHTML.m
Log Message:
Updated to 1.95.5; fixed some compile warnings on 10.2; updated project file to latest ProjectBuilder
Index: NSAttributedString+XHTML.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Shared/General/NSAttributedString+XHTML.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- NSAttributedString+XHTML.m 23 Mar 2002 12:43:22 -0000 1.1.1.1
+++ NSAttributedString+XHTML.m 9 Sep 2002 17:43:04 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: NSAttributedString+XHTML.m,v 1.1.1.1 2002/03/23 12:43:22 fingolfin Exp $
+// $Id: NSAttributedString+XHTML.m,v 1.2 2002/09/09 17:43:04 fingolfin Exp $
// JabberFoX
//
// Created by lordfing on Sat Apr 21 2001.
@@ -421,7 +421,7 @@
limitRange = NSMakeRange(0, [self length]);
while (limitRange.length > 0)
{
- NSMutableDictionary *dict = [self attributesAtIndex:limitRange.location longestEffectiveRange:&effectiveRange inRange:limitRange];
+ NSDictionary *dict = [self attributesAtIndex:limitRange.location longestEffectiveRange:&effectiveRange inRange:limitRange];
// check for changes in this font or colors
font = [dict objectForKey:NSFontAttributeName];
|
|
From: Max H. <fin...@us...> - 2002-08-09 13:36:09
|
Update of /cvsroot/jabberfox/JabberFoX2/Shared/GUI
In directory usw-pr-cvs1:/tmp/cvs-serv23717/Shared/GUI
Modified Files:
JFOutlineView.h JFOutlineView.m JFTableView.h JFTableView.m
Log Message:
various fixes to table and outline code
Index: JFOutlineView.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Shared/GUI/JFOutlineView.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- JFOutlineView.h 23 Mar 2002 12:43:23 -0000 1.1.1.1
+++ JFOutlineView.h 9 Aug 2002 13:36:04 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: JFOutlineView.h,v 1.1.1.1 2002/03/23 12:43:23 fingolfin Exp $
+// $Id: JFOutlineView.h,v 1.2 2002/08/09 13:36:04 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Fri Mar 15 2002.
@@ -9,7 +9,10 @@
#import <Cocoa/Cocoa.h>
@interface JFOutlineView : NSOutlineView
-// no new public methods
+{
+ NSRect oldFrameRect;
+ int oldRows;
+}
@end
@interface NSObject (JFOutlineViewDataSourceToolTips)
Index: JFOutlineView.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Shared/GUI/JFOutlineView.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- JFOutlineView.m 23 Mar 2002 12:43:23 -0000 1.1.1.1
+++ JFOutlineView.m 9 Aug 2002 13:36:04 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: JFOutlineView.m,v 1.1.1.1 2002/03/23 12:43:23 fingolfin Exp $
+// $Id: JFOutlineView.m,v 1.2 2002/08/09 13:36:04 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Fri Mar 15 2002.
@@ -46,7 +46,7 @@
}
/*
- * Implement our informal NSToolTipOwner protocol to allow tooltips
+ * Implement the informal NSToolTipOwner protocol to allow tooltips
* on a per-item level.
*/
- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data
@@ -116,31 +116,24 @@
*/
- (void)_updateToolTipRect
{
- static NSRect oldFrameRect;
- static int oldRows = 0;
- NSRect frameRect;
- int rows;
-
+ NSRect frameRect;
+ int rows;
+
frameRect = [self frame];
rows = [self numberOfRows];
// Check if rows or frame changed
- if (rows != oldRows || !NSEqualRects(oldFrameRect, frameRect))
- {
- int i;
- NSRect rect;
-
+ if( rows != oldRows || !NSEqualRects( oldFrameRect, frameRect ) )
+ { int i;
+
// Remove all old NSToolTipRects
[self removeAllToolTips];
// Add a NSToolTipRect for each row
- for (i = 0; i < rows; ++i)
- {
- rect = [self rectOfRow:i];
- [self addToolTipRect:rect owner:self userData:NULL];
- }
+ for( i = 0; i < rows; ++i )
+ [self addToolTipRect:[self rectOfRow:i] owner:self userData:NULL];
}
-
+
// Save the current values
oldRows = rows;
oldFrameRect = frameRect;
Index: JFTableView.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Shared/GUI/JFTableView.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- JFTableView.h 23 Mar 2002 12:43:23 -0000 1.1.1.1
+++ JFTableView.h 9 Aug 2002 13:36:04 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: JFTableView.h,v 1.1.1.1 2002/03/23 12:43:23 fingolfin Exp $
+// $Id: JFTableView.h,v 1.2 2002/08/09 13:36:04 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Fri Mar 15 2002.
@@ -9,7 +9,10 @@
#import <Cocoa/Cocoa.h>
@interface JFTableView : NSTableView
-// no new public methods
+{
+ NSRect oldFrameRect;
+ int oldRows;
+}
@end
@interface NSObject (JFTableViewDataSourceToolTips)
Index: JFTableView.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Shared/GUI/JFTableView.m,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- JFTableView.m 20 Jun 2002 16:47:03 -0000 1.2
+++ JFTableView.m 9 Aug 2002 13:36:04 -0000 1.3
@@ -1,5 +1,5 @@
//
-// $Id: JFTableView.m,v 1.2 2002/06/20 16:47:03 fingolfin Exp $
+// $Id: JFTableView.m,v 1.3 2002/08/09 13:36:04 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Fri Mar 15 2002.
@@ -139,31 +139,24 @@
*/
- (void)_updateToolTipRect
{
- static NSRect oldFrameRect;
- static int oldRows = 0;
- NSRect frameRect;
- int rows;
-
+ NSRect frameRect;
+ int rows;
+
frameRect = [self frame];
rows = [self numberOfRows];
// Check if rows or frame changed
- if (rows != oldRows || !NSEqualRects(oldFrameRect, frameRect))
- {
- int i;
- NSRect rect;
-
+ if( rows != oldRows || !NSEqualRects( oldFrameRect, frameRect ) )
+ { int i;
+
// Remove all old NSToolTipRects
[self removeAllToolTips];
// Add a NSToolTipRect for each row
- for (i = 0; i < rows; ++i)
- {
- rect = [self rectOfRow:i];
- [self addToolTipRect:rect owner:self userData:NULL];
- }
+ for( i = 0; i < rows; ++i )
+ [self addToolTipRect:[self rectOfRow:i] owner:self userData:NULL];
}
-
+
// Save the current values
oldRows = rows;
oldFrameRect = frameRect;
|
|
From: Max H. <fin...@us...> - 2002-08-09 13:36:07
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/Roster
In directory usw-pr-cvs1:/tmp/cvs-serv23717/Plugins/Roster
Modified Files:
RosterController.m RosterView.h RosterView.m
Log Message:
various fixes to table and outline code
Index: RosterController.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Plugins/Roster/RosterController.m,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RosterController.m 13 Jun 2002 23:13:29 -0000 1.4
+++ RosterController.m 9 Aug 2002 13:36:04 -0000 1.5
@@ -1,5 +1,5 @@
//
-// $Id: RosterController.m,v 1.4 2002/06/13 23:13:29 fingolfin Exp $
+// $Id: RosterController.m,v 1.5 2002/08/09 13:36:04 fingolfin Exp $
// JabberFoX
//
// Copyright (c) 2001, 2002 JabberFoX team. All rights reserved.
@@ -72,7 +72,8 @@
// Set the outline cell:
cell = [[RosterCell alloc] init];
- [cell setEditable:TRUE];
+ [cell setEditable:YES];
+ [cell setWraps: NO];
[column setDataCell:cell];
[cell release];
Index: RosterView.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Plugins/Roster/RosterView.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- RosterView.h 23 Mar 2002 12:43:10 -0000 1.1.1.1
+++ RosterView.h 9 Aug 2002 13:36:04 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: RosterView.h,v 1.1.1.1 2002/03/23 12:43:10 fingolfin Exp $
+// $Id: RosterView.h,v 1.2 2002/08/09 13:36:04 fingolfin Exp $
// JabberFoX
//
// Created by jsmoore on Wed Mar 14 2001.
@@ -8,6 +8,8 @@
#import "JFOutlineView.h"
-@interface RosterView : JFOutlineView
-// no new public methods
+@interface RosterView : JFOutlineView
+{
+ int mRowToBeEdited;
+}
@end
Index: RosterView.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Plugins/Roster/RosterView.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- RosterView.m 23 Mar 2002 12:43:10 -0000 1.1.1.1
+++ RosterView.m 9 Aug 2002 13:36:04 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: RosterView.m,v 1.1.1.1 2002/03/23 12:43:10 fingolfin Exp $
+// $Id: RosterView.m,v 1.2 2002/08/09 13:36:04 fingolfin Exp $
// JabberFoX
//
// Created by jsmoore on Wed Mar 14 2001.
@@ -9,7 +9,8 @@
#import "RosterView.h"
@interface RosterView (Private)
-- (void)_editItem:(id)item;
+- (void)_cancelEditItem;
+- (void)_editItem:(id)dummy;
@end
@implementation RosterView
@@ -40,11 +41,26 @@
}
/*
- * Handle mouse clicks in a more Finder-like fashion
+ * Handle mouse clicks, allowing them to start inline editing.
+ * We start editing under two conditions:
+ * 1) For clicks together with the alt/option modifier key immediatly
+ * 2) For clicks on already selected items after a short delay
+ * Rule 2 only is enabled if the outline view is first responder of the main
+ * window, otherwise odd behaviour takes placed when the user clicks into
+ * a background window on a selected item - editing would start, which is
+ * not the correct result (at least if we want to match Finder).
+ *
+ * There are some other catchfalls and quirks we have to consider, for details
+ * read the comments in the code.
*/
- (void)mouseDown:(NSEvent *)theEvent
{
- int oldRow, newRow, editRow;
+ // Record some state information before calling the super implementation,
+ // as these might change. E.g. if we are not yet first repsonder, the click
+ // might make us first responder.
+ BOOL wasFirstResponder = ([[self window] firstResponder] == self);
+ BOOL wasMainWindow = [[self window] isMainWindow];
+ int oldRow, newRow, oldEditRow;
int clickedRow, clickedColumn;
BOOL leftButton = ([theEvent type] == NSLeftMouseDown);
BOOL clickInText = NO;
@@ -52,62 +68,73 @@
NSPoint point;
NSRect rect;
- editRow = [self editedRow];
- oldRow = [self selectedRow];
-
- // Check whether the click was inside a cell, and if this is the case, if it
- // was also inside the text part of the cell (this assumes the image part is
- // exactly 20 pixels wide)
- point = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- clickedRow = [self rowAtPoint:point];
- clickedColumn = [self columnAtPoint:point];
- if (clickedRow >= 0 && clickedColumn >= 0)
- {
- rect = [self frameOfCellAtColumn:clickedColumn row:clickedRow];
- if (NSPointInRect(point, rect))
- {
- clickInCell = YES;
- rect.size.width = 20.0;
- clickInText = ! NSPointInRect(point, rect);
- }
- }
+ oldEditRow = [self editedRow];
+ oldRow = ([self numberOfSelectedRows] == 1) ? [self selectedRow] : -1;
if (leftButton && clickInCell && [theEvent clickCount] == 2 && [self target] && [self doubleAction])
{
+ // Cancel any scheduled edit requests
+ [self _cancelEditItem];
+
// selecte cell
[self selectRow:clickedRow byExtendingSelection:NO];
// Invoke the double click action
[[self target] performSelector:[self doubleAction]];
- // Cancel any scheduled edit requests
- [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(_editItem:) object:[self itemAtRow:oldRow]];
return;
}
+ // Now call the super implementation. It will only return after the mouseUp
+ // occured, since it does drag&drop handling etc.
[super mouseDown:theEvent];
newRow = [self selectedRow];
if (oldRow != newRow || !clickInCell)
{
// Selection did change, so cancel any scheduled edit requests
- [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(_editItem:) object:[self itemAtRow:oldRow]];
+ [self _cancelEditItem];
}
+ // Little trick: if editing was already in progress, then the field editor
+ // will be first responder. For our purposes this is the same as if we
+ // were first responder, so pretend it were so.
+ if (oldEditRow >= 0)
+ wasFirstResponder = YES;
+
+ // Check whether the click was inside a cell, and if this is the case, if it
+ // was also inside the text part of the cell (this assumes the image part is
+ // exactly 20 pixels wide)
+ point = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ clickedRow = [self rowAtPoint:point];
+ clickedColumn = [self columnAtPoint:point];
+ if (clickedRow >= 0 && clickedColumn >= 0)
+ {
+ rect = [self frameOfCellAtColumn:clickedColumn row:clickedRow];
+ if (NSPointInRect(point, rect))
+ {
+ clickInCell = YES;
+ rect.size.width = 20.0;
+ clickInText = ! NSPointInRect(point, rect);
+ }
+ }
+
// Check whether a row is selected which is not being edited already.
// In this case, ask the delegate whether we should edit it.
- if (leftButton && clickInText && (newRow >= 0) && (editRow != newRow) && (newRow == clickedRow) && ([theEvent clickCount] == 1) && [[self delegate] outlineView:self shouldEditTableColumn:[self outlineTableColumn] item:[self itemAtRow:newRow]])
+ if (wasFirstResponder && wasMainWindow && leftButton && clickInText && (newRow >= 0) && (oldEditRow != newRow) && (newRow == clickedRow) && ([theEvent clickCount] == 1) && [[self delegate] outlineView:self shouldEditTableColumn:[self outlineTableColumn] item:[self itemAtRow:newRow]])
{
if ([theEvent modifierFlags] & NSAlternateKeyMask)
{
// If the alt key was pressed, start editing right away
- [self _editItem:[self itemAtRow:newRow]];
+ mRowToBeEdited = newRow;
+ [self _editItem:nil];
}
else if (oldRow == newRow)
{
// After a short delay, start editing the item - this will be canceled
// by any selection change, though!
- [self performSelector:@selector(_editItem:) withObject:[self itemAtRow:newRow] afterDelay:1.0];
+ mRowToBeEdited = newRow;
+ [self performSelector:@selector(_editItem:) withObject:nil afterDelay:1.0];
}
}
}
@@ -182,16 +209,26 @@
@implementation RosterView (Private)
+- (void)_cancelEditItem
+{
+ mRowToBeEdited = -1;
+ [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(editItem:) object:nil];
+}
+
/*
- * Start editing a given item.
+ * Start editing a given item. Used to start editing delayed.
*/
-- (void)_editItem:(id)item
+- (void)_editItem:(id)dummy
{
- int row = [self rowForItem:item];
- [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(editItem:) object:item];
-
- if (row == [self selectedRow])
- [self editColumn:0 row:row withEvent:nil select:YES];
+ int row = mRowToBeEdited;
+
+ // Cancel any other scheduled edits
+ [self _cancelEditItem];
+
+ // Only start the editing if the selection didn't change in the meantime
+ // (e.g. because arrow keys were used to change it).
+ if (row > 0 && row == [self selectedRow])
+ [self editColumn:0 row:row withEvent:nil select:YES];
}
@end
|
|
From: Max H. <fin...@us...> - 2002-08-09 13:36:07
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/GroupChat
In directory usw-pr-cvs1:/tmp/cvs-serv23717/Plugins/GroupChat
Modified Files:
GroupChatController.m
Log Message:
various fixes to table and outline code
Index: GroupChatController.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Plugins/GroupChat/GroupChatController.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- GroupChatController.m 23 Mar 2002 12:43:03 -0000 1.1.1.1
+++ GroupChatController.m 9 Aug 2002 13:36:04 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: GroupChatController.m,v 1.1.1.1 2002/03/23 12:43:03 fingolfin Exp $
+// $Id: GroupChatController.m,v 1.2 2002/08/09 13:36:04 fingolfin Exp $
// JabberFoX
//
// Copyright (c) 2001, 2002 JabberFoX team. All rights reserved.
@@ -93,6 +93,7 @@
columns = [chatRoomMembers tableColumns];
column = [columns objectAtIndex:0]; // first column
rcell = [[RosterCell alloc] init];
+ [rcell setWraps: NO];
[column setDataCell:rcell];
[rcell release];
|
|
From: Max H. <fin...@us...> - 2002-08-09 13:36:06
|
Update of /cvsroot/jabberfox/JabberFoX2/JabberFoX.pbproj
In directory usw-pr-cvs1:/tmp/cvs-serv23717/JabberFoX.pbproj
Modified Files:
maxhorn.pbxuser
Log Message:
various fixes to table and outline code
Index: maxhorn.pbxuser
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/JabberFoX.pbproj/maxhorn.pbxuser,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- maxhorn.pbxuser 20 Jun 2002 16:53:53 -0000 1.5
+++ maxhorn.pbxuser 9 Aug 2002 13:36:03 -0000 1.6
@@ -177,10 +177,10 @@
ActiveTab = 0;
Frame = "{{0, 23}, {948, 719}}";
Split0 = {
- ActiveTab = 2;
+ ActiveTab = 0;
Frame = "{{294, 0}, {654, 719}}";
Split0 = {
- Frame = "{{0, 253}, {654, 466}}";
+ Frame = "{{0, 360}, {654, 359}}";
};
SplitCount = 1;
Tab0 = {
@@ -490,7 +490,7 @@
F59D0B7F0242408801A8102A = {
fileReference = 1469DA880064975E7F000001;
isa = PBXFileBreakpoint;
- lineNumber = 212;
+ lineNumber = 213;
state = 1;
};
F59D0B81024241D701A8102A = {
@@ -522,7 +522,7 @@
F5AC33B20240EEF701A8102A = {
fileReference = 1469DA880064975E7F000001;
isa = PBXFileBreakpoint;
- lineNumber = 210;
+ lineNumber = 211;
state = 1;
};
F5AC33B30240EF1501A8102A = {
@@ -592,7 +592,7 @@
F5F45A8C0258F7AC01A8102A = {
fileReference = 0617698F006567E17F000001;
isa = PBXFileBreakpoint;
- lineNumber = 158;
+ lineNumber = 159;
state = 1;
};
F5FB052A01EAB3D301562867 = {
|
|
From: Max H. <fin...@us...> - 2002-08-09 13:36:06
|
Update of /cvsroot/jabberfox/JabberFoX2 In directory usw-pr-cvs1:/tmp/cvs-serv23717 Modified Files: ChangeLog Log Message: various fixes to table and outline code Index: ChangeLog =================================================================== RCS file: /cvsroot/jabberfox/JabberFoX2/ChangeLog,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ChangeLog 20 Jun 2002 16:53:53 -0000 1.8 +++ ChangeLog 9 Aug 2002 13:36:02 -0000 1.9 @@ -1,3 +1,11 @@ +2002-08-09 Max Horn <ma...@qu...> + * JFOutlineView, JFTableView: fixed code to *not* static varaibles but + rather proper class members (statics won't work properly if there are more + than one instance of each class, after all) + * Roster(Plugin): Fixed somed editing behaviour + * Roster(Plugin): Roster entries don't 'wrap' anymore even if they are very + long + 2002-06-18 Max Horn <ma...@qu...> * MsgHistory(Plugin): new plugin; keeps persistant storage of all received messages; very very beta so far, but the core features are usable. |
|
From: Max H. <fin...@us...> - 2002-06-20 16:54:27
|
Update of /cvsroot/jabberfox/JabberFoX2/JabberFoX.pbproj
In directory usw-pr-cvs1:/tmp/cvs-serv2774/JabberFoX.pbproj
Modified Files:
maxhorn.pbxuser project.pbxproj
Log Message:
added new MsgHistory plugin
Index: maxhorn.pbxuser
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/JabberFoX.pbproj/maxhorn.pbxuser,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- maxhorn.pbxuser 13 Jun 2002 23:14:15 -0000 1.4
+++ maxhorn.pbxuser 20 Jun 2002 16:53:53 -0000 1.5
@@ -58,6 +58,11 @@
path = /Volumes/Data/Projekte/JabberFoX/build/JabberFoX.app;
refType = 0;
};
+ 015F8D3B00584B1A7F000001 = {
+ uiCtxt = {
+ sepNavWindowFrame = "{{15, 495}, {750, 502}}";
+ };
+ };
01879D1F00C1AB547F000001 = {
isa = PBXSymbolicBreakpoint;
state = 1;
@@ -134,11 +139,16 @@
sepNavWindowFrame = "{{118, 219}, {766, 669}}";
};
};
+ 2019DBEC00407EB17F000001 = {
+ uiCtxt = {
+ sepNavWindowFrame = "{{15, 495}, {750, 502}}";
+ };
+ };
29B97313FDCFA39411CA2CEA = {
activeBuildStyle = 013FBBC3006AE7997F000001;
activeTarget = 29B97326FDCFA39411CA2CEA;
addToTargets = (
- 0617697B0065655A7F000001,
+ F5A0F91C02BA93F5018043A9,
);
breakpoints = (
01879D1F00C1AB547F000001,
@@ -151,14 +161,14 @@
F5B30664025007A101A8102A,
F593BAA40250A6F301A8102A,
F593BAA50250A6F301A8102A,
- F593BAA60250A6F301A8102A,
- F593BAA70250A6F301A8102A,
- F593BAA80250A6F301A8102A,
- F593BAA90250A6F301A8102A,
F5F45A8C0258F7AC01A8102A,
F56429A802B6AFB501A8102A,
F56429A902B6AFC901A8102A,
F5B9483802B959F101A87B7D,
+ F55C7C9102BE0C0701A8102A,
+ F55C7C9202BE0C0701A8102A,
+ F55C7C9302BE0C0701A8102A,
+ F55C7C9402BE0C0701A8102A,
);
perUserDictionary = {
PBXWorkspaceConfiguration = {
@@ -167,23 +177,23 @@
ActiveTab = 0;
Frame = "{{0, 23}, {948, 719}}";
Split0 = {
- ActiveTab = 0;
+ ActiveTab = 2;
Frame = "{{294, 0}, {654, 719}}";
Split0 = {
- Frame = "{{0, 396}, {654, 323}}";
+ Frame = "{{0, 253}, {654, 466}}";
};
SplitCount = 1;
Tab0 = {
Debugger = {
ActiveTab = 1;
- Frame = "{{0, 0}, {654, 372}}";
+ Frame = "{{0, 0}, {654, 336}}";
Split0 = {
- Frame = "{{0, 156}, {654, 216}}";
+ Frame = "{{0, 156}, {654, 180}}";
Split0 = {
- Frame = "{{0, 0}, {250, 216}}";
+ Frame = "{{0, 0}, {248, 180}}";
};
Split1 = {
- Frame = "{{259, 0}, {395, 216}}";
+ Frame = "{{257, 0}, {397, 180}}";
};
SplitCount = 2;
};
@@ -196,7 +206,7 @@
};
TabCount = 2;
};
- Frame = "{{0, 0}, {654, 372}}";
+ Frame = "{{0, 0}, {654, 336}}";
LauncherConfigVersion = 4;
};
Tab1 = {
@@ -311,7 +321,7 @@
};
407E3CD900240D9F7F000001 = {
uiCtxt = {
- sepNavWindowFrame = "{{166, 168}, {774, 722}}";
+ sepNavWindowFrame = "{{15, 495}, {750, 502}}";
};
};
63E3DF71002DE1C97F000001 = {
@@ -335,16 +345,50 @@
customExecs = {
};
};
+ F53EA57C02BD37C501A8102A = {
+ fRef = F53EA57502BCF99C01A8102A;
+ isa = PBXTextBookmark;
+ name = "MessageDB.h: messageCount";
+ rLen = 96;
+ rLoc = 261;
+ rType = 0;
+ vrLen = 363;
+ vrLoc = 0;
+ };
+ F55C7C9102BE0C0701A8102A = {
+ fileReference = 2019DBED00407EB17F000001;
+ isa = PBXFileBreakpoint;
+ lineNumber = 39;
+ state = 1;
+ };
+ F55C7C9202BE0C0701A8102A = {
+ fileReference = 2019DBED00407EB17F000001;
+ isa = PBXFileBreakpoint;
+ lineNumber = 45;
+ state = 1;
+ };
+ F55C7C9302BE0C0701A8102A = {
+ fileReference = 2019DBED00407EB17F000001;
+ isa = PBXFileBreakpoint;
+ lineNumber = 51;
+ state = 1;
+ };
+ F55C7C9402BE0C0701A8102A = {
+ fileReference = 2019DBED00407EB17F000001;
+ isa = PBXFileBreakpoint;
+ lineNumber = 57;
+ state = 1;
+ };
F56429A802B6AFB501A8102A = {
fileReference = F5EC8A8A024D479B01A8102A;
isa = PBXFileBreakpoint;
- lineNumber = 61;
+ lineNumber = 76;
state = 2;
};
F56429A902B6AFC901A8102A = {
fileReference = F5EC8A8A024D479B01A8102A;
isa = PBXFileBreakpoint;
- lineNumber = 68;
+ lineNumber = 83;
state = 2;
};
F56579AC0178F13401A8102A = {
@@ -356,6 +400,7 @@
F5725DD30180CD7F01A8102A,
F5725DD40180CD7F01A8102A,
F58324A501986CF301A8102A,
+ F53EA57C02BD37C501A8102A,
);
isa = PBXBookmarkGroup;
name = Root;
@@ -442,30 +487,6 @@
lineNumber = 33;
state = 1;
};
- F593BAA60250A6F301A8102A = {
- fileReference = 2019DBED00407EB17F000001;
- isa = PBXFileBreakpoint;
- lineNumber = 39;
- state = 1;
- };
- F593BAA70250A6F301A8102A = {
- fileReference = 2019DBED00407EB17F000001;
- isa = PBXFileBreakpoint;
- lineNumber = 45;
- state = 1;
- };
- F593BAA80250A6F301A8102A = {
- fileReference = 2019DBED00407EB17F000001;
- isa = PBXFileBreakpoint;
- lineNumber = 51;
- state = 1;
- };
- F593BAA90250A6F301A8102A = {
- fileReference = 2019DBED00407EB17F000001;
- isa = PBXFileBreakpoint;
- lineNumber = 57;
- state = 1;
- };
F59D0B7F0242408801A8102A = {
fileReference = 1469DA880064975E7F000001;
isa = PBXFileBreakpoint;
@@ -489,6 +510,11 @@
};
};
F59D0B8D0242A34301A8102A = {
+ activeExec = 0;
+ customExecs = {
+ };
+ };
+ F5A0F91C02BA93F5018043A9 = {
activeExec = 0;
customExecs = {
};
Index: project.pbxproj
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/JabberFoX.pbproj/project.pbxproj,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- project.pbxproj 24 Mar 2002 01:03:43 -0000 1.3
+++ project.pbxproj 20 Jun 2002 16:53:53 -0000 1.4
@@ -925,6 +925,7 @@
2BA05E0200A0EF787F000001,
0198BF260095ABC67F000001,
010DB9A00062A15D7F000001,
+ F5A0F92202BA945C018043A9,
061769760065655A7F000001,
0187EC4D008E65E47F000001,
10C1D9600062ED497F000001,
@@ -1460,6 +1461,7 @@
2BA05E2B00A109317F000001,
01AA961F009CADDA7F000001,
01AA961B009CADDA7F000001,
+ F53EA57D02BD3A5001A8102A,
01AA9618009CADDA7F000001,
01AA961E009CADDA7F000001,
01AA961A009CADDA7F000001,
@@ -2031,6 +2033,7 @@
2BA05E2A00A104987F000001,
037AB25D0095B7537F000001,
0430D2B000911E007F000001,
+ F5A0F92B02BA9B3A018043A9,
0430D2B300911E007F000001,
0430D2B500911E007F000001,
0430D2B100911E007F000001,
@@ -3189,6 +3192,7 @@
F5DA5C68019427DD01A8102A,
F5FB052901EAB3D201562867,
F59D0B8C0242A34201A8102A,
+ F5A0F91B02BA93F4018043A9,
);
isa = PBXGroup;
name = Products;
@@ -3501,6 +3505,7 @@
F59D0B8D0242A34301A8102A,
F5773C43017A2C3A01A8102A,
F5773C46017A2E5201A8102A,
+ F5A0F91C02BA93F5018043A9,
);
};
29B97314FDCFA39411CA2CEA = {
@@ -3623,6 +3628,7 @@
WRAPPER_EXTENSION = app;
};
dependencies = (
+ F53EA57E02BD3BC601A8102A,
);
isa = PBXApplicationTarget;
name = JabberFoX;
@@ -5118,6 +5124,49 @@
path = Browser.JFoXPlugin;
refType = 3;
};
+ F53EA57502BCF99C01A8102A = {
+ isa = PBXFileReference;
+ path = MessageDB.h;
+ refType = 4;
+ };
+ F53EA57602BCF99C01A8102A = {
+ isa = PBXFileReference;
+ path = MessageDB.m;
+ refType = 4;
+ };
+ F53EA57702BCF99D01A8102A = {
+ fileRef = F53EA57502BCF99C01A8102A;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F53EA57802BCF99D01A8102A = {
+ fileRef = F53EA57602BCF99C01A8102A;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F53EA57A02BD34D101A8102A = {
+ isa = PBXFileReference;
+ path = unread.tiff;
+ refType = 4;
+ };
+ F53EA57B02BD34D201A8102A = {
+ fileRef = F53EA57A02BD34D101A8102A;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F53EA57D02BD3A5001A8102A = {
+ fileRef = F5A0F91B02BA93F4018043A9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F53EA57E02BD3BC601A8102A = {
+ isa = PBXTargetDependency;
+ target = F5A0F91C02BA93F5018043A9;
+ };
F5418325018CC87701A8102A = {
children = (
F5418326018CC87701A8102A,
@@ -7118,6 +7167,179 @@
name = German;
path = German.lproj/Localizable.strings;
refType = 4;
+ };
+ F5A0F91B02BA93F4018043A9 = {
+ isa = PBXBundleReference;
+ path = MsgHistory.JFoXPlugin;
+ refType = 3;
+ };
+ F5A0F91C02BA93F5018043A9 = {
+ buildPhases = (
+ F5A0F91D02BA93F5018043A9,
+ F5A0F91E02BA93F5018043A9,
+ F5A0F91F02BA93F5018043A9,
+ F5A0F92002BA93F5018043A9,
+ F5A0F92102BA93F5018043A9,
+ );
+ buildSettings = {
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-bundle -flat_namespace -undefined suppress";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = MsgHistory;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ WRAPPER_EXTENSION = JFoXPlugin;
+ };
+ dependencies = (
+ );
+ isa = PBXBundleTarget;
+ name = "MsgHistory (Plugin)";
+ productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
+ productName = MsgHistor;
+ productReference = F5A0F91B02BA93F4018043A9;
+ productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\">
+<plist version=\"0.9\">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>MsgHistory</string>
+ <key>CFBundleGetInfoString</key>
+ <string></string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string></string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string></string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string></string>
+ <key>CFBundleSignature</key>
+ <string>JFoX</string>
+ <key>CFBundleVersion</key>
+ <string>0.1</string>
+ <key>NSMainNibFile</key>
+ <string>MsgHistory</string>
+ <key>NSPrincipalClass</key>
+ <string>JFPMsgHistory</string>
+</dict>
+</plist>
+";
+ shouldUseHeadermap = 0;
+ };
+ F5A0F91D02BA93F5018043A9 = {
+ buildActionMask = 2147483647;
+ files = (
+ F5A0F92902BA991B018043A9,
+ F53EA57702BCF99D01A8102A,
+ );
+ isa = PBXHeadersBuildPhase;
+ name = Headers;
+ };
+ F5A0F91E02BA93F5018043A9 = {
+ buildActionMask = 2147483647;
+ files = (
+ F5A0F92602BA95C6018043A9,
+ F53EA57B02BD34D201A8102A,
+ );
+ isa = PBXResourcesBuildPhase;
+ name = "Bundle Resources";
+ };
+ F5A0F91F02BA93F5018043A9 = {
+ buildActionMask = 2147483647;
+ files = (
+ F5A0F92A02BA991B018043A9,
+ F53EA57802BCF99D01A8102A,
+ );
+ isa = PBXSourcesBuildPhase;
+ name = Sources;
+ };
+ F5A0F92002BA93F5018043A9 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ name = "Frameworks & Libraries";
+ };
+ F5A0F92102BA93F5018043A9 = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXRezBuildPhase;
+ name = "ResourceManager Resources";
+ };
+ F5A0F92202BA945C018043A9 = {
+ children = (
+ F5A0F92302BA945C018043A9,
+ F5A0F92702BA991A018043A9,
+ F5A0F92802BA991A018043A9,
+ F53EA57502BCF99C01A8102A,
+ F53EA57602BCF99C01A8102A,
+ );
+ isa = PBXGroup;
+ path = MsgHistory;
+ refType = 4;
+ };
+ F5A0F92302BA945C018043A9 = {
+ children = (
+ F53EA57A02BD34D101A8102A,
+ F5A0F92402BA95C5018043A9,
+ );
+ isa = PBXGroup;
+ path = Resources;
+ refType = 4;
+ };
+ F5A0F92402BA95C5018043A9 = {
+ children = (
+ F5A0F92502BA95C5018043A9,
+ );
+ isa = PBXVariantGroup;
+ name = MsgHistory.nib;
+ path = "";
+ refType = 2;
+ };
+ F5A0F92502BA95C5018043A9 = {
+ isa = PBXFileReference;
+ name = English;
+ path = Plugins/MsgHistory/Resources/English.lproj/MsgHistory.nib;
+ refType = 4;
+ };
+ F5A0F92602BA95C6018043A9 = {
+ fileRef = F5A0F92402BA95C5018043A9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F5A0F92702BA991A018043A9 = {
+ isa = PBXFileReference;
+ path = JFPMsgHistory.h;
+ refType = 4;
+ };
+ F5A0F92802BA991A018043A9 = {
+ isa = PBXFileReference;
+ path = JFPMsgHistory.m;
+ refType = 4;
+ };
+ F5A0F92902BA991B018043A9 = {
+ fileRef = F5A0F92702BA991A018043A9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F5A0F92A02BA991B018043A9 = {
+ fileRef = F5A0F92802BA991A018043A9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F5A0F92B02BA9B3A018043A9 = {
+ isa = PBXTargetDependency;
+ target = F5A0F91C02BA93F5018043A9;
};
F5A95BBC00CCF6C701000001 = {
isa = PBXFileReference;
|
|
From: Max H. <fin...@us...> - 2002-06-20 16:54:26
|
Update of /cvsroot/jabberfox/JabberFoX2 In directory usw-pr-cvs1:/tmp/cvs-serv2774 Modified Files: ChangeLog Log Message: added new MsgHistory plugin Index: ChangeLog =================================================================== RCS file: /cvsroot/jabberfox/JabberFoX2/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ChangeLog 20 Jun 2002 14:16:32 -0000 1.7 +++ ChangeLog 20 Jun 2002 16:53:53 -0000 1.8 @@ -1,4 +1,8 @@ 2002-06-18 Max Horn <ma...@qu...> + * MsgHistory(Plugin): new plugin; keeps persistant storage of all received + messages; very very beta so far, but the core features are usable. + * Roster(Plugin): you can now drag&drop roster items between groups + * JFTableView: forward delete/backspace key presses to delegate * JabberParser: some cleanup * XML classes: implemented NSCoding protocol |
|
From: Max H. <fin...@us...> - 2002-06-20 16:54:02
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory
In directory usw-pr-cvs1:/tmp/cvs-serv2774/Plugins/MsgHistory
Added Files:
JFPMsgHistory.h JFPMsgHistory.m MessageDB.h MessageDB.m
Log Message:
added new MsgHistory plugin
--- NEW FILE ---
//
// $Id: JFPMsgHistory.h,v 1.1 2002/06/20 16:53:54 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Fri Jun 14 2002.
// Copyright (c) 2002 JabberFoX team. All rights reserved.
//
#import <AppKit/AppKit.h>
#import "Globals.h"
#import "JFoXPlugin.h"
#import "JServicePlugin.h"
@class MessageDB;
@interface JFPMsgHistory : JFoXPlugin <JServicePlugin>
{
IBOutlet NSView *bottomSplitView;
IBOutlet NSTableView *msgTable;
IBOutlet NSTextField *msgFrom;
IBOutlet NSTextField *msgDate;
IBOutlet NSTextField *msgTo;
IBOutlet NSTextField *msgSubject;
IBOutlet NSTextView *msgBody;
MessageDB *messageDB;
NSImage *unreadImage;
}
@end
--- NEW FILE ---
//
// $Id: JFPMsgHistory.m,v 1.1 2002/06/20 16:53:54 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Fri Jun 14 2002.
// Copyright (c) 2002 JabberFoX team. All rights reserved.
//
#import "JFPMsgHistory.h"
#import "Jabber.h"
#import "MessageDB.h"
#import "NSAttributedString+XHTML.h"
#import "NSTextView+URL.h"
@interface JFPMsgHistory (Private)
- (void)displayMessage:(JPacket *)msg;
- (void)resetDisplay;
@end
@implementation JFPMsgHistory
- init
{
if (self = [super init])
{
NSString *path;
path = [[NSBundle bundleForClass:[self class]] pathForImageResource:@"unread"];
unreadImage = [[NSImage alloc] initWithContentsOfFile:path];
messageDB = [[MessageDB alloc] init];
[NSBundle loadNibNamed:@"MsgHistory" owner:self];
}
return self;
}
- (void)awakeFromNib
{
NSTableColumn *column;
NSImageCell *imageCell;
column = [msgTable tableColumnWithIdentifier: @"FlagColumn"];
imageCell = [[NSImageCell alloc] init];
[column setDataCell:imageCell];
[imageCell release];
[self resetDisplay];
// [msgTable reloadData];
}
- (void)dealloc
{
[unreadImage release];
[messageDB release];
[super dealloc];
}
////////////////////////////////////////////////////////////
// JFoXPlugin overridden methods
- (void)attachToController:(FoXController *)newController
{
[super attachToController:newController];
[js attachPlugin:self];
}
- (void)detachFromController:(FoXController *)newController
{
[js detachPlugin:self];
[super detachFromController:newController];
}
///////////////////////////////////////////
// JServicePlugin compliance
// Handling messages
- (void) handleMessage:(JPacket *)msg
{
NSString *type;
type = [msg attributeWithName:@"type"];
if (!STR_EQUAL(type, @"chat") &&
!STR_EQUAL(type, @"groupchat") &&
!STR_EQUAL(type, @"headline"))
{
[messageDB addMessage:msg];
[msgTable noteNumberOfRowsChanged];
}
}
- (void) handlePresence:(JPacket *)msg
{
}
- (void) handleIQ:(JPacket *)msg
{
}
// Called when a plug-in is added, so it can
// setup which messages it wants to listen to and such
- (void) attachTo:(JabberService *)service
{
[js requestMessageMsgs:self];
}
- (void) detachFrom:(JabberService *)service
{
[js refuseMessageMsgs:self];
}
// Give plugins to do stuff as soon as the user is logged in
// and/or connected
- (void) whenConnected
{
}
- (void) whenLoggedIn
{
}
- (void) whenDisconnecting
{
}
- (NSString *)pluginName
{
return @"MsgHistory";
}
#pragma mark ÑÑ NSSplitView delegate methods
- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview
{
return (subview == bottomSplitView);
}
- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset
{
return 100.0;
}
- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset
{
int height = [sender frame].size.height;
return height - 120.0;
}
#pragma mark ÑÑ NSTableView delegate methods
- (int)numberOfRowsInTableView:(NSTableView *)tableView
{
return [messageDB messageCount];
}
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
NSString *identifier = [tableColumn identifier];
JPacket *msg = [messageDB messageAtIndex:row];
if ([identifier isEqual:@"FlagColumn"])
{
return ([msg attributeWithName:@"was_read"] == nil) ? unreadImage : nil;
}
else if ([identifier isEqual:@"SenderColumn"])
{
return [msg attributeWithName:@"from"];
}
else if ([identifier isEqual:@"DateColumn"])
{
return [NSString localizedStringWithFormat:@"%@", [msg timestamp]];
}
else if ([identifier isEqual:@"SubjectColumn"])
{
return [[msg elementWithName:@"subject"] cdata];
}
return nil;
}
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
if ([aNotification object] == msgTable)
{
if ([msgTable numberOfSelectedRows] == 1)
{
int row = [msgTable selectedRow];
JPacket *msg = [messageDB messageAtIndex:row];
[self displayMessage:msg];
// Mark as read
if ([msg attributeWithName:@"was_read"] == nil)
{
[msg addAttribute:@"was_read" withValue:@"true"];
[msgTable drawRow:row clipRect:[msgTable frame]];
}
}
else
[self resetDisplay];
}
}
/*
- (BOOL)tableView:(NSTableView *)tableView shouldSelectTableColumn:(NSTableColumn *)tableColumn
{
return NO;
}
*/
- (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn
{
NSTableColumn *oldColumn = [tableView highlightedTableColumn];
// // Update the indicator image
// [self removeAllHeaderImages];
if (oldColumn != tableColumn)
// Selected column changed, so don't change the sort direction, but highlight new column
[tableView setHighlightedTableColumn: tableColumn];
#if 0
else
// Same column, so only change sort direction
sortAscending = !sortAscending;
[self displayHeaderImage:tableColumn];
// Finally, sort the data
[self sortData];
#endif
}
@end
@implementation JFPMsgHistory (Private)
- (void)displayMessage:(JPacket *)msg
{
XMLElementNode *temp;
[msgFrom setStringValue:[msg attributeWithName:@"from"]];
[msgTo setStringValue:[msg attributeWithName:@"to"]];
// Determine the subject of the message (if any)
temp = [msg elementWithName:@"subject"];
if (temp)
[msgSubject setStringValue:[temp cdata]];
else
[msgSubject setStringValue:@""];
// To be able to display the time the message was sent, analyse the timestamping information.
[msgDate setStringValue:[NSString localizedStringWithFormat:@"%@", [msg timestamp]]];
// Check if this message contains styled data
temp = [msg elementWithName:@"html"];
if (STR_EQUAL([temp attributeWithName:@"xmlns"], @"http://www.w3.org/1999/xhtml"))
{
// We found XHTML, let's render & display it
[[msgBody textStorage] setAttributedString:[NSAttributedString attributedStringWithXHTML:temp]];
[msgBody urlifyText];
[msgBody display];
}
else
{
temp = [msg elementWithName:@"body"];
if (temp)
{
[msgBody setString:[temp cdata]];
[msgBody urlifyText];
[msgBody display];
}
}
}
- (void)resetDisplay
{
[msgFrom setStringValue:@"-"];
[msgDate setStringValue:@"-"];
[msgTo setStringValue:@"-"];
[msgSubject setStringValue:@"-"];
[msgBody setString:@""];
}
- (void)delete:(id)sender
{
NSEnumerator *enumerator = [msgTable selectedRowEnumerator];
int row;
// A little trick to convert the enumerator into a reverse enumerator
// We need to remove the indices from last to first, otherwise the indices
// are changed when we remove an object before we remove its successor.
enumerator = [[enumerator allObjects] reverseObjectEnumerator];
// remove all selected jobs
while(( row = [[enumerator nextObject] intValue]) )
{
[messageDB removeMessageAtIndex:row];
}
[msgTable deselectAll:self];
[msgTable reloadData];
}
@end
--- NEW FILE ---
//
// $Id: MessageDB.h,v 1.1 2002/06/20 16:53:54 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Sun Jun 16 2002.
// Copyright (c) 2002 JabberFoX team. All rights reserved.
//
#import <Foundation/Foundation.h>
@class JPacket;
@interface MessageDB : NSObject
{
NSMutableArray *messageList;
}
- (void)addMessage:(JPacket *)msg;
- (int)messageCount;
- (JPacket *)messageAtIndex:(int)index;
- (void)removeMessageAtIndex:(unsigned)index;
@end
/*
* add code to make DB persistant
-> store all messages from "fo...@ba..." into file bar.org/foo.xml
* make sure to save the timestamp, too -> add x:delay ?
* allow sorting
* fix the "unread" icon -> it is only removed after a redraw, not immediatly
when the message is shown
* add way to reply to a msg. maybe a toolbar button? Open seperate "compose message" window, or use a drawer?
*/
--- NEW FILE ---
//
// $Id: MessageDB.m,v 1.1 2002/06/20 16:53:54 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Sun Jun 16 2002.
// Copyright (c) 2002 JabberFoX team. All rights reserved.
//
#import "MessageDB.h"
#import "JPacket.h"
static int ensureDirExists(NSString *dir);
@interface MessageDB (Private)
- (BOOL)readFromDisk;
- (BOOL)writeToDisk;
@end
@implementation MessageDB
- init
{
if (self = [super init])
{
messageList = [[NSMutableArray alloc] init];
[self readFromDisk];
}
return self;
}
- (void)dealloc
{
[messageList release];
[super dealloc];
}
- (void)addMessage:(JPacket *)msg
{
[messageList addObject:msg];
[self writeToDisk];
}
- (int)messageCount
{
return [messageList count];
}
- (JPacket *)messageAtIndex:(int)index
{
return [messageList objectAtIndex:index];
}
- (void)removeMessageAtIndex:(unsigned)index
{
[messageList removeObjectAtIndex:index];
}
- (BOOL)readFromDisk
{
// Read in the message history if available
NSMutableArray *newMssageList;
NSString *path = [@"~/Library/JabberFoX/MsgArchive" stringByExpandingTildeInPath];
newMssageList = [NSUnarchiver unarchiveObjectWithFile:path];
if (newMssageList)
{
[messageList release];
messageList = [newMssageList mutableCopy];
return YES;
}
return NO;
}
- (BOOL)writeToDisk
{
// For now just spool everything to a single file using NSCoding
// In the future, we might want to zlib compress the data.
// Or we might want to keep a seperate .xml file for each contact, e.g.
// store all message from fo...@ba... in ~/Library/JabberFoX/spool/bar.org/foo.xml
BOOL result;
NSString *path = [@"~/Library/JabberFoX/MsgArchive" stringByExpandingTildeInPath];
ensureDirExists([path stringByDeletingLastPathComponent]);
result = [NSArchiver archiveRootObject:messageList toFile:path];
return result;
/* // The record for a message by fo...@ba... goes into bar.org/foo.xml
// All is stored in ~/Library/JabberFoX/spool/
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSEnumerator *enumerator;
JPacket *msg;
JabberID *jid;
NSData *data;
NSString *filename, *server;
NSFileHandle *file;
// Dictionary that maps JIds -> NSStrings of all message XML from that sender
NSMutableDictionary *senderXMLDict;
ensureDirExists(@"~/Library/");
ensureDirExists(@"~/Library/JabberFoX/");
ensureDirExists(@"~/Library/JabberFoX/spool/");
senderXMLDict = [[NSMutableDictionary alloc] init];
//[msg stringValueEscaped:YES]]
// First collect the message data for each contact (so that we don't
// have to open files more than once.
enumerator = [messageList objectEnumerator];
while ((msg = [enumerator nextObject]))
{
}
// Now write out all of the data
enumerator = [senderXMLDict keyEnumerator];
while ((jid = [enumerator nextObject]))
{
server = [jid server];
filename = [@"~/Library/JabberFoX/spool/" stringByAppendingString:server];
data = [[senderXMLDict objectForKey:jid] dataUsingEncoding:NSUTF8StringEncoding];
[file writeData:data];
}
// Cleanup
[senderXMLDict release];
[pool release];
*/
}
@end
int ensureDirExists(NSString *dir)
{
// TODO ...
}
|
|
From: Max H. <fin...@us...> - 2002-06-20 16:54:02
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory/Resources In directory usw-pr-cvs1:/tmp/cvs-serv2774/Plugins/MsgHistory/Resources Added Files: unread.tiff Log Message: added new MsgHistory plugin --- NEW FILE --- MM ü ü |
|
From: Max H. <fin...@us...> - 2002-06-20 16:54:02
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory/Resources/English.lproj/MsgHistory.nib
In directory usw-pr-cvs1:/tmp/cvs-serv2774/Plugins/MsgHistory/Resources/English.lproj/MsgHistory.nib
Added Files:
classes.nib info.nib objects.nib
Log Message:
added new MsgHistory plugin
--- NEW FILE ---
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
CLASS = JFPMsgHistory;
LANGUAGE = ObjC;
OUTLETS = {
bottomSplitView = NSView;
msgBody = NSTextView;
msgDate = NSTextField;
msgFrom = NSTextField;
msgSubject = NSTextField;
msgTable = NSTableView;
msgTo = NSTextField;
};
SUPERCLASS = JFoXPlugin;
},
{CLASS = JFTableView; LANGUAGE = ObjC; SUPERCLASS = NSTableView; },
{CLASS = JFoXPlugin; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = NSObject; LANGUAGE = ObjC; }
);
IBVersion = 1;
}
--- NEW FILE ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>153 518 356 240 0 0 1280 1002 </string>
<key>IBFramework Version</key>
<string>248.0</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>5S60</string>
</dict>
</plist>
--- NEW FILE ---
typedstreamè@NSIBObjectData
NSClipView:¤
FlagColumnNSTableHeaderCellNSTextFieldCell=NSActionCellNSCellAiiþ
San CarlosÆ
»
DateColumn
èÁ¶þ
NSScroller
ä
ª´NSCursor®ûNSCustomResource)NSImage
NSIBeamCursor¬
§
¾
§
¾?rC¿¬¬
ì
þNSTextField Message Historyô
NSTextField31ÑNSTableColumn1½
NSTableColumnîNSTextField2File's Owner¤
NSScrollView1NSTextField1ªNSTableViewNSTextField4
NSTextView÷NSTextField3
NSScrollView2
NSTextField51úNSTextField5NSMutableSet
NSNibOutletConnector
dataSource;ªdelegate;ªmsgTable;bottomSplitView;delegate;msgBody;ômsgDate;msgFrom;÷
msgSubject;îmsgTo
@i'Ó¤,Ó)ÓJ=ÓD7Óþ%Ó(Ó:0Ó½+ÓÓî Óú$Ó9ÓF;ÓL>Ó/ÓÞ6Ó÷#ÓÑ.Ó
8Óô"Ó×5Ó&ÓH<ÓÓ@3Ó>1ÓN?ÓB4Ó Óª-Óì*@ª¬IBCocoaFramework
|
|
From: Max H. <fin...@us...> - 2002-06-20 16:50:41
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory/Resources/English.lproj/MsgHistory.nib In directory usw-pr-cvs1:/tmp/cvs-serv1833/MsgHistory.nib Log Message: Directory /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory/Resources/English.lproj/MsgHistory.nib added to the repository |
|
From: Max H. <fin...@us...> - 2002-06-20 16:50:16
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory/Resources/English.lproj In directory usw-pr-cvs1:/tmp/cvs-serv1679/English.lproj Log Message: Directory /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory/Resources/English.lproj added to the repository |
|
From: Max H. <fin...@us...> - 2002-06-20 16:49:51
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory/Resources In directory usw-pr-cvs1:/tmp/cvs-serv1519/Resources Log Message: Directory /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory/Resources added to the repository |
|
From: Max H. <fin...@us...> - 2002-06-20 16:49:35
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory In directory usw-pr-cvs1:/tmp/cvs-serv1298/MsgHistory Log Message: Directory /cvsroot/jabberfox/JabberFoX2/Plugins/MsgHistory added to the repository |
|
From: Max H. <fin...@us...> - 2002-06-20 16:47:07
|
Update of /cvsroot/jabberfox/JabberFoX2/Shared/GUI
In directory usw-pr-cvs1:/tmp/cvs-serv764/Shared/GUI
Modified Files:
JFTableView.m
Log Message:
JFTableView: forward delete/backspace key presses to delegate
Index: JFTableView.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Shared/GUI/JFTableView.m,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- JFTableView.m 23 Mar 2002 12:43:23 -0000 1.1.1.1
+++ JFTableView.m 20 Jun 2002 16:47:03 -0000 1.2
@@ -1,5 +1,5 @@
//
-// $Id: JFTableView.m,v 1.1.1.1 2002/03/23 12:43:23 fingolfin Exp $
+// $Id: JFTableView.m,v 1.2 2002/06/20 16:47:03 fingolfin Exp $
// JabberFoX
//
// Created by Max Horn on Fri Mar 15 2002.
@@ -100,6 +100,34 @@
return [self menu];
}
+/*
+ * Inctercept keypresses for backspace & delete and forward them to our delegate
+ */
+- (void)keyDown:(NSEvent *)theEvent
+{
+ NSString *chars;
+ unsigned len;
+ unsigned i;
+ unichar c;
+
+ chars = [theEvent charactersIgnoringModifiers];
+ len = [chars length];
+ for(i=0; i<len; i++)
+ {
+ c = [chars characterAtIndex:i];
+ switch(c)
+ {
+ case NSDeleteCharacter:
+ case NSDeleteFunctionKey:
+ if ([[self delegate] respondsToSelector:@selector(delete:)])
+ {
+ [[self delegate] delete:self];
+ return;
+ }
+ }
+ }
+ [super keyDown:theEvent];
+}
@end
|
|
From: Max H. <fin...@us...> - 2002-06-20 16:46:28
|
Update of /cvsroot/jabberfox/JabberFoX2/Plugins/Roster
In directory usw-pr-cvs1:/tmp/cvs-serv565
Modified Files:
JPRoster.h JPRoster.m RosterOutlineSource.m
Log Message:
Roster(Plugin): you can now drag&drop roster items between groups
Index: JPRoster.h
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Plugins/Roster/JPRoster.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- JPRoster.h 11 Jun 2002 22:28:15 -0000 1.2
+++ JPRoster.h 20 Jun 2002 16:46:15 -0000 1.3
@@ -1,5 +1,5 @@
//
-// $Id: JPRoster.h,v 1.2 2002/06/11 22:28:15 fingolfin Exp $
+// $Id: JPRoster.h,v 1.3 2002/06/20 16:46:15 fingolfin Exp $
// JabberFoX
//
// Created by jsmoore on Fri Feb 16 2001.
@@ -89,8 +89,9 @@
- (JRealContact *)straglerAtIndex:(int)index;
- (int)straglerCount;
-// Meta-Function to rename contacts and groups
+// Meta-Function to rename contacts and groups etc.
- (void)renameGroup:(JGroup *)group to:(NSString *)name;
- (void)renameContact:(JRealContact *)contact to:(NSString *)name;
+- (void)moveContact:(NSString *)contact from:(NSString *)oldGroup to:(NSString *)newGroup;
@end
Index: JPRoster.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Plugins/Roster/JPRoster.m,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JPRoster.m 13 Jun 2002 23:14:15 -0000 1.3
+++ JPRoster.m 20 Jun 2002 16:46:15 -0000 1.4
@@ -1,5 +1,5 @@
//
-// $Id: JPRoster.m,v 1.3 2002/06/13 23:14:15 fingolfin Exp $
+// $Id: JPRoster.m,v 1.4 2002/06/20 16:46:15 fingolfin Exp $
// JabberFoX
//
// Created by jsmoore on Fri Feb 16 2001.
@@ -340,6 +340,43 @@
[onlineStraglers removeObject:contact];
[onlineStraglers insertObjectSorted:contact];
}
+
+ // Refresh the roster
+ [delegate refreshRoster];
+
+ // Create a roster-set message
+ msg = [JPacket packetWithName:@"iq"];
+ [msg addAttribute:@"type" withValue:@"set"];
+ query = [XMLElementNode elementWithName:@"query"];
+ [query addAttribute:@"xmlns" withValue:@"jabber:iq:roster"];
+ [msg addNode:query];
+
+ // Now add the contact to the query of the roster-set message
+ [query addNode:[contact rosterItem]];
+
+ // Fire up the message
+ [js sendMsg:msg];
+}
+
+- (void)moveContact:(NSString *)contactName from:(NSString *)oldGroup to:(NSString *)newGroup
+{
+ JPacket *msg;
+ XMLElementNode *query;
+ JRealContact *contact = [contacts objectForKey:contactName];
+
+ if (!contact || [newGroup length] <= 0)
+ return;
+
+ // If this is a stragler, remove it from the stragler array
+ if ([straglers containsObject:contact])
+ [straglers removeObject:contact];
+ if ([onlineStraglers containsObject:contact])
+ [onlineStraglers removeObject:contact];
+
+ // Remove from old group (if any) and add it to the new group
+ if (oldGroup && [oldGroup length] > 0)
+ [[self groupWithName:oldGroup] removeContact:contact];
+ [[self groupWithName:newGroup] addContact:contact];
// Refresh the roster
[delegate refreshRoster];
Index: RosterOutlineSource.m
===================================================================
RCS file: /cvsroot/jabberfox/JabberFoX2/Plugins/Roster/RosterOutlineSource.m,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RosterOutlineSource.m 17 Jun 2002 13:03:54 -0000 1.4
+++ RosterOutlineSource.m 20 Jun 2002 16:46:15 -0000 1.5
@@ -1,5 +1,5 @@
//
-// $Id: RosterOutlineSource.m,v 1.4 2002/06/17 13:03:54 fingolfin Exp $
+// $Id: RosterOutlineSource.m,v 1.5 2002/06/20 16:46:15 fingolfin Exp $
// JabberFoX
//
// Created by jsmoore on Mon Feb 19 2001.
@@ -56,6 +56,11 @@
if ([pboard availableTypeFromArray:[NSArray arrayWithObjects:RosterJIDPboardType, nil]])
{
NSLog(@"Dropped '%@' from group '%@'", [pboard stringForType:RosterJIDPboardType], [pboard stringForType:RosterGroupPboardType]);
+ if ([item isKindOfClass:[JGroup class]])
+ {
+ [roster moveContact:[pboard stringForType:RosterJIDPboardType] from:[pboard stringForType:RosterGroupPboardType] to:[item itemName]];
+ return TRUE;
+ }
}
if ([item isKindOfClass:[JGroup class]])
|