Bug 236613: change to MPL/LGPL/GPL tri-license, and other license-related fixups.

This commit is contained in:
gerv%gerv.net 2004-07-16 19:09:02 +00:00
Родитель 443fbcfa78
Коммит 7043d82836
15 изменённых файлов: 372 добавлений и 607 удалений

Просмотреть файл

@ -12,11 +12,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*

Просмотреть файл

@ -1,37 +1,47 @@
/*
* @(#)jni.h 1.26 97/01/27
*
* Copyright (c) 1993-1996 Sun Microsystems, Inc. All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for NON-COMMERCIAL purposes and without
* fee is hereby granted provided that this copyright notice
* appears in all copies.
*
* The Java source code is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You shall
* not disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
* THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*/
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Java Runtime Interface.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc. and Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 1993-1996
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* We used part of Netscape's Java Runtime Interface (JRI) as the starting
* point of our design and implementation.
*/
/******************************************************************************
* Java Runtime Interface
* Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
*****************************************************************************/
#ifndef JNI_H
#define JNI_H

Просмотреть файл

@ -1,26 +1,41 @@
/*
* @(#)jni_md.h 1.3 97/01/10
*
* Copyright (c) 1993-1996 Sun Microsystems, Inc. All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for NON-COMMERCIAL purposes and without
* fee is hereby granted provided that this copyright notice
* appears in all copies.
*
* The Java source code is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You shall
* not disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
* THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*/
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Java Runtime Interface.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 1993-1996
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef JNI_MD_H
#define JNI_MD_H

Просмотреть файл

@ -1,8 +1,39 @@
/* -*- Mode: C; tab-width: 4; -*- */
/*******************************************************************************
* Java Runtime Interface
* Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
******************************************************************************/
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Java Runtime Interface.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1996
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef JRI_H
#define JRI_H

Просмотреть файл

@ -1,8 +1,39 @@
/* -*- Mode: C; tab-width: 4; -*- */
/*******************************************************************************
* Java Runtime Interface - Machine Dependent Types
* Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
******************************************************************************/
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Java Runtime Interface.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 1996
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef JRI_MD_H
#define JRI_MD_H

Просмотреть файл

@ -1,8 +1,39 @@
/* -*- Mode: C; tab-width: 4; -*- */
/*******************************************************************************
* Java Runtime Interface
* Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
******************************************************************************/
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Java Runtime Interface.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 1996
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef JRITYPES_H
#define JRITYPES_H

Просмотреть файл

@ -1,15 +1,40 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
**HERE
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are Copyright 1999 Robert G. Ginda,
* rginda@ndcico.com. This program may be freely copied and modified for
* non-commercial use, provided everything between HERE and THERE appears
* in the copy.
* If you have questions, comments or suggestions direct them to
* rginda@ndcico.com.
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
**THERE
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Robert Ginda's code.
*
* The Initial Developer of the Original Code is
* Robert G. Ginda.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* depends on utils.js, and the connection-*.js implementations.
*
* loads an appropriate connection implementation, or dies trying.

Просмотреть файл

@ -1,227 +0,0 @@
TransforMiiX (TM)
(C) Copyright 1999, 2000, The MITRE Corporation, Keith Visco, et al. All rights reserved.
Note: The changes listed here mainly reflect the core XSLT processor and
the standalone version.
Build 20000906
-- Fixed UTF8 bug
- reported by Steve Tinney (stinney@sas.upenn.edu)
-- Updated Expat for standalone version
Build 20000725
-- Windows Makefiles are up to date to create Mozilla module
- thanx to Arthur Barrett and Justin Smith
Build 20000722
-- Fixed leading + trailing whitspace when printing comments
- reported by Jeff Bailey
-- Fixed bug in ExprLexer caused by a previous patch
- The prevToken was being set to NULL, in cases when
it shouldn't have been
- discovered when looking for an error reported by
Bernhard Zwischenbrugger
Build 20000618
-- Added changes from Olivier Gerardin for improved
handling of template parameters
Build 20000523
-- Added fix from Marc Schefer regarding OR expressions
- If the left hand expression was false...the right
hand expression was not evaluated (which should
only happen if the expression is an AND expr).
-- Added support for document() function
- implemented by Olivier Gerardin
- The second argument to the function is not yet supported
-- Added support for lang() function
- implemented by Marina Mechtcherikova
-- Fixed bug with doing xsl:copy-of on a document node.
- reported by Olivier Gerardin
Build 20000420
-- Fixed document base issue with transfromiix.cpp (Nathan)
- When an XSLT stylesheet is specified on the command line
the document base was still defaulting to the XML document,
instead of the stylesheet
-- Fixed bug in namespace-uri() function [NodeSetFunctionCall.cpp] - Marina
- If an expression was passed as an argument to the function,
which evaluated to an empty NodeSet, the context node was being
used, which is incorrect. We now just return an empty string.
-- Fixed bug in PathExpr::matches (Marina)
- expressions such as "foo//bar" would not always match
properly if more than one node existed in the final
set of "matching context nodes" (so basically if foo
was not the root element).
Build 20000419
-- Added the generate-id function
-- Added XPath Extension Function support
Build 20000413
-- Added some bug fixes from Marina
-- fixed parsing of multiple predicates
-- added support to handle attribute-set recursion
-- added appropriate calls to handle use-attribute-sets on xsl:copy
Build 20000412
-- Fixed the following Axes names in Names.cpp so that
the are compatible with the XSLT 1.0 recommendation (Marina)
-- FOLLOWING_SIBLING_AXIS - removed the trailing s
-- PRECEDING_SIBLING_AXIS - removed the trailing s
-- Added support for xsl:sort (kvisco)
-- simple sorting is working...documentation to follow
-- Added StringComparator and DefaultStringComparator
-- we need some more comparators for I18N support
-- Did some directory structure changes
- source/xsl is now source/xslt
- source/xsl/expr is now source/xpath
-- Changed xslt/XSLProcessor.* to XSLTProcessor.*
-- Incorporated some changes from Olivier Gerardin for the Expat parser
Build 20000331
-- Fixed a memory leak with translate() function (kvisco)
-- StringFunctionCall.cpp
-- Updated the necessary source files to support the changes to
the String class (kvisco)
-- Overloaded String::toCharArray to automatically create the
character array (tomk)
-- Changed String::toChar to String::toCharArray (tomk)
Build 20000327
-- Fixed "dot" bug in CNAME parsing (ExprLexer.cpp) reported by Nathan Pride
Build 20000326
-- Added Peter Van der Beken's changes to net/URIUtils for integration
within Mozilla
-- Added Marina Mechtcheriakova's changes to xml/parser/XMLParser.cpp to fix
a Unicode bug in ::startElement. Instead of improperly casting char*
as DOM_CHAR*, the proper String constructor, String(char*) is used
Build 20000322
-- Added Unicode bug fix from Lidong
Build 20000318
-- Added Olivier's implementation of the XPath Number functions
-- Added missing prototype to TxString.h (Peter Van der Beken)
Build 20000222
-- Added Attribute parent mapping since DOM 1.0 doesn't support it
-- Added default sorting of NodeSet by DocumentOrder
-- yes this is a hint that xsl:sort is will be available soon
Build 20000218
-- Fixed bug reported by Thiery Le Bouil, xsl:param was getting
processed, and then treated as a literal element
Build 20000217
-- Changed StringList#iterator to return a pointer instead of a reference
-- Added patches from Eric Du for FreeBSD, sorry for the delay in committing these
Build 20000216
-- Fixed bug with using wildcards directly after the parent operator, such as "/*"
-- Fixed bug with PredicateList#isEmpty which was returning the opposite of the
expected value.
-- this also caused default priorities to be incorrectly calculated.
Build 19991110
-- fixed bug with PathExpr and LocationStep with respect
to the ::match method
-- problem reported by Oblix
-- Added support for xsl:include (only file URLs will work)
-- fixed the built-in xsl:apply-templates rule to handle text nodes
-- moved code base to Linux platform for default development environment
Build 19990818
-- Added very simple support for xsl:number
-- Added support for xsl:with-param
-- Added more XPath support
-- added operator precedence
-- added and, or, <,<=,>=,>
Build 19990816
-- Changed focus from 19990709 to 19990813 XSLT Working Draft
-- Made some changes for Borland C compatibility
-- submitted by Stefan Heesch
-- added xsl:copy-of
-- fixed a bug with DOM Element, to allow DocumentFragments as children
Build 19990813
-- added new example: identity.xml/xsl which tests:
-- xsl:copy, node()
-- added comment(), pi(), and node()
-- XMLParser still needs to handle reading in XML comments
-- added xsl:copy
-- added xsl:processing-instruction
-- added xsl:comment
Build 19990812
-- Created base/Double.cpp (primitives.h)
-- Based off some code submitted by Larry Fitzpatrick, changed Name from
FloatPort to Double, I wanted to add more Double related methods
-- changed the NaN() method to just a static double
-- All expr classes now use Double::isNaN() and Double::NaN
-- I added Double::isInfinite, Double::POSITIVE_INFINITY and
Double::NEGATIVE_INFINITY
-- Added base/Integer.cpp back into Makefile
-- added Integer::toString(int,String);
-- changed implementation
-- Moved code to convert from Strings to doubles and from doubles to Strings
into the Double class
-- removed testdom.cpp from xml/dom
-- Added more changes from Larry Fitzpatrick and Michele Lee for
porting issues
-- added appropriate return values for:
-- xml/dom/Element.cpp
-- xml/dom/NodeDefinition.cpp
-- base/StringList.cpp
-- xsl/expr/PredicateList.cpp
-- Added remaining String Function Calls
-- substring(), substring-after(), substring-before(), translate(),
string-length()
Build 19990810
-- Added most of the Whitespace handling
-- Added ErrorObserver interface
-- ErrorObserver is now used throughout most of the code
-- Added SimpleErrorObserver implementation of ErrorObserver
-- Moved main() method from XSLProcessor.cpp to tranformiix.cpp
-- Added the following XPath functions:
-- local-part(), name(), namespace()
-- see functions.xml/functions.xsl for available functions
Build 19990806
-- Incoporated Changes From Larry Fitzpatrick
-- Added more XPath functions
-- last(), count(), string(), contains(), starts-with(), concat()
-- see functions.xml/functions.xsl for available functions
-- Added xsl:text support

Просмотреть файл

@ -1,20 +1,38 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../..
topsrcdir = @top_srcdir@

Просмотреть файл

@ -1,4 +1,38 @@
/* Insert copyright and license here 1995 */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 1995
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsUint8Array_H_
#define _nsUint8Array_H_

Просмотреть файл

@ -1,22 +1,41 @@
/*
* @(#)jni.h 1.48 00/02/02
*
* Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
*/
/*
* We used part of Netscape's Java Runtime Interface (JRI) as the starting
* point of our design and implementation.
*/
/******************************************************************************
* Java Runtime Interface
* Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
*****************************************************************************/
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Java Runtime Interface.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc. and Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 1996-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _JAVASOFT_JNI_H_
#define _JAVASOFT_JNI_H_

Просмотреть файл

@ -1,12 +1,41 @@
/*
* @(#)jni_md.h 1.12 00/02/02
*
* Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
*/
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Java Runtime Interface.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 1996-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_

Просмотреть файл

@ -1,186 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* We need this because Solaris' version of qsort is broken and
* causes array bounds reads.
*/
#include <stdlib.h>
#include "prtypes.h"
#include "nsQuickSort.h"
PR_BEGIN_EXTERN_C
#if !defined(DEBUG) && (defined(__cplusplus) || defined(__gcc))
# ifndef INLINE
# define INLINE inline
# endif
#else
# define INLINE
#endif
typedef int cmp_t(const void *, const void *, void *);
static INLINE char *med3(char *, char *, char *, cmp_t *, void *);
static INLINE void swapfunc(char *, char *, int, int);
/*
* Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
*/
#define swapcode(TYPE, parmi, parmj, n) { \
long i = (n) / sizeof (TYPE); \
register TYPE *pi = (TYPE *) (parmi); \
register TYPE *pj = (TYPE *) (parmj); \
do { \
register TYPE t = *pi; \
*pi++ = *pj; \
*pj++ = t; \
} while (--i > 0); \
}
#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
static INLINE void
swapfunc(char *a, char *b, int n, int swaptype)
{
if(swaptype <= 1)
swapcode(long, a, b, n)
else
swapcode(char, a, b, n)
}
#define swap(a, b) \
if (swaptype == 0) { \
long t = *(long *)(a); \
*(long *)(a) = *(long *)(b); \
*(long *)(b) = t; \
} else \
swapfunc((char *)a, (char*)b, (int)es, swaptype)
#define vecswap(a, b, n) if ((n) > 0) swapfunc((char *)a, (char *)b, (int)n, swaptype)
static INLINE char *
med3(char *a, char *b, char *c, cmp_t* cmp, void *data)
{
return cmp(a, b, data) < 0 ?
(cmp(b, c, data) < 0 ? b : (cmp(a, c, data) < 0 ? c : a ))
:(cmp(b, c, data) > 0 ? b : (cmp(a, c, data) < 0 ? a : c ));
}
void NS_QuickSort (
void *a,
unsigned int n,
unsigned int es,
cmp_t *cmp,
void *data
)
{
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
int d, r, swaptype, swap_cnt;
loop: SWAPINIT(a, es);
swap_cnt = 0;
if (n < 7) {
for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
for (pl = pm; pl > (char *)a && cmp(pl - es, pl, data) > 0;
pl -= es)
swap(pl, pl - es);
return;
}
pm = (char *)a + (n / 2) * es;
if (n > 7) {
pl = (char *)a;
pn = (char *)a + (n - 1) * es;
if (n > 40) {
d = (n / 8) * es;
pl = med3(pl, pl + d, pl + 2 * d, cmp, data);
pm = med3(pm - d, pm, pm + d, cmp, data);
pn = med3(pn - 2 * d, pn - d, pn, cmp, data);
}
pm = med3(pl, pm, pn, cmp, data);
}
swap(a, pm);
pa = pb = (char *)a + es;
pc = pd = (char *)a + (n - 1) * es;
for (;;) {
while (pb <= pc && (r = cmp(pb, a, data)) <= 0) {
if (r == 0) {
swap_cnt = 1;
swap(pa, pb);
pa += es;
}
pb += es;
}
while (pb <= pc && (r = cmp(pc, a, data)) >= 0) {
if (r == 0) {
swap_cnt = 1;
swap(pc, pd);
pd -= es;
}
pc -= es;
}
if (pb > pc)
break;
swap(pb, pc);
swap_cnt = 1;
pb += es;
pc -= es;
}
if (swap_cnt == 0) { /* Switch to insertion sort */
for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
for (pl = pm; pl > (char *)a && cmp(pl - es, pl, data) > 0;
pl -= es)
swap(pl, pl - es);
return;
}
pn = (char *)a + n * es;
r = PR_MIN(pa - (char *)a, pb - pa);
vecswap(a, pb - r, r);
r = PR_MIN(pd - pc, (int)(pn - pd - es));
vecswap(pb, pn - r, r);
if ((r = pb - pa) > (int)es)
NS_QuickSort(a, r / es, es, cmp, data);
if ((r = pd - pc) > (int)es) {
/* Iterate rather than recurse to save stack space */
a = pn - r;
n = r / es;
goto loop;
}
/* NS_QuickSort(pn - r, r / es, es, cmp, data);*/
}
PR_END_EXTERN_C

Просмотреть файл

@ -1,23 +1,38 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozill Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../..
topsrcdir = @top_srcdir@

Просмотреть файл

@ -1,76 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this File are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code,
* released March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Sean Su <ssu@netscape.com>
*/
#include "nscore.h"
#include "nsInstall.h" // for error codes
#include "prmem.h"
#include "nsInstallBitwise.h"
#ifdef _WINDOWS
#include <windows.h>
#include <winreg.h>
#endif
#define KEY_SHARED_DLLS "Software\\Microsoft\\Windows\\CurrentVersion\\SharedDlls"
PRInt32 RegisterSharedFile(const char *file, PRBool bAlreadyExists)
{
PRInt32 rv = nsInstall::SUCCESS;
#ifdef WIN32
HKEY root;
HKEY keyHandle = 0;
LONG result;
DWORD type = REG_DWORD;
DWORD dwDisposition;
PRUint32 valbuf = 0;
PRUint32 valbufsize;
valbufsize = sizeof(PRUint32);
root = HKEY_LOCAL_MACHINE;
result = RegCreateKeyEx(root, KEY_SHARED_DLLS, 0, nsnull, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, nsnull, &keyHandle, &dwDisposition);
if(ERROR_SUCCESS == result)
{
result = RegQueryValueEx(keyHandle, file, nsnull, &type, (LPBYTE)&valbuf, (LPDWORD)&valbufsize);
if((ERROR_SUCCESS == result) && (type == REG_DWORD))
++valbuf;
else
{
valbuf = 1;
if(bAlreadyExists == PR_TRUE)
++valbuf;
}
RegSetValueEx(keyHandle, file, 0, REG_DWORD, (LPBYTE)&valbuf, valbufsize);
RegCloseKey(keyHandle);
}
else
rv = nsInstall::UNEXPECTED_ERROR;
#endif
return(rv);
}