diff options
author | nelsonb%netscape.com <devnull@localhost> | 2002-02-11 05:48:37 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2002-02-11 05:48:37 +0000 |
commit | 5b4f0678d52b744a40b53699751b70fbe8fb270b (patch) | |
tree | d2e241d6334161be2b7c682413bb27e3285c97fa | |
parent | c0d0c9878387944399a907f1400926f77e5060b7 (diff) | |
parent | 2fa8d1f755f8fbbf093d467a3ee0ab36c6d5c8ea (diff) | |
download | nss-hg-5b4f0678d52b744a40b53699751b70fbe8fb270b.tar.gz |
Make NSS 3.4 build as part of mozilla on OS/2. Bug 114748.
Patch supplied by Javier Pedemonte.
120 files changed, 15109 insertions, 970 deletions
diff --git a/dbm/.cvsignore b/dbm/.cvsignore new file mode 100644 index 000000000..f3c7a7c5d --- /dev/null +++ b/dbm/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/dbm/Makefile.in b/dbm/Makefile.in new file mode 100644 index 000000000..13779b989 --- /dev/null +++ b/dbm/Makefile.in @@ -0,0 +1,36 @@ +# +# 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.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. +# +# Contributor(s): +# + +DEPTH = .. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +DIRS = include src + +ifdef ENABLE_TESTS +DIRS += tests +endif + +include $(topsrcdir)/config/rules.mk + diff --git a/dbm/include/.cvsignore b/dbm/include/.cvsignore new file mode 100644 index 000000000..f3c7a7c5d --- /dev/null +++ b/dbm/include/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/dbm/include/MANIFEST b/dbm/include/MANIFEST new file mode 100644 index 000000000..5626a3e87 --- /dev/null +++ b/dbm/include/MANIFEST @@ -0,0 +1,17 @@ +# +# This is a list of local files which get copied to the mozilla:dist directory +# + +cdefs.h +extern.h +hash.h +hsearch.h +mcom_db.h +mpool.h +ncompat.h +ndbm.h +nsres.h +page.h +queue.h +search.h +watcomfx.h diff --git a/dbm/include/Makefile.in b/dbm/include/Makefile.in new file mode 100644 index 000000000..86fb8f157 --- /dev/null +++ b/dbm/include/Makefile.in @@ -0,0 +1,55 @@ +# +# 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.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. +# +# Contributor(s): +# + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = dbm + +EXPORTS = \ + nsres.h \ + cdefs.h \ + mcom_db.h \ + ncompat.h \ + winfile.h \ + $(NULL) + +EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) + +PRIVATE_EXPORTS = \ + hsearch.h \ + page.h \ + extern.h \ + ndbm.h \ + queue.h \ + hash.h \ + mpool.h \ + search.h \ + $(NULL) + +PRIVATE_EXPORTS := $(addprefix $(srcdir)/, $(PRIVATE_EXPORTS)) + +include $(topsrcdir)/config/rules.mk + diff --git a/dbm/include/Makefile.win b/dbm/include/Makefile.win new file mode 100644 index 000000000..07fba1859 --- /dev/null +++ b/dbm/include/Makefile.win @@ -0,0 +1,60 @@ +# 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.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. +# +# Contributor(s): + + +#//------------------------------------------------------------------------ +#// +#// Makefile to build the cert library +#// +#//------------------------------------------------------------------------ + +!if "$(MOZ_BITS)" == "16" +!ifndef MOZ_DEBUG +OPTIMIZER=-Os -UDEBUG -DNDEBUG +!endif +!endif + +#//------------------------------------------------------------------------ +#// +#// Specify the depth of the current directory relative to the +#// root of NS +#// +#//------------------------------------------------------------------------ +DEPTH= ..\.. + +!ifndef MAKE_OBJ_TYPE +MAKE_OBJ_TYPE=EXE +!endif + +#//------------------------------------------------------------------------ +#// +#// install headers +#// +#//------------------------------------------------------------------------ +EXPORTS=nsres.h cdefs.h mcom_db.h ncompat.h winfile.h + +#//------------------------------------------------------------------------ +#// +#// Include the common makefile rules +#// +#//------------------------------------------------------------------------ +include <$(DEPTH)/config/rules.mak> + +CFLAGS = $(CFLAGS) -DMOZILLA_CLIENT + diff --git a/dbm/include/cdefs.h b/dbm/include/cdefs.h new file mode 100644 index 000000000..63c2f624a --- /dev/null +++ b/dbm/include/cdefs.h @@ -0,0 +1,165 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * 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.org code. + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Berkeley Software Design, Inc. + * + * 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. + * + * @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + */ + +#ifndef _CDEFS_H_ +#define _CDEFS_H_ + +#if defined(__cplusplus) +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS +#define __END_DECLS +#endif + +/* + * The __CONCAT macro is used to concatenate parts of symbol names, e.g. + * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. + * The __CONCAT macro is a bit tricky -- make sure you don't put spaces + * in between its arguments. __CONCAT can also concatenate double-quoted + * strings produced by the __STRING macro, but this only works with ANSI C. + */ +#if defined(__STDC__) || defined(__cplusplus) || defined(_WINDOWS) || defined(XP_OS2) +#define __P(protos) protos /* full-blown ANSI C */ +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x + +/* On HP-UX 11.00, <sys/stdsyms.h> defines __const. */ +#ifndef __const +#define __const const /* define reserved names to standard */ +#endif /* __const */ +#define __signed signed +#define __volatile volatile +#ifndef _WINDOWS +#if defined(__cplusplus) +#define __inline inline /* convert to C++ keyword */ +#else +#if !defined(__GNUC__) && !defined(__MWERKS__) +#define __inline /* delete GCC keyword */ +#endif /* !__GNUC__ */ +#endif /* !__cplusplus */ +#endif /* !_WINDOWS */ + +#else /* !(__STDC__ || __cplusplus) */ +#define __P(protos) () /* traditional C preprocessor */ +#define __CONCAT(x,y) x/**/y +#define __STRING(x) "x" + +#ifndef __GNUC__ +#define __const /* delete pseudo-ANSI C keywords */ +#define __inline +#define __signed +#define __volatile +/* + * In non-ANSI C environments, new programs will want ANSI-only C keywords + * deleted from the program and old programs will want them left alone. + * When using a compiler other than gcc, programs using the ANSI C keywords + * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. + * When using "gcc -traditional", we assume that this is the intent; if + * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. + */ +#ifndef NO_ANSI_KEYWORDS +#define const /* delete ANSI C keywords */ +#define inline +#define signed +#define volatile +#endif +#endif /* !__GNUC__ */ +#endif /* !(__STDC__ || __cplusplus) */ + +/* + * GCC1 and some versions of GCC2 declare dead (non-returning) and + * pure (no side effects) functions using "volatile" and "const"; + * unfortunately, these then cause warnings under "-ansi -pedantic". + * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of + * these work for GNU C++ (modulo a slight glitch in the C++ grammar + * in the distribution version of 2.5.5). + */ +#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5 +#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */ +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +#define __dead __volatile +#define __pure __const +#endif +#endif + +/* Delete pseudo-keywords wherever they are not available or needed. */ +#ifndef __dead +#define __dead +#define __pure +#endif + +#endif /* !_CDEFS_H_ */ diff --git a/dbm/include/extern.h b/dbm/include/extern.h new file mode 100644 index 000000000..8eabc81fe --- /dev/null +++ b/dbm/include/extern.h @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 1991, 1993, 1994 + * 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. + * + * @(#)extern.h 8.4 (Berkeley) 6/16/94 + */ + +BUFHEAD *__add_ovflpage (HTAB *, BUFHEAD *); +int __addel (HTAB *, BUFHEAD *, const DBT *, const DBT *); +int __big_delete (HTAB *, BUFHEAD *); +int __big_insert (HTAB *, BUFHEAD *, const DBT *, const DBT *); +int __big_keydata (HTAB *, BUFHEAD *, DBT *, DBT *, int); +int __big_return (HTAB *, BUFHEAD *, int, DBT *, int); +int __big_split (HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *, + uint32, uint32, SPLIT_RETURN *); +int __buf_free (HTAB *, int, int); +void __buf_init (HTAB *, int); +uint32 __call_hash (HTAB *, char *, size_t); +int __delpair (HTAB *, BUFHEAD *, int); +int __expand_table (HTAB *); +int __find_bigpair (HTAB *, BUFHEAD *, int, char *, int); +uint16 __find_last_page (HTAB *, BUFHEAD **); +void __free_ovflpage (HTAB *, BUFHEAD *); +BUFHEAD *__get_buf (HTAB *, uint32, BUFHEAD *, int); +int __get_page (HTAB *, char *, uint32, int, int, int); +int __ibitmap (HTAB *, int, int, int); +uint32 __log2 (uint32); +int __put_page (HTAB *, char *, uint32, int, int); +void __reclaim_buf (HTAB *, BUFHEAD *); +int __split_page (HTAB *, uint32, uint32); + +/* Default hash routine. */ +extern uint32 (*__default_hash) (const void *, size_t); + +#ifdef HASH_STATISTICS +extern int hash_accesses, hash_collisions, hash_expansions, hash_overflows; +#endif diff --git a/dbm/include/hash.h b/dbm/include/hash.h new file mode 100644 index 000000000..454a8ec42 --- /dev/null +++ b/dbm/include/hash.h @@ -0,0 +1,337 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + * + * @(#)hash.h 8.3 (Berkeley) 5/31/94 + */ + +/* Operations */ + +#include <stdio.h> +#include "mcom_db.h" +typedef enum { + HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT +} ACTION; + +/* Buffer Management structures */ +typedef struct _bufhead BUFHEAD; + +struct _bufhead { + BUFHEAD *prev; /* LRU links */ + BUFHEAD *next; /* LRU links */ + BUFHEAD *ovfl; /* Overflow page buffer header */ + uint32 addr; /* Address of this page */ + char *page; /* Actual page data */ + char is_disk; + char flags; +#define BUF_MOD 0x0001 +#define BUF_DISK 0x0002 +#define BUF_BUCKET 0x0004 +#define BUF_PIN 0x0008 +}; + +#define IS_BUCKET(X) ((X) & BUF_BUCKET) + +typedef BUFHEAD **SEGMENT; + +typedef int DBFILE_PTR; +#define NO_FILE -1 +#ifdef macintosh +#define DBFILE_OPEN(path, flag,mode) open((path), flag) +#define EXISTS(path) +#else +#define DBFILE_OPEN(path, flag,mode) open((path), (flag), (mode)) +#endif +/* Hash Table Information */ +typedef struct hashhdr { /* Disk resident portion */ + int32 magic; /* Magic NO for hash tables */ + int32 version; /* Version ID */ + uint32 lorder; /* Byte Order */ + int32 bsize; /* Bucket/Page Size */ + int32 bshift; /* Bucket shift */ + int32 dsize; /* Directory Size */ + int32 ssize; /* Segment Size */ + int32 sshift; /* Segment shift */ + int32 ovfl_point; /* Where overflow pages are being + * allocated */ + int32 last_freed; /* Last overflow page freed */ + int32 max_bucket; /* ID of Maximum bucket in use */ + int32 high_mask; /* Mask to modulo into entire table */ + int32 low_mask; /* Mask to modulo into lower half of + * table */ + int32 ffactor; /* Fill factor */ + int32 nkeys; /* Number of keys in hash table */ + int32 hdrpages; /* Size of table header */ + uint32 h_charkey; /* value of hash(CHARKEY) */ +#define NCACHED 32 /* number of bit maps and spare + * points */ + int32 spares[NCACHED];/* spare pages for overflow */ + uint16 bitmaps[NCACHED]; /* address of overflow page + * bitmaps */ +} HASHHDR; + +typedef struct htab { /* Memory resident data structure */ + HASHHDR hdr; /* Header */ + int nsegs; /* Number of allocated segments */ + int exsegs; /* Number of extra allocated + * segments */ + uint32 /* Hash function */ + (*hash)(const void *, size_t); + int flags; /* Flag values */ + DBFILE_PTR fp; /* File pointer */ + char *filename; + char *tmp_buf; /* Temporary Buffer for BIG data */ + char *tmp_key; /* Temporary Buffer for BIG keys */ + BUFHEAD *cpage; /* Current page */ + int cbucket; /* Current bucket */ + int cndx; /* Index of next item on cpage */ + int dbmerrno; /* Error Number -- for DBM + * compatability */ + int new_file; /* Indicates if fd is backing store + * or no */ + int save_file; /* Indicates whether we need to flush + * file at + * exit */ + uint32 *mapp[NCACHED]; /* Pointers to page maps */ + int nmaps; /* Initial number of bitmaps */ + int nbufs; /* Number of buffers left to + * allocate */ + BUFHEAD bufhead; /* Header of buffer lru list */ + SEGMENT *dir; /* Hash Bucket directory */ + off_t file_size; /* in bytes */ + char is_temp; /* unlink file on close */ + char updateEOF; /* force EOF update on flush */ +} HTAB; + +/* + * Constants + */ +#define DATABASE_CORRUPTED_ERROR -999 /* big ugly abort, delete database */ +#define OLD_MAX_BSIZE 65536 /* 2^16 */ +#define MAX_BSIZE 32l*1024l /* 2^15 */ +#define MIN_BUFFERS 6 +#define MINHDRSIZE 512 +#define DEF_BUFSIZE 65536l /* 64 K */ +#define DEF_BUCKET_SIZE 4096 +#define DEF_BUCKET_SHIFT 12 /* log2(BUCKET) */ +#define DEF_SEGSIZE 256 +#define DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */ +#define DEF_DIRSIZE 256 +#define DEF_FFACTOR 65536l +#define MIN_FFACTOR 4 +#define SPLTMAX 8 +#define CHARKEY "%$sniglet^&" +#define NUMKEY 1038583l +#define BYTE_SHIFT 3 +#define INT_TO_BYTE 2 +#define INT_BYTE_SHIFT 5 +#define ALL_SET ((uint32)0xFFFFFFFF) +#define ALL_CLEAR 0 + +#define PTROF(X) ((ptrdiff_t)(X) == BUF_DISK ? 0 : (X)) +#define ISDISK(X) ((X) ? ((ptrdiff_t)(X) == BUF_DISK ? BUF_DISK \ + : (X)->is_disk) : 0) + +#define BITS_PER_MAP 32 + +/* Given the address of the beginning of a big map, clear/set the nth bit */ +#define CLRBIT(A, N) ((A)[(N)/BITS_PER_MAP] &= ~(1<<((N)%BITS_PER_MAP))) +#define SETBIT(A, N) ((A)[(N)/BITS_PER_MAP] |= (1<<((N)%BITS_PER_MAP))) +#define ISSET(A, N) ((A)[(N)/BITS_PER_MAP] & (1<<((N)%BITS_PER_MAP))) + +/* Overflow management */ +/* + * Overflow page numbers are allocated per split point. At each doubling of + * the table, we can allocate extra pages. So, an overflow page number has + * the top 5 bits indicate which split point and the lower 11 bits indicate + * which page at that split point is indicated (pages within split points are + * numberered starting with 1). + */ + +#define SPLITSHIFT 11 +#define SPLITMASK 0x7FF +#define SPLITNUM(N) (((uint32)(N)) >> SPLITSHIFT) +#define OPAGENUM(N) ((N) & SPLITMASK) +#define OADDR_OF(S,O) ((uint32)((uint32)(S) << SPLITSHIFT) + (O)) + +#define BUCKET_TO_PAGE(B) \ + (B) + hashp->HDRPAGES + ((B) ? hashp->SPARES[__log2((uint32)((B)+1))-1] : 0) +#define OADDR_TO_PAGE(B) \ + BUCKET_TO_PAGE ( (1 << SPLITNUM((B))) -1 ) + OPAGENUM((B)); + +/* + * page.h contains a detailed description of the page format. + * + * Normally, keys and data are accessed from offset tables in the top of + * each page which point to the beginning of the key and data. There are + * four flag values which may be stored in these offset tables which indicate + * the following: + * + * + * OVFLPAGE Rather than a key data pair, this pair contains + * the address of an overflow page. The format of + * the pair is: + * OVERFLOW_PAGE_NUMBER OVFLPAGE + * + * PARTIAL_KEY This must be the first key/data pair on a page + * and implies that page contains only a partial key. + * That is, the key is too big to fit on a single page + * so it starts on this page and continues on the next. + * The format of the page is: + * KEY_OFF PARTIAL_KEY OVFL_PAGENO OVFLPAGE + * + * KEY_OFF -- offset of the beginning of the key + * PARTIAL_KEY -- 1 + * OVFL_PAGENO - page number of the next overflow page + * OVFLPAGE -- 0 + * + * FULL_KEY This must be the first key/data pair on the page. It + * is used in two cases. + * + * Case 1: + * There is a complete key on the page but no data + * (because it wouldn't fit). The next page contains + * the data. + * + * Page format it: + * KEY_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE + * + * KEY_OFF -- offset of the beginning of the key + * FULL_KEY -- 2 + * OVFL_PAGENO - page number of the next overflow page + * OVFLPAGE -- 0 + * + * Case 2: + * This page contains no key, but part of a large + * data field, which is continued on the next page. + * + * Page format it: + * DATA_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE + * + * KEY_OFF -- offset of the beginning of the data on + * this page + * FULL_KEY -- 2 + * OVFL_PAGENO - page number of the next overflow page + * OVFLPAGE -- 0 + * + * FULL_KEY_DATA + * This must be the first key/data pair on the page. + * There are two cases: + * + * Case 1: + * This page contains a key and the beginning of the + * data field, but the data field is continued on the + * next page. + * + * Page format is: + * KEY_OFF FULL_KEY_DATA OVFL_PAGENO DATA_OFF + * + * KEY_OFF -- offset of the beginning of the key + * FULL_KEY_DATA -- 3 + * OVFL_PAGENO - page number of the next overflow page + * DATA_OFF -- offset of the beginning of the data + * + * Case 2: + * This page contains the last page of a big data pair. + * There is no key, only the tail end of the data + * on this page. + * + * Page format is: + * DATA_OFF FULL_KEY_DATA <OVFL_PAGENO> <OVFLPAGE> + * + * DATA_OFF -- offset of the beginning of the data on + * this page + * FULL_KEY_DATA -- 3 + * OVFL_PAGENO - page number of the next overflow page + * OVFLPAGE -- 0 + * + * OVFL_PAGENO and OVFLPAGE are optional (they are + * not present if there is no next page). + */ + +#define OVFLPAGE 0 +#define PARTIAL_KEY 1 +#define FULL_KEY 2 +#define FULL_KEY_DATA 3 +#define REAL_KEY 4 + +/* Short hands for accessing structure */ +#undef BSIZE +#define BSIZE hdr.bsize +#undef BSHIFT +#define BSHIFT hdr.bshift +#define DSIZE hdr.dsize +#define SGSIZE hdr.ssize +#define SSHIFT hdr.sshift +#define LORDER hdr.lorder +#define OVFL_POINT hdr.ovfl_point +#define LAST_FREED hdr.last_freed +#define MAX_BUCKET hdr.max_bucket +#define FFACTOR hdr.ffactor +#define HIGH_MASK hdr.high_mask +#define LOW_MASK hdr.low_mask +#define NKEYS hdr.nkeys +#define HDRPAGES hdr.hdrpages +#define SPARES hdr.spares +#define BITMAPS hdr.bitmaps +#define VERSION hdr.version +#define MAGIC hdr.magic +#define NEXT_FREE hdr.next_free +#define H_CHARKEY hdr.h_charkey + +extern uint32 (*__default_hash) (const void *, size_t); +void __buf_init(HTAB *hashp, int32 nbytes); +int __big_delete(HTAB *hashp, BUFHEAD *bufp); +BUFHEAD * __get_buf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp, int newpage); +uint32 __call_hash(HTAB *hashp, char *k, size_t len); +#include "page.h" +extern int __big_split(HTAB *hashp, BUFHEAD *op,BUFHEAD *np, +BUFHEAD *big_keyp,uint32 addr,uint32 obucket, SPLIT_RETURN *ret); +void __free_ovflpage(HTAB *hashp, BUFHEAD *obufp); +BUFHEAD * __add_ovflpage(HTAB *hashp, BUFHEAD *bufp); +int __big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val); +int __expand_table(HTAB *hashp); +uint32 __log2(uint32 num); +void __reclaim_buf(HTAB *hashp, BUFHEAD *bp); +int __get_page(HTAB *hashp, char * p, uint32 bucket, int is_bucket, int is_disk, int is_bitmap); +int __put_page(HTAB *hashp, char *p, uint32 bucket, int is_bucket, int is_bitmap); +int __ibitmap(HTAB *hashp, int pnum, int nbits, int ndx); +int __buf_free(HTAB *hashp, int do_free, int to_disk); +int __find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size); +uint16 __find_last_page(HTAB *hashp, BUFHEAD **bpp); +int __addel(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT * val); +int __big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current); +int __delpair(HTAB *hashp, BUFHEAD *bufp, int ndx); +int __big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set); +int __split_page(HTAB *hashp, uint32 obucket, uint32 nbucket); diff --git a/dbm/include/hsearch.h b/dbm/include/hsearch.h new file mode 100644 index 000000000..ff58b1c15 --- /dev/null +++ b/dbm/include/hsearch.h @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + * + * @(#)search.h 8.1 (Berkeley) 6/4/93 + */ + +/* Backward compatibility to hsearch interface. */ +typedef struct entry { + char *key; + char *data; +} ENTRY; + +typedef enum { + FIND, ENTER +} ACTION; + +int hcreate (unsigned int); +void hdestroy (void); +ENTRY *hsearch (ENTRY, ACTION); diff --git a/dbm/include/mcom_db.h b/dbm/include/mcom_db.h new file mode 100644 index 000000000..395f9d2ca --- /dev/null +++ b/dbm/include/mcom_db.h @@ -0,0 +1,450 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * 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.org code. + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/*- + * Copyright (c) 1990, 1993, 1994 + * 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. + * + * @(#)db.h 8.7 (Berkeley) 6/16/94 + */ + +#ifndef _DB_H_ +#define _DB_H_ + +#ifndef macintosh +#include <sys/types.h> +#endif +#include "prtypes.h" + +#include <limits.h> + +#ifdef __DBINTERFACE_PRIVATE + +#ifdef HAVE_SYS_CDEFS_H +#include <sys/cdefs.h> +#else +#include "cdefs.h" +#endif + +#ifdef HAVE_SYS_BYTEORDER_H +#include <sys/byteorder.h> +#endif + +#if defined(__linux) || defined(__BEOS__) +#include <endian.h> +#ifndef BYTE_ORDER +#define BYTE_ORDER __BYTE_ORDER +#define BIG_ENDIAN __BIG_ENDIAN +#define LITTLE_ENDIAN __LITTLE_ENDIAN +#endif +#endif /* __linux */ + +#ifdef __sgi +#define BYTE_ORDER BIG_ENDIAN +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ +#endif + +#ifdef __sun +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ + +#ifndef __SVR4 +/* compat.h is only in 4.1.3 machines. - dp */ +#include <compat.h> +#endif + +/* XXX - dp + * Need to find a general way of defining endian-ness in SunOS 5.3 + * SunOS 5.4 defines _BIG_ENDIAN and _LITTLE_ENDIAN + * SunOS 5.3 does nothing like this. + */ + +#ifndef BYTE_ORDER + +#if defined(_BIG_ENDIAN) +#define BYTE_ORDER BIG_ENDIAN +#elif defined(_LITTLE_ENDIAN) +#define BYTE_ORDER LITTLE_ENDIAN +#elif !defined(__SVR4) +/* 4.1.3 is always BIG_ENDIAN as it was released only on sparc platforms. */ +#define BYTE_ORDER BIG_ENDIAN +#elif !defined(vax) && !defined(ntohl) && !defined(lint) && !defined(i386) +/* 5.3 big endian. Copied this above line from sys/byteorder.h */ +/* Now we are in a 5.3 SunOS rather non 5.4 or above SunOS */ +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif + +#endif /* !BYTE_ORDER */ +#endif /* __sun */ + +#if defined(__hpux) || defined(__hppa) +#define BYTE_ORDER BIG_ENDIAN +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ +#endif + +#if defined(AIXV3) || defined(AIX) +/* BYTE_ORDER, LITTLE_ENDIAN, BIG_ENDIAN are all defined here */ +#include <sys/machine.h> +#endif + +/* Digital Unix */ +#ifdef __osf__ +#include <machine/endian.h> +#endif + +#ifdef __alpha +#ifndef WIN32 +#else +/* Alpha NT */ +#define BYTE_ORDER LITTLE_ENDIAN +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#endif +#endif + +#ifdef NCR +#include <sys/endian.h> +#endif + +#ifdef __QNX__ +#ifdef __QNXNTO__ +#include <sys/param.h> +#else +#define LITTLE_ENDIAN 1234 +#define BIG_ENDIAN 4321 +#define BYTE_ORDER LITTLE_ENDIAN +#endif +#endif + +#ifdef SNI +/* #include <sys/hetero.h> */ +#define BYTE_ORDER BIG_ENDIAN +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#endif + +#if defined(_WINDOWS) || defined(XP_OS2) +#ifdef BYTE_ORDER +#undef BYTE_ORDER +#endif + +#define BYTE_ORDER LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ +#define BIG_ENDIAN 4321 +#endif + +#ifdef macintosh +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#define BYTE_ORDER BIG_ENDIAN +#endif + +#endif /* __DBINTERFACE_PRIVATE */ + +#ifdef SCO +#define MAXPATHLEN 1024 +#endif + +#include <fcntl.h> + +#if defined(_WINDOWS) || defined(XP_OS2) +#include <stdio.h> +#include <io.h> + +#ifndef XP_OS2 +#define MAXPATHLEN 1024 +#endif + +#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */ + +#ifndef STDERR_FILENO +#define STDIN_FILENO 0 /* ANSI C #defines */ +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 +#endif + +#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) +#endif +#endif + +#ifdef macintosh +#include <stdio.h> +#include "xp_mcom.h" +#define O_ACCMODE 3 /* Mask for file access modes */ +#define EFTYPE 2000 +XP_BEGIN_PROTOS +int mkstemp(const char *path); +XP_END_PROTOS +#endif /* MACINTOSH */ + +#if !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2) +#include <sys/stat.h> +#include <errno.h> +#endif + +/* define EFTYPE since most don't */ +#ifndef EFTYPE +#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */ +#endif + +#define RET_ERROR -1 /* Return values. */ +#define RET_SUCCESS 0 +#define RET_SPECIAL 1 + +#define MAX_PAGE_NUMBER 0xffffffff /* >= # of pages in a file */ + +#ifndef __sgi +typedef uint32 pgno_t; +#endif + +#define MAX_PAGE_OFFSET 65535 /* >= # of bytes in a page */ +typedef uint16 indx_t; +#define MAX_REC_NUMBER 0xffffffff /* >= # of records in a tree */ +typedef uint32 recno_t; + +/* Key/data structure -- a Data-Base Thang. */ +typedef struct { + void *data; /* data */ + size_t size; /* data length */ +} DBT; + +/* Routine flags. */ +#define R_CURSOR 1 /* del, put, seq */ +#define __R_UNUSED 2 /* UNUSED */ +#define R_FIRST 3 /* seq */ +#define R_IAFTER 4 /* put (RECNO) */ +#define R_IBEFORE 5 /* put (RECNO) */ +#define R_LAST 6 /* seq (BTREE, RECNO) */ +#define R_NEXT 7 /* seq */ +#define R_NOOVERWRITE 8 /* put */ +#define R_PREV 9 /* seq (BTREE, RECNO) */ +#define R_SETCURSOR 10 /* put (RECNO) */ +#define R_RECNOSYNC 11 /* sync (RECNO) */ + +typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; + +typedef enum { LockOutDatabase, UnlockDatabase } DBLockFlagEnum; + +/* + * !!! + * The following flags are included in the dbopen(3) call as part of the + * open(2) flags. In order to avoid conflicts with the open flags, start + * at the top of the 16 or 32-bit number space and work our way down. If + * the open flags were significantly expanded in the future, it could be + * a problem. Wish I'd left another flags word in the dbopen call. + * + * !!! + * None of this stuff is implemented yet. The only reason that it's here + * is so that the access methods can skip copying the key/data pair when + * the DB_LOCK flag isn't set. + */ +#if UINT_MAX > 65535 +#define DB_LOCK 0x20000000 /* Do locking. */ +#define DB_SHMEM 0x40000000 /* Use shared memory. */ +#define DB_TXN 0x80000000 /* Do transactions. */ +#else +#define DB_LOCK 0x2000 /* Do locking. */ +#define DB_SHMEM 0x4000 /* Use shared memory. */ +#define DB_TXN 0x8000 /* Do transactions. */ +#endif + +/* Access method description structure. */ +typedef struct __db { + DBTYPE type; /* Underlying db type. */ + int (*close) (struct __db *); + int (*del) (const struct __db *, const DBT *, uint); + int (*get) (const struct __db *, const DBT *, DBT *, uint); + int (*put) (const struct __db *, DBT *, const DBT *, uint); + int (*seq) (const struct __db *, DBT *, DBT *, uint); + int (*sync) (const struct __db *, uint); + void *internal; /* Access method private. */ + int (*fd) (const struct __db *); +} DB; + +#define BTREEMAGIC 0x053162 +#define BTREEVERSION 3 + +/* Structure used to pass parameters to the btree routines. */ +typedef struct { +#define R_DUP 0x01 /* duplicate keys */ + uint32 flags; + uint cachesize; /* bytes to cache */ + int maxkeypage; /* maximum keys per page */ + int minkeypage; /* minimum keys per page */ + uint psize; /* page size */ + int (*compare) /* comparison function */ + (const DBT *, const DBT *); + size_t (*prefix) /* prefix function */ + (const DBT *, const DBT *); + int lorder; /* byte order */ +} BTREEINFO; + +#define HASHMAGIC 0x061561 +#define HASHVERSION 2 + +/* Structure used to pass parameters to the hashing routines. */ +typedef struct { + uint bsize; /* bucket size */ + uint ffactor; /* fill factor */ + uint nelem; /* number of elements */ + uint cachesize; /* bytes to cache */ + uint32 /* hash function */ + (*hash) (const void *, size_t); + int lorder; /* byte order */ +} HASHINFO; + +/* Structure used to pass parameters to the record routines. */ +typedef struct { +#define R_FIXEDLEN 0x01 /* fixed-length records */ +#define R_NOKEY 0x02 /* key not required */ +#define R_SNAPSHOT 0x04 /* snapshot the input */ + uint32 flags; + uint cachesize; /* bytes to cache */ + uint psize; /* page size */ + int lorder; /* byte order */ + size_t reclen; /* record length (fixed-length records) */ + uint8 bval; /* delimiting byte (variable-length records */ + char *bfname; /* btree file name */ +} RECNOINFO; + +#ifdef __DBINTERFACE_PRIVATE +/* + * Little endian <==> big endian 32-bit swap macros. + * M_32_SWAP swap a memory location + * P_32_SWAP swap a referenced memory location + * P_32_COPY swap from one location to another + */ +#define M_32_SWAP(a) { \ + uint32 _tmp = a; \ + ((char *)&a)[0] = ((char *)&_tmp)[3]; \ + ((char *)&a)[1] = ((char *)&_tmp)[2]; \ + ((char *)&a)[2] = ((char *)&_tmp)[1]; \ + ((char *)&a)[3] = ((char *)&_tmp)[0]; \ +} +#define P_32_SWAP(a) { \ + uint32 _tmp = *(uint32 *)a; \ + ((char *)a)[0] = ((char *)&_tmp)[3]; \ + ((char *)a)[1] = ((char *)&_tmp)[2]; \ + ((char *)a)[2] = ((char *)&_tmp)[1]; \ + ((char *)a)[3] = ((char *)&_tmp)[0]; \ +} +#define P_32_COPY(a, b) { \ + ((char *)&(b))[0] = ((char *)&(a))[3]; \ + ((char *)&(b))[1] = ((char *)&(a))[2]; \ + ((char *)&(b))[2] = ((char *)&(a))[1]; \ + ((char *)&(b))[3] = ((char *)&(a))[0]; \ +} + +/* + * Little endian <==> big endian 16-bit swap macros. + * M_16_SWAP swap a memory location + * P_16_SWAP swap a referenced memory location + * P_16_COPY swap from one location to another + */ +#define M_16_SWAP(a) { \ + uint16 _tmp = a; \ + ((char *)&a)[0] = ((char *)&_tmp)[1]; \ + ((char *)&a)[1] = ((char *)&_tmp)[0]; \ +} +#define P_16_SWAP(a) { \ + uint16 _tmp = *(uint16 *)a; \ + ((char *)a)[0] = ((char *)&_tmp)[1]; \ + ((char *)a)[1] = ((char *)&_tmp)[0]; \ +} +#define P_16_COPY(a, b) { \ + ((char *)&(b))[0] = ((char *)&(a))[1]; \ + ((char *)&(b))[1] = ((char *)&(a))[0]; \ +} +#endif + +PR_BEGIN_EXTERN_C +#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) +extern DB * +#else +PR_EXTERN(DB *) +#endif +dbopen (const char *, int, int, DBTYPE, const void *); + +/* set or unset a global lock flag to disable the + * opening of any DBM file + */ +void dbSetOrClearDBLock(DBLockFlagEnum type); + +#ifdef __DBINTERFACE_PRIVATE +DB *__bt_open (const char *, int, int, const BTREEINFO *, int); +DB *__hash_open (const char *, int, int, const HASHINFO *, int); +DB *__rec_open (const char *, int, int, const RECNOINFO *, int); +void __dbpanic (DB *dbp); +#endif + +PR_END_EXTERN_C + +#endif /* !_DB_H_ */ diff --git a/dbm/include/mpool.h b/dbm/include/mpool.h new file mode 100644 index 000000000..a2fb62b9f --- /dev/null +++ b/dbm/include/mpool.h @@ -0,0 +1,99 @@ +/*- + * Copyright (c) 1991, 1993, 1994 + * 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. + * + * @(#)mpool.h 8.2 (Berkeley) 7/14/94 + */ + +#include <sys/queue.h> + +/* + * The memory pool scheme is a simple one. Each in-memory page is referenced + * by a bucket which is threaded in up to two of three ways. All active pages + * are threaded on a hash chain (hashed by page number) and an lru chain. + * Inactive pages are threaded on a free chain. Each reference to a memory + * pool is handed an opaque MPOOL cookie which stores all of this information. + */ +#define HASHSIZE 128 +#define HASHKEY(pgno) ((pgno - 1) % HASHSIZE) + +/* The BKT structures are the elements of the queues. */ +typedef struct _bkt { + CIRCLEQ_ENTRY(_bkt) hq; /* hash queue */ + CIRCLEQ_ENTRY(_bkt) q; /* lru queue */ + void *page; /* page */ + pgno_t pgno; /* page number */ + +#define MPOOL_DIRTY 0x01 /* page needs to be written */ +#define MPOOL_PINNED 0x02 /* page is pinned into memory */ + uint8 flags; /* flags */ +} BKT; + +typedef struct MPOOL { + CIRCLEQ_HEAD(_lqh, _bkt) lqh; /* lru queue head */ + /* hash queue array */ + CIRCLEQ_HEAD(_hqh, _bkt) hqh[HASHSIZE]; + pgno_t curcache; /* current number of cached pages */ + pgno_t maxcache; /* max number of cached pages */ + pgno_t npages; /* number of pages in the file */ + uint32 pagesize; /* file page size */ + int fd; /* file descriptor */ + /* page in conversion routine */ + void (*pgin) (void *, pgno_t, void *); + /* page out conversion routine */ + void (*pgout) (void *, pgno_t, void *); + void *pgcookie; /* cookie for page in/out routines */ +#ifdef STATISTICS + uint32 cachehit; + uint32 cachemiss; + uint32 pagealloc; + uint32 pageflush; + uint32 pageget; + uint32 pagenew; + uint32 pageput; + uint32 pageread; + uint32 pagewrite; +#endif +} MPOOL; + +__BEGIN_DECLS +MPOOL *mpool_open (void *, int, pgno_t, pgno_t); +void mpool_filter (MPOOL *, void (*)(void *, pgno_t, void *), + void (*)(void *, pgno_t, void *), void *); +void *mpool_new (MPOOL *, pgno_t *); +void *mpool_get (MPOOL *, pgno_t, uint); +int mpool_put (MPOOL *, void *, uint); +int mpool_sync (MPOOL *); +int mpool_close (MPOOL *); +#ifdef STATISTICS +void mpool_stat (MPOOL *); +#endif +__END_DECLS diff --git a/dbm/include/ncompat.h b/dbm/include/ncompat.h new file mode 100644 index 000000000..c95b327fe --- /dev/null +++ b/dbm/include/ncompat.h @@ -0,0 +1,232 @@ +/*- + * Copyright (c) 1991, 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. + * + * @(#)compat.h 8.13 (Berkeley) 2/21/94 + */ + +#ifndef _COMPAT_H_ +#define _COMPAT_H_ + +#include <sys/types.h> + +/* + * If your system doesn't typedef u_long, u_short, or u_char, change + * the 0 to a 1. + */ +#if 0 +typedef unsigned char u_char; /* 4.[34]BSD names. */ +typedef unsigned int u_int; +typedef unsigned long u_long; +typedef unsigned short u_short; +#endif + +/* If your system doesn't typedef size_t, change the 0 to a 1. */ +#if 0 +typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */ +#endif + +/* If your system doesn't typedef ssize_t, change the 0 to a 1. */ +#if 0 +typedef int ssize_t; /* POSIX names. */ +#endif + +/* + * If your system doesn't have the POSIX type for a signal mask, + * change the 0 to a 1. + */ +#if 0 /* POSIX 1003.1 signal mask type. */ +typedef unsigned int sigset_t; +#endif + +/* + * If your system's vsprintf returns a char *, not an int, + * change the 0 to a 1. + */ +#if defined (__sun) && !defined(__SVR4) /* SUNOS */ +#define VSPRINTF_CHARSTAR +#endif +/* + * If you don't have POSIX 1003.1 signals, the signal code surrounding the + * temporary file creation is intended to block all of the possible signals + * long enough to create the file and unlink it. All of this stuff is + * intended to use old-style BSD calls to fake POSIX 1003.1 calls. + */ +#ifdef NO_POSIX_SIGNALS +#define sigemptyset(set) (*(set) = 0) +#define sigfillset(set) (*(set) = ~(sigset_t)0, 0) +#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0) +#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0) +#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0) + +#define SIG_BLOCK 1 +#define SIG_UNBLOCK 2 +#define SIG_SETMASK 3 + +static int __sigtemp; /* For the use of sigprocmask */ + +/* Repeated test of oset != NULL is to avoid "*0". */ +#define sigprocmask(how, set, oset) \ + ((__sigtemp = \ + (((how) == SIG_BLOCK) ? \ + sigblock(0) | *(set) : \ + (((how) == SIG_UNBLOCK) ? \ + sigblock(0) & ~(*(set)) : \ + ((how) == SIG_SETMASK ? \ + *(set) : sigblock(0))))), \ + ((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \ + sigsetmask(__sigtemp)), 0) +#endif + +/* + * If your system doesn't have an include file with the appropriate + * byte order set, make sure you specify the correct one. + */ +#ifndef BYTE_ORDER +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ +#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ +#define BYTE_ORDER BIG_ENDIAN /* Set for your system. */ +#endif + +#if defined(SYSV) || defined(SYSTEM5) || defined(__sun) +#define index(a, b) strchr(a, b) +#define rindex(a, b) strrchr(a, b) +#define bzero(a, b) memset(a, 0, b) +#define bcmp(a, b, n) memcmp(a, b, n) +#define bcopy(a, b, n) memmove(b, a, n) +#endif + +#if defined(BSD) || defined(BSD4_3) +#define strchr(a, b) index(a, b) +#define strrchr(a, b) rindex(a, b) +#define memcmp(a, b, n) bcmp(a, b, n) +#define memmove(a, b, n) bcopy(b, a, n) +#endif + +/* + * 32-bit machine. The db routines are theoretically independent of + * the size of u_shorts and u_longs, but I don't know that anyone has + * ever actually tried it. At a minimum, change the following #define's + * if you are trying to compile on a different type of system. + */ +#ifndef USHRT_MAX +#define USHRT_MAX 0xFFFF +#define ULONG_MAX 0xFFFFFFFF +#endif + +#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) +#endif + +#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */ +#define _POSIX2_RE_DUP_MAX 255 +#endif + +/* + * If you can't provide lock values in the open(2) call. Note, this + * allows races to happen. + */ +#ifndef O_EXLOCK /* 4.4BSD extension. */ +#define O_EXLOCK 0 +#endif + +#ifndef O_SHLOCK /* 4.4BSD extension. */ +#define O_SHLOCK 0 +#endif + +#ifndef EFTYPE +#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */ +#endif + +#ifndef WCOREDUMP /* 4.4BSD extension */ +#define WCOREDUMP(a) 0 +#endif + +#ifndef STDERR_FILENO +#define STDIN_FILENO 0 /* ANSI C #defines */ +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 +#endif + +#ifndef SEEK_END +#define SEEK_SET 0 /* POSIX 1003.1 seek values */ +#define SEEK_CUR 1 +#define SEEK_END 2 +#endif + +#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */ +#define _POSIX_VDISABLE 0 /* Some systems used 0. */ +#endif + +#ifndef TCSASOFT /* 4.4BSD extension. */ +#define TCSASOFT 0 +#endif + +#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */ +#define _POSIX2_RE_DUP_MAX 255 +#endif + +#ifndef NULL /* ANSI C #defines NULL everywhere. */ +#define NULL 0 +#endif + +#ifndef MAX /* Usually found in <sys/param.h>. */ +#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a)) +#endif +#ifndef MIN /* Usually found in <sys/param.h>. */ +#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b)) +#endif + +/* Default file permissions. */ +#ifndef DEFFILEMODE /* 4.4BSD extension. */ +#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) +#endif + +#ifndef __sun +#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */ +#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */ +#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */ +#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */ +#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */ +#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */ +#endif +#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */ +#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */ +#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */ +#endif +#endif /* __sun */ + +/* The type of a va_list. */ +#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */ +#define _BSD_VA_LIST_ char * +#endif + +#endif /* !_COMPAT_H_ */ diff --git a/dbm/include/ndbm.h b/dbm/include/ndbm.h new file mode 100644 index 000000000..7ad5f1a23 --- /dev/null +++ b/dbm/include/ndbm.h @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + * + * @(#)ndbm.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _NDBM_H_ +#define _NDBM_H_ + +#include "mcom_db.h" + +/* Map dbm interface onto db(3). */ +#define DBM_RDONLY O_RDONLY + +/* Flags to dbm_store(). */ +#define DBM_INSERT 0 +#define DBM_REPLACE 1 + +/* + * The db(3) support for ndbm(3) always appends this suffix to the + * file name to avoid overwriting the user's original database. + */ +#define DBM_SUFFIX ".db" + +typedef struct { + char *dptr; + int dsize; +} datum; + +typedef DB DBM; +#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE + +__BEGIN_DECLS +void dbm_close (DBM *); +int dbm_delete (DBM *, datum); +datum dbm_fetch (DBM *, datum); +datum dbm_firstkey (DBM *); +long dbm_forder (DBM *, datum); +datum dbm_nextkey (DBM *); +DBM *dbm_open (const char *, int, int); +int dbm_store (DBM *, datum, datum, int); +int dbm_dirfno (DBM *); +__END_DECLS + +#endif /* !_NDBM_H_ */ diff --git a/dbm/include/nsres.h b/dbm/include/nsres.h new file mode 100644 index 000000000..f3f4e2d1a --- /dev/null +++ b/dbm/include/nsres.h @@ -0,0 +1,41 @@ +#ifndef NSRES_H +#define NSRES_H +#include "mcom_db.h" + +__BEGIN_DECLS + +/* C version */ +#define NSRESHANDLE void * + +typedef void (*NSRESTHREADFUNC)(void *); + +typedef struct NSRESTHREADINFO +{ + void *lock; + NSRESTHREADFUNC fn_lock; + NSRESTHREADFUNC fn_unlock; +} NSRESTHREADINFO; + +#define MAXBUFNUM 10 +#define MAXSTRINGLEN 300 + +#define NSRES_CREATE 1 +#define NSRES_OPEN 2 + + + +NSRESHANDLE NSResCreateTable(const char *filename, NSRESTHREADINFO *threadinfo); +NSRESHANDLE NSResOpenTable(const char *filename, NSRESTHREADINFO *threadinfo); +void NSResCloseTable(NSRESHANDLE handle); + +char *NSResLoadString(NSRESHANDLE handle, const char * library, int32 id, + unsigned int charsetid, char *retbuf); +int32 NSResGetSize(NSRESHANDLE handle, const char *library, int32 id); +int32 NSResLoadResource(NSRESHANDLE handle, const char *library, int32 id, char *retbuf); +int NSResAddString(NSRESHANDLE handle, const char *library, int32 id, const char *string, unsigned int charset); + +__END_DECLS + + +#endif + diff --git a/dbm/include/page.h b/dbm/include/page.h new file mode 100644 index 000000000..faf2b815b --- /dev/null +++ b/dbm/include/page.h @@ -0,0 +1,96 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + * + * @(#)page.h 8.2 (Berkeley) 5/31/94 + */ + +/* + * Definitions for hashing page file format. + */ + +/* + * routines dealing with a data page + * + * page format: + * +------------------------------+ + * p | n | keyoff | datoff | keyoff | + * +------------+--------+--------+ + * | datoff | free | ptr | --> | + * +--------+---------------------+ + * | F R E E A R E A | + * +--------------+---------------+ + * | <---- - - - | data | + * +--------+-----+----+----------+ + * | key | data | key | + * +--------+----------+----------+ + * + * Pointer to the free space is always: p[p[0] + 2] + * Amount of free space on the page is: p[p[0] + 1] + */ + +/* + * How many bytes required for this pair? + * 2 shorts in the table at the top of the page + room for the + * key and room for the data + * + * We prohibit entering a pair on a page unless there is also room to append + * an overflow page. The reason for this it that you can get in a situation + * where a single key/data pair fits on a page, but you can't append an + * overflow page and later you'd have to split the key/data and handle like + * a big pair. + * You might as well do this up front. + */ +#ifndef PAGE_H +#define PAGE_H + +#define PAIRSIZE(K,D) (2*sizeof(uint16) + (K)->size + (D)->size) +#define BIGOVERHEAD (4*sizeof(uint16)) +#define KEYSIZE(K) (4*sizeof(uint16) + (K)->size); +#define OVFLSIZE (2*sizeof(uint16)) +#define FREESPACE(P) ((P)[(P)[0]+1]) +#define OFFSET(P) ((P)[(P)[0]+2]) +#define PAIRFITS(P,K,D) \ + (((P)[2] >= REAL_KEY) && \ + (PAIRSIZE((K),(D)) + OVFLSIZE) <= FREESPACE((P))) +#define PAGE_META(N) (((N)+3) * sizeof(uint16)) + +typedef struct { + BUFHEAD *newp; + BUFHEAD *oldp; + BUFHEAD *nextp; + uint16 next_addr; +} SPLIT_RETURN; +#endif + diff --git a/dbm/include/queue.h b/dbm/include/queue.h new file mode 100644 index 000000000..40d32ccb6 --- /dev/null +++ b/dbm/include/queue.h @@ -0,0 +1,245 @@ +/* + * Copyright (c) 1991, 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. + * + * @(#)queue.h 8.3 (Berkeley) 12/13/93 + */ + +#ifndef _QUEUE_H_ +#define _QUEUE_H_ + +/* + * This file defines three types of data structures: lists, tail queues, + * and circular queues. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list after + * an existing element or at the head of the list. A list may only be + * traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A tail queue may only be traversed in the forward direction. + * + * A circle queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or after + * an existing element, at the head of the list, or at the end of the list. + * A circle queue may be traversed in either direction, but has a more + * complex end of list detection. + * + * For details on the use of these macros, see the queue(3) manual page. + */ + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ +struct name { \ + struct type *lh_first; /* first element */ \ +} + +#define LIST_ENTRY(type) \ +struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ +} + +/* + * List functions. + */ +#define LIST_INIT(head) { \ + (head)->lh_first = NULL; \ +} + +#define LIST_INSERT_AFTER(listelm, elm, field) { \ + if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ + (listelm)->field.le_next->field.le_prev = \ + &(elm)->field.le_next; \ + (listelm)->field.le_next = (elm); \ + (elm)->field.le_prev = &(listelm)->field.le_next; \ +} + +#define LIST_INSERT_HEAD(head, elm, field) { \ + if (((elm)->field.le_next = (head)->lh_first) != NULL) \ + (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ + (head)->lh_first = (elm); \ + (elm)->field.le_prev = &(head)->lh_first; \ +} + +#define LIST_REMOVE(elm, field) { \ + if ((elm)->field.le_next != NULL) \ + (elm)->field.le_next->field.le_prev = \ + (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ +} + +/* + * Tail queue definitions. + */ +#define TAILQ_HEAD(name, type) \ +struct name { \ + struct type *tqh_first; /* first element */ \ + struct type **tqh_last; /* addr of last next element */ \ +} + +#define TAILQ_ENTRY(type) \ +struct { \ + struct type *tqe_next; /* next element */ \ + struct type **tqe_prev; /* address of previous next element */ \ +} + +/* + * Tail queue functions. + */ +#define TAILQ_INIT(head) { \ + (head)->tqh_first = NULL; \ + (head)->tqh_last = &(head)->tqh_first; \ +} + +#define TAILQ_INSERT_HEAD(head, elm, field) { \ + if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ + (elm)->field.tqe_next->field.tqe_prev = \ + &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (head)->tqh_first = (elm); \ + (elm)->field.tqe_prev = &(head)->tqh_first; \ +} + +#define TAILQ_INSERT_TAIL(head, elm, field) { \ + (elm)->field.tqe_next = NULL; \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &(elm)->field.tqe_next; \ +} + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \ + if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ + (elm)->field.tqe_next->field.tqe_prev = \ + &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (listelm)->field.tqe_next = (elm); \ + (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ +} + +#define TAILQ_REMOVE(head, elm, field) { \ + if (((elm)->field.tqe_next) != NULL) \ + (elm)->field.tqe_next->field.tqe_prev = \ + (elm)->field.tqe_prev; \ + else \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ +} + +/* + * Circular queue definitions. + */ +#define CIRCLEQ_HEAD(name, type) \ +struct name { \ + struct type *cqh_first; /* first element */ \ + struct type *cqh_last; /* last element */ \ +} + +#define CIRCLEQ_ENTRY(type) \ +struct { \ + struct type *cqe_next; /* next element */ \ + struct type *cqe_prev; /* previous element */ \ +} + +/* + * Circular queue functions. + */ +#define CIRCLEQ_INIT(head) { \ + (head)->cqh_first = (void *)(head); \ + (head)->cqh_last = (void *)(head); \ +} + +#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \ + (elm)->field.cqe_next = (listelm)->field.cqe_next; \ + (elm)->field.cqe_prev = (listelm); \ + if ((listelm)->field.cqe_next == (void *)(head)) \ + (head)->cqh_last = (elm); \ + else \ + (listelm)->field.cqe_next->field.cqe_prev = (elm); \ + (listelm)->field.cqe_next = (elm); \ +} + +#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \ + (elm)->field.cqe_next = (listelm); \ + (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ + if ((listelm)->field.cqe_prev == (void *)(head)) \ + (head)->cqh_first = (elm); \ + else \ + (listelm)->field.cqe_prev->field.cqe_next = (elm); \ + (listelm)->field.cqe_prev = (elm); \ +} + +#define CIRCLEQ_INSERT_HEAD(head, elm, field) { \ + (elm)->field.cqe_next = (head)->cqh_first; \ + (elm)->field.cqe_prev = (void *)(head); \ + if ((head)->cqh_last == (void *)(head)) \ + (head)->cqh_last = (elm); \ + else \ + (head)->cqh_first->field.cqe_prev = (elm); \ + (head)->cqh_first = (elm); \ +} + +#define CIRCLEQ_INSERT_TAIL(head, elm, field) { \ + (elm)->field.cqe_next = (void *)(head); \ + (elm)->field.cqe_prev = (head)->cqh_last; \ + if ((head)->cqh_first == (void *)(head)) \ + (head)->cqh_first = (elm); \ + else \ + (head)->cqh_last->field.cqe_next = (elm); \ + (head)->cqh_last = (elm); \ +} + +#define CIRCLEQ_REMOVE(head, elm, field) { \ + if ((elm)->field.cqe_next == (void *)(head)) \ + (head)->cqh_last = (elm)->field.cqe_prev; \ + else \ + (elm)->field.cqe_next->field.cqe_prev = \ + (elm)->field.cqe_prev; \ + if ((elm)->field.cqe_prev == (void *)(head)) \ + (head)->cqh_first = (elm)->field.cqe_next; \ + else \ + (elm)->field.cqe_prev->field.cqe_next = \ + (elm)->field.cqe_next; \ +} +#endif /* !_QUEUE_H_ */ diff --git a/dbm/include/search.h b/dbm/include/search.h new file mode 100644 index 000000000..ff58b1c15 --- /dev/null +++ b/dbm/include/search.h @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + * + * @(#)search.h 8.1 (Berkeley) 6/4/93 + */ + +/* Backward compatibility to hsearch interface. */ +typedef struct entry { + char *key; + char *data; +} ENTRY; + +typedef enum { + FIND, ENTER +} ACTION; + +int hcreate (unsigned int); +void hdestroy (void); +ENTRY *hsearch (ENTRY, ACTION); diff --git a/dbm/include/watcomfx.h b/dbm/include/watcomfx.h new file mode 100644 index 000000000..3020e9de9 --- /dev/null +++ b/dbm/include/watcomfx.h @@ -0,0 +1,26 @@ +#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) +#ifndef __WATCOM_FIX_H__ +#define __WATCOM_FIX_H__ 1 +/* + * WATCOM's C compiler doesn't default to "__cdecl" conventions for external + * symbols and functions. Rather than adding an explicit __cdecl modifier to + * every external symbol and function declaration and definition, we use the + * following pragma to (attempt to) change WATCOM c's default to __cdecl. + * These pragmas were taken from pages 180-181, 266 & 269 of the + * Watcom C/C++ version 11 User's Guide, 3rd edition. + */ +#if defined(XP_WIN16) || defined(WIN16) +#pragma aux default "_*" \ + parm caller [] \ + value struct float struct routine [ax] \ + modify [ax bx cx dx es] +#else +#pragma aux default "_*" \ + parm caller [] \ + value struct float struct routine [eax] \ + modify [eax ecx edx] +#endif +#pragma aux default far + +#endif /* once */ +#endif /* WATCOM compiler */ diff --git a/dbm/include/winfile.h b/dbm/include/winfile.h new file mode 100644 index 000000000..1fd54d578 --- /dev/null +++ b/dbm/include/winfile.h @@ -0,0 +1,106 @@ + +/* --------------------------------------------------------------------------- + Stuff to fake unix file I/O on windows boxes + ------------------------------------------------------------------------*/ + +#ifndef WINFILE_H +#define WINFILE_H + +#ifdef _WINDOWS +/* hacked out of <dirent.h> on an SGI */ +#if defined(XP_WIN32) || defined(_WIN32) +/* 32-bit stuff here */ +#include <windows.h> +#include <stdlib.h> +#ifdef __MINGW32__ +#include <sys/types.h> +#include <sys/stat.h> +#else +#include <sys\types.h> +#include <sys\stat.h> +#endif + +typedef struct DIR_Struct { + void * directoryPtr; + WIN32_FIND_DATA data; +} DIR; + +#define _ST_FSTYPSZ 16 + +#if !defined(__BORLANDC__) && !defined(__GNUC__) + typedef unsigned long mode_t; + typedef long uid_t; + typedef long gid_t; + typedef long off_t; + typedef unsigned long nlink_t; +#endif + +typedef struct timestruc { + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ +} timestruc_t; + + +struct dirent { /* data from readdir() */ + ino_t d_ino; /* inode number of entry */ + off_t d_off; /* offset of disk direntory entry */ + unsigned short d_reclen; /* length of this record */ + char d_name[_MAX_FNAME]; /* name of file */ +}; + +#if !defined(__BORLANDC__) && !defined (__GNUC__) +#define S_ISDIR(s) ((s) & _S_IFDIR) +#endif + +#else /* _WIN32 */ +/* 16-bit windows stuff */ + +#include <sys\types.h> +#include <sys\stat.h> +#include <dos.h> + + + +/* Getting cocky to support multiple file systems */ +typedef struct dirStruct_tag { + struct _find_t file_data; + char c_checkdrive; +} dirStruct; + +typedef struct DIR_Struct { + void * directoryPtr; + dirStruct data; +} DIR; + +#define _ST_FSTYPSZ 16 +typedef unsigned long mode_t; +typedef long uid_t; +typedef long gid_t; +typedef long off_t; +typedef unsigned long nlink_t; + +typedef struct timestruc { + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ +} timestruc_t; + +struct dirent { /* data from readdir() */ + ino_t d_ino; /* inode number of entry */ + off_t d_off; /* offset of disk direntory entry */ + unsigned short d_reclen; /* length of this record */ +#ifdef XP_WIN32 + char d_name[_MAX_FNAME]; /* name of file */ +#else + char d_name[20]; /* name of file */ +#endif +}; + +#define S_ISDIR(s) ((s) & _S_IFDIR) + +#endif /* 16-bit windows */ + +#define CONST const + +#endif /* _WINDOWS */ + +#endif /* WINFILE_H */ diff --git a/dbm/macbuild/DBM.Prefix b/dbm/macbuild/DBM.Prefix new file mode 100644 index 000000000..bace25e50 --- /dev/null +++ b/dbm/macbuild/DBM.Prefix @@ -0,0 +1,33 @@ +/* -*- 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.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. + * + * Contributor(s): + */ + +// +// DBM.Prefix +// +// Global prefix file for the non-debug DBM project. +// +// + + +#include "MacPrefix.h" +#include "DBMConfig.h" + diff --git a/dbm/macbuild/DBM.xml b/dbm/macbuild/DBM.xml new file mode 100644 index 000000000..375068925 --- /dev/null +++ b/dbm/macbuild/DBM.xml @@ -0,0 +1,4326 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<?codewarrior exportversion="1.0.1" ideversion="4.2" ?> + +<!DOCTYPE PROJECT [ +<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)> +<!ELEMENT TARGETLIST (TARGET+)> +<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?, FRAMEWORKLIST)> +<!ELEMENT NAME (#PCDATA)> +<!ELEMENT USERSOURCETREETYPE (#PCDATA)> +<!ELEMENT PATH (#PCDATA)> +<!ELEMENT FILELIST (FILE*)> +<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)> +<!ELEMENT PATHTYPE (#PCDATA)> +<!ELEMENT PATHROOT (#PCDATA)> +<!ELEMENT ACCESSPATH (#PCDATA)> +<!ELEMENT PATHFORMAT (#PCDATA)> +<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)> +<!ELEMENT FILEKIND (#PCDATA)> +<!ELEMENT FILEFLAGS (#PCDATA)> +<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)> +<!ELEMENT TARGETNAME (#PCDATA)> +<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)> +<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))> +<!ELEMENT PANELDATA (NAME, VALUE)> +<!ELEMENT VALUE (#PCDATA)> +<!ELEMENT LINKORDER (FILEREF*)> +<!ELEMENT SEGMENTLIST (SEGMENT+)> +<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)> +<!ELEMENT ATTRIBUTES (#PCDATA)> +<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)> +<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)> +<!ELEMENT BASEADDRESS (#PCDATA)> +<!ELEMENT OVERLAY (NAME, FILEREF*)> +<!ELEMENT SUBTARGETLIST (SUBTARGET+)> +<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)> +<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)> +<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)> +<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)> +<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)> +<!ELEMENT FRAMEWORKLIST (FRAMEWORK+)> +<!ELEMENT FRAMEWORK (FILEREF, LIBRARYFILE?, VERSION?)> +<!ELEMENT LIBRARYFILE (FILEREF)> +<!ELEMENT VERSION (#PCDATA)> +<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*> +<!ELEMENT ORDEREDTARGET (NAME)> +<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)> +<!ELEMENT GROUPLIST (GROUP|FILEREF)*> +<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)> +<!ELEMENT DESIGNLIST (DESIGN+)> +<!ELEMENT DESIGN (NAME, DESIGNDATA)> +<!ELEMENT DESIGNDATA (#PCDATA)> +]> + +<PROJECT> + <TARGETLIST> + <TARGET> + <NAME>DBM.shlb</NAME> + <SETTINGLIST> + + <!-- Settings for "Source Trees" panel --> + <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Access Paths" panel --> + <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>UserSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_stubs:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + <SETTING><NAME>SystemSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Debugger Runtime" panel --> + <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Target Settings" panel --> + <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> + <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Targetname</NAME><VALUE>DBM.shlb</VALUE></SETTING> + <SETTING><NAME>OutputDirectory</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "File Mappings" panel --> + <SETTING><NAME>FileMappings</NAME> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Build Extras" panel --> + <SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>DebuggerAppPath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DebuggerWorkingDir</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Debugger Target" panel --> + <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> + <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>AltExePath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> + <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Remote Debug" panel --> + <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Auto-target" panel --> + <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Custom Keywords" panel --> + <SETTING><NAME>CustomColor1</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor2</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor3</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor4</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "C/C++ Compiler" panel --> + <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>DBM.Prefix</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "C/C++ Warnings" panel --> + <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "FTP Panel" panel --> + <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_uploadDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_port</NAME><VALUE>21</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_SendBin</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ShouldLog</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Command Line" panel --> + <SETTING><NAME>MWCommandLine_Java_clsName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWCommandLine_Java_args</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PJavaDebugging" panel --> + <SETTING><NAME>MWVJavaDebugging_Protocol</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_JDKVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_TimeOut</NAME><VALUE>10</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_SupportSlowDevices</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java Language" panel --> + <SETTING><NAME>MWJava_Language_optimize</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_warnDeprecated</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitMap</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileNames</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileHierarchy</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_1_1_Compatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitHeaders</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_headerType</NAME><VALUE>JNINativeHeaders</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_packageFilter</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genComments</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genHeaders</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java MRJAppBuilder" panel --> + <SETTING><NAME>MWJava_MRJAppBuilder_outFile</NAME><VALUE>MRJApplication</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_merge</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_quitMenu</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_grow</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPICTFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_aboutName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Java Output" panel --> + <SETTING><NAME>MWJava_Output_outputtype</NAME><VALUE>JarFile</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_outfile</NAME><VALUE>JavaClasses.jar</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_ftype</NAME><VALUE>1514754080</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_fcreator</NAME><VALUE>1297570384</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_genManifest</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_trunctype</NAME><VALUE>Front</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_deleteClasses</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_consoleApp</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Project" panel --> + <SETTING><NAME>MWJava_Proj_projtype</NAME><VALUE>Applet</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_mainClassName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppCreator</NAME><VALUE>1463898714</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppWin32Name</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_useVM</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmarguments</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_simPropFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "JavaDoc Project" panel --> + <SETTING><NAME>MWJavaDoc_Proj_Version</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Depricated</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Author</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Index</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Tree</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_SunResolveToSame</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Shortnames</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Folder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_GenerateAPILinks</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_scope</NAME><VALUE>Public</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_fcreator</NAME><VALUE>1297303877</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_encodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_decodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_javaPackagePath</NAME><VALUE>http://java.sun.com/products/jdk/1.1/docs/api/</VALUE></SETTING> + + <!-- Settings for "MacOS Merge Panel" panel --> + <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> + <SETTING><VALUE>DLGX</VALUE></SETTING> + <SETTING><VALUE>ckid</VALUE></SETTING> + <SETTING><VALUE>Proj</VALUE></SETTING> + <SETTING><VALUE>WSPC</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Output Flags" panel --> + <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Packager Panel" panel --> + <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen" panel --> + <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen Mach-O" panel --> + <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_vrsave</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_implicit_templates</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Disassembler" panel --> + <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "PPC Linker" panel --> + <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Linker" panel --> + <SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Target" panel --> + <SETTING><NAME>MWProject_MachO_type</NAME><VALUE>Executable</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>a.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>MEXE</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stacksize</NAME><VALUE>64</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stackaddress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING> + + <!-- Settings for "PPC PEF" panel --> + <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING> + <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>100</VALUE></SETTING> + <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE>DBM</VALUE></SETTING> + <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Project" panel --> + <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>DBM.shlb</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>MOZZ</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPCAsm Panel" panel --> + <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Rez Compiler" panel --> + <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> + + <!-- Settings for "WinRC Compiler" panel --> + <SETTING><NAME>MWWinRC_prefixname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "x86 CodeGen" panel --> + <SETTING><NAME>MWCodeGen_X86_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_alignment</NAME><VALUE>bytes8</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_exceptions</NAME><VALUE>ZeroOverhead</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_mmx</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_3dnow</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_use_mmx_3dnow_convention</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_machinecodelisting</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_intrinsics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_syminfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_codeviewinfo</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_cmov_fcomi</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_sse</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "x86 Disassembler" panel --> + <SETTING><NAME>PDisasmX86_showHeaders</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSymTab</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showCode</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSource</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showHex</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRelocation</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showComments</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showDebug</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showExceptions</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showData</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRaw</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_verbose</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "x86 Exceptions Panel" panel --> + <SETTING><NAME>MWDebugger_X86_Exceptions</NAME> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "x86 Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_X86_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_X86_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "x86 Linker" panel --> + <SETTING><NAME>MWLinker_X86_entrypointusage</NAME><VALUE>Default</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_entrypoint</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsystem</NAME><VALUE>WinGUI</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysmajorid</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrmajorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_commandfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_generatemap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linksym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linkCV</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "x86 Project" panel --> + <SETTING><NAME>MWProject_X86_type</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_outfile</NAME><VALUE>noname.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_baseaddress</NAME><VALUE>4194304</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_maxstacksize</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minstacksize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_size</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING> + <PANELDATA><NAME>xpidl Settings</NAME><VALUE> + 0001000101000000000000000000000000000000000000000000000000000000 + 0000000000000000 + </VALUE></PANELDATA> + </SETTINGLIST> + <FILELIST> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFiles.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntime.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + </FILELIST> + <LINKORDER> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntime.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFiles.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </LINKORDER> + </TARGET> + <TARGET> + <NAME>DBMDebug.shlb</NAME> + <SETTINGLIST> + + <!-- Settings for "Source Trees" panel --> + <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Access Paths" panel --> + <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>UserSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_debug:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_stubs:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + <SETTING><NAME>SystemSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Debugger Runtime" panel --> + <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Target Settings" panel --> + <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> + <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Targetname</NAME><VALUE>DBMDebug.shlb</VALUE></SETTING> + <SETTING><NAME>OutputDirectory</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "File Mappings" panel --> + <SETTING><NAME>FileMappings</NAME> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Build Extras" panel --> + <SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>DebuggerAppPath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DebuggerWorkingDir</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Debugger Target" panel --> + <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> + <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>AltExePath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> + <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Remote Debug" panel --> + <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Auto-target" panel --> + <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Custom Keywords" panel --> + <SETTING><NAME>CustomColor1</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor2</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor3</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor4</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "C/C++ Compiler" panel --> + <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>DBMDebug.Prefix</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "C/C++ Warnings" panel --> + <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "FTP Panel" panel --> + <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_uploadDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_port</NAME><VALUE>21</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_SendBin</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ShouldLog</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Command Line" panel --> + <SETTING><NAME>MWCommandLine_Java_clsName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWCommandLine_Java_args</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PJavaDebugging" panel --> + <SETTING><NAME>MWVJavaDebugging_Protocol</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_JDKVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_TimeOut</NAME><VALUE>10</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_SupportSlowDevices</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java Language" panel --> + <SETTING><NAME>MWJava_Language_optimize</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_warnDeprecated</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitMap</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileNames</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileHierarchy</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_1_1_Compatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitHeaders</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_headerType</NAME><VALUE>JNINativeHeaders</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_packageFilter</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genComments</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genHeaders</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java MRJAppBuilder" panel --> + <SETTING><NAME>MWJava_MRJAppBuilder_outFile</NAME><VALUE>MRJApplication</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_merge</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_quitMenu</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_grow</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPICTFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_aboutName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Java Output" panel --> + <SETTING><NAME>MWJava_Output_outputtype</NAME><VALUE>JarFile</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_outfile</NAME><VALUE>JavaClasses.jar</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_ftype</NAME><VALUE>1514754080</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_fcreator</NAME><VALUE>1297570384</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_genManifest</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_trunctype</NAME><VALUE>Front</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_deleteClasses</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_consoleApp</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Project" panel --> + <SETTING><NAME>MWJava_Proj_projtype</NAME><VALUE>Applet</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_mainClassName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppCreator</NAME><VALUE>1463898714</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppWin32Name</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_useVM</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmarguments</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_simPropFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "JavaDoc Project" panel --> + <SETTING><NAME>MWJavaDoc_Proj_Version</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Depricated</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Author</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Index</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Tree</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_SunResolveToSame</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Shortnames</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Folder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_GenerateAPILinks</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_scope</NAME><VALUE>Public</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_fcreator</NAME><VALUE>1297303877</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_encodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_decodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_javaPackagePath</NAME><VALUE>http://java.sun.com/products/jdk/1.1/docs/api/</VALUE></SETTING> + + <!-- Settings for "MacOS Merge Panel" panel --> + <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> + <SETTING><VALUE>DLGX</VALUE></SETTING> + <SETTING><VALUE>ckid</VALUE></SETTING> + <SETTING><VALUE>Proj</VALUE></SETTING> + <SETTING><VALUE>WSPC</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Output Flags" panel --> + <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Packager Panel" panel --> + <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen" panel --> + <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen Mach-O" panel --> + <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_vrsave</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_implicit_templates</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Disassembler" panel --> + <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "PPC Linker" panel --> + <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE>__initialize</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>__terminate</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Linker" panel --> + <SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Target" panel --> + <SETTING><NAME>MWProject_MachO_type</NAME><VALUE>Executable</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>a.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>MEXE</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stacksize</NAME><VALUE>64</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stackaddress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING> + + <!-- Settings for "PPC PEF" panel --> + <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING> + <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>100</VALUE></SETTING> + <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE>DBM</VALUE></SETTING> + <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Project" panel --> + <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>DBMDebug.shlb</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>MOZZ</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPCAsm Panel" panel --> + <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Rez Compiler" panel --> + <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> + + <!-- Settings for "WinRC Compiler" panel --> + <SETTING><NAME>MWWinRC_prefixname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "x86 CodeGen" panel --> + <SETTING><NAME>MWCodeGen_X86_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_alignment</NAME><VALUE>bytes8</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_exceptions</NAME><VALUE>ZeroOverhead</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_mmx</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_3dnow</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_use_mmx_3dnow_convention</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_machinecodelisting</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_intrinsics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_syminfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_codeviewinfo</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_cmov_fcomi</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_sse</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "x86 Disassembler" panel --> + <SETTING><NAME>PDisasmX86_showHeaders</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSymTab</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showCode</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSource</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showHex</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRelocation</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showComments</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showDebug</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showExceptions</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showData</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRaw</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_verbose</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "x86 Exceptions Panel" panel --> + <SETTING><NAME>MWDebugger_X86_Exceptions</NAME> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "x86 Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_X86_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_X86_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "x86 Linker" panel --> + <SETTING><NAME>MWLinker_X86_entrypointusage</NAME><VALUE>Default</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_entrypoint</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsystem</NAME><VALUE>WinGUI</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysmajorid</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrmajorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_commandfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_generatemap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linksym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linkCV</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "x86 Project" panel --> + <SETTING><NAME>MWProject_X86_type</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_outfile</NAME><VALUE>noname.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_baseaddress</NAME><VALUE>4194304</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_maxstacksize</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minstacksize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_size</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING> + <PANELDATA><NAME>xpidl Settings</NAME><VALUE> + 0001000101000000000000000000000000000000000000000000000000000000 + 0000000000000000 + </VALUE></PANELDATA> + </SETTINGLIST> + <FILELIST> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFilesDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntimeDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20Debug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Library</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + </FILELIST> + <LINKORDER> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20Debug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFilesDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntimeDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </LINKORDER> + </TARGET> + <TARGET> + <NAME>DBM.o</NAME> + <SETTINGLIST> + + <!-- Settings for "Source Trees" panel --> + <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Access Paths" panel --> + <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>UserSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_stubs:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + <SETTING><NAME>SystemSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Debugger Runtime" panel --> + <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Target Settings" panel --> + <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> + <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Targetname</NAME><VALUE>DBM.o</VALUE></SETTING> + <SETTING><NAME>OutputDirectory</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "File Mappings" panel --> + <SETTING><NAME>FileMappings</NAME> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Build Extras" panel --> + <SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>DebuggerAppPath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DebuggerWorkingDir</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Debugger Target" panel --> + <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> + <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>AltExePath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> + <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Remote Debug" panel --> + <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Auto-target" panel --> + <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Custom Keywords" panel --> + <SETTING><NAME>CustomColor1</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor2</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor3</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor4</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "C/C++ Compiler" panel --> + <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>DBM.Prefix</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "C/C++ Warnings" panel --> + <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "FTP Panel" panel --> + <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_uploadDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_port</NAME><VALUE>21</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_SendBin</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ShouldLog</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Command Line" panel --> + <SETTING><NAME>MWCommandLine_Java_clsName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWCommandLine_Java_args</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PJavaDebugging" panel --> + <SETTING><NAME>MWVJavaDebugging_Protocol</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_JDKVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_TimeOut</NAME><VALUE>10</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_SupportSlowDevices</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java Language" panel --> + <SETTING><NAME>MWJava_Language_optimize</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_warnDeprecated</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitMap</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileNames</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileHierarchy</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_1_1_Compatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitHeaders</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_headerType</NAME><VALUE>JNINativeHeaders</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_packageFilter</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genComments</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genHeaders</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java MRJAppBuilder" panel --> + <SETTING><NAME>MWJava_MRJAppBuilder_outFile</NAME><VALUE>MRJApplication</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_merge</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_quitMenu</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_grow</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPICTFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_aboutName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Java Output" panel --> + <SETTING><NAME>MWJava_Output_outputtype</NAME><VALUE>JarFile</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_outfile</NAME><VALUE>JavaClasses.jar</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_ftype</NAME><VALUE>1514754080</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_fcreator</NAME><VALUE>1297570384</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_genManifest</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_trunctype</NAME><VALUE>Front</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_deleteClasses</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_consoleApp</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Project" panel --> + <SETTING><NAME>MWJava_Proj_projtype</NAME><VALUE>Applet</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_mainClassName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppCreator</NAME><VALUE>1463898714</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppWin32Name</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_useVM</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmarguments</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_simPropFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "JavaDoc Project" panel --> + <SETTING><NAME>MWJavaDoc_Proj_Version</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Depricated</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Author</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Index</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Tree</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_SunResolveToSame</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Shortnames</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Folder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_GenerateAPILinks</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_scope</NAME><VALUE>Public</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_fcreator</NAME><VALUE>1297303877</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_encodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_decodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_javaPackagePath</NAME><VALUE>http://java.sun.com/products/jdk/1.1/docs/api/</VALUE></SETTING> + + <!-- Settings for "MacOS Merge Panel" panel --> + <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> + <SETTING><VALUE>DLGX</VALUE></SETTING> + <SETTING><VALUE>ckid</VALUE></SETTING> + <SETTING><VALUE>Proj</VALUE></SETTING> + <SETTING><VALUE>WSPC</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Output Flags" panel --> + <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Packager Panel" panel --> + <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen" panel --> + <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen Mach-O" panel --> + <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_vrsave</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_implicit_templates</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Disassembler" panel --> + <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "PPC Linker" panel --> + <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Linker" panel --> + <SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Target" panel --> + <SETTING><NAME>MWProject_MachO_type</NAME><VALUE>Executable</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>a.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>MEXE</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stacksize</NAME><VALUE>64</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stackaddress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING> + + <!-- Settings for "PPC PEF" panel --> + <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING> + <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Project" panel --> + <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Library</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>DBM.o</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPCAsm Panel" panel --> + <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Rez Compiler" panel --> + <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> + + <!-- Settings for "WinRC Compiler" panel --> + <SETTING><NAME>MWWinRC_prefixname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "x86 CodeGen" panel --> + <SETTING><NAME>MWCodeGen_X86_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_alignment</NAME><VALUE>bytes8</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_exceptions</NAME><VALUE>ZeroOverhead</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_mmx</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_3dnow</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_use_mmx_3dnow_convention</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_machinecodelisting</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_intrinsics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_syminfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_codeviewinfo</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_cmov_fcomi</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_sse</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "x86 Disassembler" panel --> + <SETTING><NAME>PDisasmX86_showHeaders</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSymTab</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showCode</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSource</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showHex</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRelocation</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showComments</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showDebug</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showExceptions</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showData</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRaw</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_verbose</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "x86 Exceptions Panel" panel --> + <SETTING><NAME>MWDebugger_X86_Exceptions</NAME> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "x86 Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_X86_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_X86_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "x86 Linker" panel --> + <SETTING><NAME>MWLinker_X86_entrypointusage</NAME><VALUE>Default</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_entrypoint</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsystem</NAME><VALUE>WinGUI</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysmajorid</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrmajorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_commandfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_generatemap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linksym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linkCV</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "x86 Project" panel --> + <SETTING><NAME>MWProject_X86_type</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_outfile</NAME><VALUE>noname.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_baseaddress</NAME><VALUE>4194304</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_maxstacksize</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minstacksize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_size</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING> + <PANELDATA><NAME>xpidl Settings</NAME><VALUE> + 0001000101000000000000000000000000000000000000000000000000000000 + 0000000000000000 + </VALUE></PANELDATA> + </SETTINGLIST> + <FILELIST> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + </FILELIST> + <LINKORDER> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </LINKORDER> + </TARGET> + <TARGET> + <NAME>DBMDebug.o</NAME> + <SETTINGLIST> + + <!-- Settings for "Source Trees" panel --> + <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Access Paths" panel --> + <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>UserSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>::src:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:client_stubs:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + <SETTING><NAME>SystemSearchPaths</NAME> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>SearchPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> + </SETTING> + <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Debugger Runtime" panel --> + <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Target Settings" panel --> + <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> + <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Targetname</NAME><VALUE>DBMDebug.o</VALUE></SETTING> + <SETTING><NAME>OutputDirectory</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "File Mappings" panel --> + <SETTING><NAME>FileMappings</NAME> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> + </SETTING> + <SETTING> + <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> + <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> + </SETTING> + </SETTING> + + <!-- Settings for "Build Extras" panel --> + <SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>DebuggerAppPath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DebuggerWorkingDir</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Debugger Target" panel --> + <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> + <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>AltExePath</NAME> + <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> + </SETTING> + <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> + <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Remote Debug" panel --> + <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Auto-target" panel --> + <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Custom Keywords" panel --> + <SETTING><NAME>CustomColor1</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor2</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor3</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + <SETTING><NAME>CustomColor4</NAME> + <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING> + <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "C/C++ Compiler" panel --> + <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>DBMDebug.Prefix</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "C/C++ Warnings" panel --> + <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "FTP Panel" panel --> + <SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_uploadDir</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ftp_port</NAME><VALUE>21</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_SendBin</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWFTP_Post_ShouldLog</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Command Line" panel --> + <SETTING><NAME>MWCommandLine_Java_clsName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWCommandLine_Java_args</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PJavaDebugging" panel --> + <SETTING><NAME>MWVJavaDebugging_Protocol</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_JDKVersion</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_TimeOut</NAME><VALUE>10</VALUE></SETTING> + <SETTING><NAME>MWVJavaDebugging_SupportSlowDevices</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java Language" panel --> + <SETTING><NAME>MWJava_Language_optimize</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_warnDeprecated</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitMap</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileNames</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_strictFileHierarchy</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_1_1_Compatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_emitHeaders</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_headerType</NAME><VALUE>JNINativeHeaders</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_packageFilter</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genComments</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_Language_genHeaders</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "Java MRJAppBuilder" panel --> + <SETTING><NAME>MWJava_MRJAppBuilder_outFile</NAME><VALUE>MRJApplication</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_merge</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_quitMenu</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_grow</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinType</NAME><VALUE>Console</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_appIconFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_splashScreenPICTFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_aboutName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdoutAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrFile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stderrAppend</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinPTree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_MRJAppBuilder_stdinFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Java Output" panel --> + <SETTING><NAME>MWJava_Output_outputtype</NAME><VALUE>JarFile</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_outfile</NAME><VALUE>JavaClasses.jar</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_ftype</NAME><VALUE>1514754080</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_fcreator</NAME><VALUE>1297570384</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_genManifest</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_trunctype</NAME><VALUE>Front</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_deleteClasses</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Output_consoleApp</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "Java Project" panel --> + <SETTING><NAME>MWJava_Proj_projtype</NAME><VALUE>Applet</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_mainClassName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppCreator</NAME><VALUE>1463898714</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathVersion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathType</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_PathFormat</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_tree</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_HTMLAppWin32Name</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_compress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_useVM</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmarguments</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_vmName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJava_Proj_simPropFile</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "JavaDoc Project" panel --> + <SETTING><NAME>MWJavaDoc_Proj_Version</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Depricated</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Author</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Index</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Tree</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_SunResolveToSame</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Shortnames</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_Folder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_GenerateAPILinks</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_scope</NAME><VALUE>Public</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_fcreator</NAME><VALUE>1297303877</VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_encodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_decodingName</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWJavaDoc_Proj_javaPackagePath</NAME><VALUE>http://java.sun.com/products/jdk/1.1/docs/api/</VALUE></SETTING> + + <!-- Settings for "MacOS Merge Panel" panel --> + <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> + <SETTING><VALUE>DLGX</VALUE></SETTING> + <SETTING><VALUE>ckid</VALUE></SETTING> + <SETTING><VALUE>Proj</VALUE></SETTING> + <SETTING><VALUE>WSPC</VALUE></SETTING> + </SETTING> + + <!-- Settings for "Output Flags" panel --> + <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "Packager Panel" panel --> + <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen" panel --> + <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC CodeGen Mach-O" panel --> + <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_tracebacktables</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_profiler</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_processorspecific</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_vrsave</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_MachO_implicit_templates</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Disassembler" panel --> + <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "PPC Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "PPC Linker" panel --> + <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Linker" panel --> + <SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Mach-O Target" panel --> + <SETTING><NAME>MWProject_MachO_type</NAME><VALUE>Executable</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>a.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>MEXE</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stacksize</NAME><VALUE>64</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_stackaddress</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE>a.rsrc</VALUE></SETTING> + <SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING> + + <!-- Settings for "PPC PEF" panel --> + <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING> + <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> + <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "PPC Project" panel --> + <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Library</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>DBMDebug.o</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME> + <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> + <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> + <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> + </SETTING> + <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "PPCAsm Panel" panel --> + <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "Rez Compiler" panel --> + <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> + + <!-- Settings for "WinRC Compiler" panel --> + <SETTING><NAME>MWWinRC_prefixname</NAME><VALUE></VALUE></SETTING> + + <!-- Settings for "x86 CodeGen" panel --> + <SETTING><NAME>MWCodeGen_X86_processor</NAME><VALUE>Generic</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_alignment</NAME><VALUE>bytes8</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_exceptions</NAME><VALUE>ZeroOverhead</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_mmx</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_3dnow</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_use_mmx_3dnow_convention</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_machinecodelisting</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_intrinsics</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_syminfo</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_codeviewinfo</NAME><VALUE>1</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_cmov_fcomi</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWCodeGen_X86_extinst_sse</NAME><VALUE>0</VALUE></SETTING> + + <!-- Settings for "x86 Disassembler" panel --> + <SETTING><NAME>PDisasmX86_showHeaders</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSymTab</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showCode</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showSource</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showHex</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRelocation</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showComments</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showDebug</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showExceptions</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showData</NAME><VALUE>true</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_showRaw</NAME><VALUE>false</VALUE></SETTING> + <SETTING><NAME>PDisasmX86_verbose</NAME><VALUE>false</VALUE></SETTING> + + <!-- Settings for "x86 Exceptions Panel" panel --> + <SETTING><NAME>MWDebugger_X86_Exceptions</NAME> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + <SETTING><VALUE>0</VALUE></SETTING> + </SETTING> + + <!-- Settings for "x86 Global Optimizer" panel --> + <SETTING><NAME>GlobalOptimizer_X86_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> + <SETTING><NAME>GlobalOptimizer_X86_optfor</NAME><VALUE>Speed</VALUE></SETTING> + + <!-- Settings for "x86 Linker" panel --> + <SETTING><NAME>MWLinker_X86_entrypointusage</NAME><VALUE>Default</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_entrypoint</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsystem</NAME><VALUE>WinGUI</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysmajorid</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_subsysminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrmajorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_usrminorid</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_commandfile</NAME><VALUE></VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_generatemap</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linksym</NAME><VALUE>0</VALUE></SETTING> + <SETTING><NAME>MWLinker_X86_linkCV</NAME><VALUE>1</VALUE></SETTING> + + <!-- Settings for "x86 Project" panel --> + <SETTING><NAME>MWProject_X86_type</NAME><VALUE>Application</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_outfile</NAME><VALUE>noname.exe</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_baseaddress</NAME><VALUE>4194304</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_maxstacksize</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minstacksize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_size</NAME><VALUE>1024</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_minsize</NAME><VALUE>4</VALUE></SETTING> + <SETTING><NAME>MWProject_X86_importlib</NAME><VALUE></VALUE></SETTING> + <PANELDATA><NAME>xpidl Settings</NAME><VALUE> + 0001000101000000000000000000000000000000000000000000000000000000 + 0000000000000000 + </VALUE></PANELDATA> + </SETTINGLIST> + <FILELIST> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + <FILE> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + <FILEKIND>Text</FILEKIND> + <FILEFLAGS>Debug</FILEFLAGS> + </FILE> + </FILELIST> + <LINKORDER> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </LINKORDER> + </TARGET> + </TARGETLIST> + + <TARGETORDER> + <ORDEREDTARGET><NAME>DBM.shlb</NAME></ORDEREDTARGET> + <ORDEREDTARGET><NAME>DBMDebug.shlb</NAME></ORDEREDTARGET> + <ORDEREDTARGET><NAME>DBM.o</NAME></ORDEREDTARGET> + <ORDEREDTARGET><NAME>DBMDebug.o</NAME></ORDEREDTARGET> + </TARGETORDER> + + <GROUPLIST> + <GROUP><NAME>dbm</NAME> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>db.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_bigkey.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_func.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_log2.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>h_page.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>hash_buf.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>hsearch.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>macstubs.c</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </GROUP> + <GROUP><NAME>Netscape Libraries</NAME> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSStdLibStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <GROUP><NAME>Optimized</NAME> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntime.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFiles.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </GROUP> + <GROUP><NAME>Debug</NAME> + <FILEREF> + <TARGETNAME>DBMDebug.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSRuntimeDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBMDebug.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>NSPR20Debug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBMDebug.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>MoreFilesDebug.shlb</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </GROUP> + </GROUP> + <GROUP><NAME>Apple/Other Libs</NAME> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + <FILEREF> + <TARGETNAME>DBM.shlb</TARGETNAME> + <PATHTYPE>Name</PATHTYPE> + <PATH>InterfacesStubs</PATH> + <PATHFORMAT>MacOS</PATHFORMAT> + </FILEREF> + </GROUP> + </GROUPLIST> + +</PROJECT> diff --git a/dbm/macbuild/DBMConfig.h b/dbm/macbuild/DBMConfig.h new file mode 100644 index 000000000..e7ec911c6 --- /dev/null +++ b/dbm/macbuild/DBMConfig.h @@ -0,0 +1,23 @@ +/* -*- 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.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. + * + * Contributor(s): + */ + +#define __DBINTERFACE_PRIVATE 1 diff --git a/dbm/macbuild/DBMDebug.Prefix b/dbm/macbuild/DBMDebug.Prefix new file mode 100644 index 000000000..7d40bdad3 --- /dev/null +++ b/dbm/macbuild/DBMDebug.Prefix @@ -0,0 +1,32 @@ +/* -*- 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.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. + * + * Contributor(s): + */ + +// +// DBMDebug.Prefix +// +// Global prefix file for the debug DBM project. +// +// + +#include "MacPrefix_debug.h" +#include "DBMConfig.h" + diff --git a/dbm/macbuild/macstubs.c b/dbm/macbuild/macstubs.c new file mode 100644 index 000000000..bbfe69a54 --- /dev/null +++ b/dbm/macbuild/macstubs.c @@ -0,0 +1,8 @@ + +// Hack to define a never-called routine from libdbm +#include "mcom_db.h" + +int mkstemp(const char* /*path*/) +{ + return -1; +} diff --git a/dbm/makefile.win b/dbm/makefile.win new file mode 100644 index 000000000..27470574e --- /dev/null +++ b/dbm/makefile.win @@ -0,0 +1,38 @@ +# 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.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. +# +# Contributor(s): + +DEPTH=.. + +#//------------------------------------------------------------------------ +#// +#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...) +#// (these must come before the common makefiles are included) +#// +#// DIRS - There are subdirectories to process +#// +#//------------------------------------------------------------------------ +DIRS = include src + +#//------------------------------------------------------------------------ +#// +#// Include the common makefile rules +#// +#//------------------------------------------------------------------------ +include <$(DEPTH)\config\rules.mak> + diff --git a/dbm/src/.cvsignore b/dbm/src/.cvsignore new file mode 100644 index 000000000..f3c7a7c5d --- /dev/null +++ b/dbm/src/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/dbm/src/Makefile.in b/dbm/src/Makefile.in new file mode 100644 index 000000000..d65e0f8e7 --- /dev/null +++ b/dbm/src/Makefile.in @@ -0,0 +1,77 @@ +# +# 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.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. +# +# Contributor(s): +# + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +LIBRARY_NAME = mozdbm_s +LIB_IS_C_ONLY = 1 + +ifeq ($(OS_ARCH),WINNT) +LIBRARY_NAME = dbm$(MOZ_BITS) +endif + +CSRCS = \ + db.c \ + h_bigkey.c \ + h_func.c \ + h_log2.c \ + h_page.c \ + hash.c \ + hash_buf.c \ + hsearch.c \ + mktemp.c \ + ndbm.c \ + strerror.c \ + nsres.c \ + $(NULL) + +ifeq ($(OS_ARCH),WINNT) +CSRCS += memmove.c snprintf.c +else +ifeq (,$(filter -DHAVE_MEMMOVE=1,$(DEFS))) +CSRCS += memmove.c +endif + +ifeq (,$(filter -DHAVE_SNPRINTF=1,$(DEFS))) +CSRCS += snprintf.c +endif +endif # WINNT + +LOCAL_INCLUDES = -I$(srcdir)/../include + +FORCE_STATIC_LIB = 1 + +include $(topsrcdir)/config/rules.mk + +DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) +ifeq ($(OS_ARCH), Linux) +DEFINES += -D_BSD_SOURCE +endif + +ifeq ($(OS_ARCH),AIX) +OS_LIBS += -lc_r +endif + diff --git a/dbm/src/Makefile.win b/dbm/src/Makefile.win new file mode 100644 index 000000000..060a8c48b --- /dev/null +++ b/dbm/src/Makefile.win @@ -0,0 +1,96 @@ +# 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.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. +# +# Contributor(s): + + +#//------------------------------------------------------------------------ +#// +#// Makefile to build the cert library +#// +#//------------------------------------------------------------------------ + +!if "$(MOZ_BITS)" == "16" +!ifndef MOZ_DEBUG +OPTIMIZER=-Os -UDEBUG -DNDEBUG +!endif +!endif + +#//------------------------------------------------------------------------ +#// +#// Specify the depth of the current directory relative to the +#// root of NS +#// +#//------------------------------------------------------------------------ +DEPTH= ..\.. + +!ifndef MAKE_OBJ_TYPE +MAKE_OBJ_TYPE=EXE +!endif + +#//------------------------------------------------------------------------ +#// +#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...) +#// +#//------------------------------------------------------------------------ +LIBNAME=dbm$(MOZ_BITS) +PDBFILE=$(LIBNAME).pdb + +#//------------------------------------------------------------------------ +#// +#// Define the files necessary to build the target (ie. OBJS) +#// +#//------------------------------------------------------------------------ +OBJS= \ + .\$(OBJDIR)\db.obj \ + .\$(OBJDIR)\h_bigkey.obj \ + .\$(OBJDIR)\h_func.obj \ + .\$(OBJDIR)\h_log2.obj \ + .\$(OBJDIR)\h_page.obj \ + .\$(OBJDIR)\hash.obj \ + .\$(OBJDIR)\hash_buf.obj \ + .\$(OBJDIR)\hsearch.obj \ + .\$(OBJDIR)\memmove.obj \ + .\$(OBJDIR)\mktemp.obj \ + .\$(OBJDIR)\ndbm.obj \ + .\$(OBJDIR)\snprintf.obj \ + .\$(OBJDIR)\strerror.obj \ + .\$(OBJDIR)\nsres.obj \ + $(NULL) + +#//------------------------------------------------------------------------ +#// +#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...) +#// (these must be defined before the common makefiles are included) +#// +#//------------------------------------------------------------------------ +LIBRARY = .\$(OBJDIR)\$(LIBNAME).lib +LINCS = -I..\include + +#//------------------------------------------------------------------------ +#// +#// Include the common makefile rules +#// +#//------------------------------------------------------------------------ +include <$(DEPTH)/config/rules.mak> + +CFLAGS = $(CFLAGS) -DMOZILLA_CLIENT -D__DBINTERFACE_PRIVATE + +install:: $(LIBRARY) + $(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib + + diff --git a/dbm/src/db.c b/dbm/src/db.c new file mode 100644 index 000000000..e4b1fff8f --- /dev/null +++ b/dbm/src/db.c @@ -0,0 +1,144 @@ +/*- + * Copyright (c) 1991, 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)db.c 8.4 (Berkeley) 2/21/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifndef __DBINTERFACE_PRIVATE +#define __DBINTERFACE_PRIVATE +#endif +#ifdef macintosh +#include <unix.h> +#else +#include <sys/types.h> +#endif + +#include <errno.h> +#include <fcntl.h> +#include <stddef.h> +#include <stdio.h> + +#include "mcom_db.h" + +/* a global flag that locks closed all databases */ +int all_databases_locked_closed = 0; + +/* set or unset a global lock flag to disable the + * opening of any DBM file + */ +void +dbSetOrClearDBLock(DBLockFlagEnum type) +{ + if(type == LockOutDatabase) + all_databases_locked_closed = 1; + else + all_databases_locked_closed = 0; +} + +#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) +DB * +#else +PR_IMPLEMENT(DB *) +#endif +dbopen(const char *fname, int flags,int mode, DBTYPE type, const void *openinfo) +{ + + /* lock out all file databases. Let in-memory databases through + */ + if(all_databases_locked_closed && fname) + { + errno = EINVAL; + return(NULL); + } + +#define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN) + + +#if 0 /* most systems dont have EXLOCK and SHLOCK */ +#define USE_OPEN_FLAGS \ + (O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY | \ + O_RDWR | O_SHLOCK | O_TRUNC) +#else +#define USE_OPEN_FLAGS \ + (O_CREAT | O_EXCL | O_RDONLY | \ + O_RDWR | O_TRUNC) +#endif + + if ((flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0) + switch (type) { +/* we don't need btree and recno right now */ +#if 0 + case DB_BTREE: + return (__bt_open(fname, flags & USE_OPEN_FLAGS, + mode, openinfo, flags & DB_FLAGS)); + case DB_RECNO: + return (__rec_open(fname, flags & USE_OPEN_FLAGS, + mode, openinfo, flags & DB_FLAGS)); +#endif + + case DB_HASH: + return (__hash_open(fname, flags & USE_OPEN_FLAGS, + mode, (const HASHINFO *)openinfo, flags & DB_FLAGS)); + default: + break; + } + errno = EINVAL; + return (NULL); +} + +static int +__dberr() +{ + return (RET_ERROR); +} + +/* + * __DBPANIC -- Stop. + * + * Parameters: + * dbp: pointer to the DB structure. + */ +void +__dbpanic(DB *dbp) +{ + /* The only thing that can succeed is a close. */ + dbp->del = (int (*)(const struct __db *, const DBT *, uint))__dberr; + dbp->fd = (int (*)(const struct __db *))__dberr; + dbp->get = (int (*)(const struct __db *, const DBT *, DBT *, uint))__dberr; + dbp->put = (int (*)(const struct __db *, DBT *, const DBT *, uint))__dberr; + dbp->seq = (int (*)(const struct __db *, DBT *, DBT *, uint))__dberr; + dbp->sync = (int (*)(const struct __db *, uint))__dberr; +} diff --git a/dbm/src/h_bigkey.c b/dbm/src/h_bigkey.c new file mode 100644 index 000000000..53a1a00f3 --- /dev/null +++ b/dbm/src/h_bigkey.c @@ -0,0 +1,677 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +/* + * PACKAGE: hash + * DESCRIPTION: + * Big key/data handling for the hashing package. + * + * ROUTINES: + * External + * __big_keydata + * __big_split + * __big_insert + * __big_return + * __big_delete + * __find_last_page + * Internal + * collect_key + * collect_data + */ + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <sys/param.h> +#endif + +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef DEBUG +#include <assert.h> +#endif + +#include "mcom_db.h" +#include "hash.h" +#include "page.h" +/* #include "extern.h" */ + +static int collect_key __P((HTAB *, BUFHEAD *, int, DBT *, int)); +static int collect_data __P((HTAB *, BUFHEAD *, int, int)); + +/* + * Big_insert + * + * You need to do an insert and the key/data pair is too big + * + * Returns: + * 0 ==> OK + *-1 ==> ERROR + */ +extern int +__big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) +{ + register uint16 *p; + uint key_size, n, val_size; + uint16 space, move_bytes, off; + char *cp, *key_data, *val_data; + + cp = bufp->page; /* Character pointer of p. */ + p = (uint16 *)cp; + + key_data = (char *)key->data; + key_size = key->size; + val_data = (char *)val->data; + val_size = val->size; + + /* First move the Key */ + for (space = FREESPACE(p) - BIGOVERHEAD; key_size; + space = FREESPACE(p) - BIGOVERHEAD) { + move_bytes = PR_MIN(space, key_size); + off = OFFSET(p) - move_bytes; + memmove(cp + off, key_data, move_bytes); + key_size -= move_bytes; + key_data += move_bytes; + n = p[0]; + p[++n] = off; + p[0] = ++n; + FREESPACE(p) = off - PAGE_META(n); + OFFSET(p) = off; + p[n] = PARTIAL_KEY; + bufp = __add_ovflpage(hashp, bufp); + if (!bufp) + return (-1); + n = p[0]; + if (!key_size) { + if (FREESPACE(p)) { + move_bytes = PR_MIN(FREESPACE(p), val_size); + off = OFFSET(p) - move_bytes; + p[n] = off; + memmove(cp + off, val_data, move_bytes); + val_data += move_bytes; + val_size -= move_bytes; + p[n - 2] = FULL_KEY_DATA; + FREESPACE(p) = FREESPACE(p) - move_bytes; + OFFSET(p) = off; + } else + p[n - 2] = FULL_KEY; + } + p = (uint16 *)bufp->page; + cp = bufp->page; + bufp->flags |= BUF_MOD; + } + + /* Now move the data */ + for (space = FREESPACE(p) - BIGOVERHEAD; val_size; + space = FREESPACE(p) - BIGOVERHEAD) { + move_bytes = PR_MIN(space, val_size); + /* + * Here's the hack to make sure that if the data ends on the + * same page as the key ends, FREESPACE is at least one. + */ + if (space == val_size && val_size == val->size) + move_bytes--; + off = OFFSET(p) - move_bytes; + memmove(cp + off, val_data, move_bytes); + val_size -= move_bytes; + val_data += move_bytes; + n = p[0]; + p[++n] = off; + p[0] = ++n; + FREESPACE(p) = off - PAGE_META(n); + OFFSET(p) = off; + if (val_size) { + p[n] = FULL_KEY; + bufp = __add_ovflpage(hashp, bufp); + if (!bufp) + return (-1); + cp = bufp->page; + p = (uint16 *)cp; + } else + p[n] = FULL_KEY_DATA; + bufp->flags |= BUF_MOD; + } + return (0); +} + +/* + * Called when bufp's page contains a partial key (index should be 1) + * + * All pages in the big key/data pair except bufp are freed. We cannot + * free bufp because the page pointing to it is lost and we can't get rid + * of its pointer. + * + * Returns: + * 0 => OK + *-1 => ERROR + */ +extern int +__big_delete(HTAB *hashp, BUFHEAD *bufp) +{ + register BUFHEAD *last_bfp, *rbufp; + uint16 *bp, pageno; + int key_done, n; + + rbufp = bufp; + last_bfp = NULL; + bp = (uint16 *)bufp->page; + pageno = 0; + key_done = 0; + + while (!key_done || (bp[2] != FULL_KEY_DATA)) { + if (bp[2] == FULL_KEY || bp[2] == FULL_KEY_DATA) + key_done = 1; + + /* + * If there is freespace left on a FULL_KEY_DATA page, then + * the data is short and fits entirely on this page, and this + * is the last page. + */ + if (bp[2] == FULL_KEY_DATA && FREESPACE(bp)) + break; + pageno = bp[bp[0] - 1]; + rbufp->flags |= BUF_MOD; + rbufp = __get_buf(hashp, pageno, rbufp, 0); + if (last_bfp) + __free_ovflpage(hashp, last_bfp); + last_bfp = rbufp; + if (!rbufp) + return (-1); /* Error. */ + bp = (uint16 *)rbufp->page; + } + + /* + * If we get here then rbufp points to the last page of the big + * key/data pair. Bufp points to the first one -- it should now be + * empty pointing to the next page after this pair. Can't free it + * because we don't have the page pointing to it. + */ + + /* This is information from the last page of the pair. */ + n = bp[0]; + pageno = bp[n - 1]; + + /* Now, bp is the first page of the pair. */ + bp = (uint16 *)bufp->page; + if (n > 2) { + /* There is an overflow page. */ + bp[1] = pageno; + bp[2] = OVFLPAGE; + bufp->ovfl = rbufp->ovfl; + } else + /* This is the last page. */ + bufp->ovfl = NULL; + n -= 2; + bp[0] = n; + FREESPACE(bp) = hashp->BSIZE - PAGE_META(n); + OFFSET(bp) = hashp->BSIZE - 1; + + bufp->flags |= BUF_MOD; + if (rbufp) + __free_ovflpage(hashp, rbufp); + if (last_bfp != rbufp) + __free_ovflpage(hashp, last_bfp); + + hashp->NKEYS--; + return (0); +} +/* + * Returns: + * 0 = key not found + * -1 = get next overflow page + * -2 means key not found and this is big key/data + * -3 error + */ +extern int +__find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size) +{ + register uint16 *bp; + register char *p; + int ksize; + uint16 bytes; + char *kkey; + + bp = (uint16 *)bufp->page; + p = bufp->page; + ksize = size; + kkey = key; + + for (bytes = hashp->BSIZE - bp[ndx]; + bytes <= size && bp[ndx + 1] == PARTIAL_KEY; + bytes = hashp->BSIZE - bp[ndx]) { + if (memcmp(p + bp[ndx], kkey, bytes)) + return (-2); + kkey += bytes; + ksize -= bytes; + bufp = __get_buf(hashp, bp[ndx + 2], bufp, 0); + if (!bufp) + return (-3); + p = bufp->page; + bp = (uint16 *)p; + ndx = 1; + } + + if (bytes != ksize || memcmp(p + bp[ndx], kkey, bytes)) { +#ifdef HASH_STATISTICS + ++hash_collisions; +#endif + return (-2); + } else + return (ndx); +} + +/* + * Given the buffer pointer of the first overflow page of a big pair, + * find the end of the big pair + * + * This will set bpp to the buffer header of the last page of the big pair. + * It will return the pageno of the overflow page following the last page + * of the pair; 0 if there isn't any (i.e. big pair is the last key in the + * bucket) + */ +extern uint16 +__find_last_page(HTAB *hashp, BUFHEAD **bpp) +{ + BUFHEAD *bufp; + uint16 *bp, pageno; + uint n; + + bufp = *bpp; + bp = (uint16 *)bufp->page; + for (;;) { + n = bp[0]; + + /* + * This is the last page if: the tag is FULL_KEY_DATA and + * either only 2 entries OVFLPAGE marker is explicit there + * is freespace on the page. + */ + if (bp[2] == FULL_KEY_DATA && + ((n == 2) || (bp[n] == OVFLPAGE) || (FREESPACE(bp)))) + break; + + /* LJM bound the size of n to reasonable limits + */ + if(n > hashp->BSIZE/sizeof(uint16)) + return(0); + + pageno = bp[n - 1]; + bufp = __get_buf(hashp, pageno, bufp, 0); + if (!bufp) + return (0); /* Need to indicate an error! */ + bp = (uint16 *)bufp->page; + } + + *bpp = bufp; + if (bp[0] > 2) + return (bp[3]); + else + return (0); +} + +/* + * Return the data for the key/data pair that begins on this page at this + * index (index should always be 1). + */ +extern int +__big_return( + HTAB *hashp, + BUFHEAD *bufp, + int ndx, + DBT *val, + int set_current) +{ + BUFHEAD *save_p; + uint16 *bp, len, off, save_addr; + char *tp; + + bp = (uint16 *)bufp->page; + while (bp[ndx + 1] == PARTIAL_KEY) { + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + return (-1); + bp = (uint16 *)bufp->page; + ndx = 1; + } + + if (bp[ndx + 1] == FULL_KEY) { + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + return (-1); + bp = (uint16 *)bufp->page; + save_p = bufp; + save_addr = save_p->addr; + off = bp[1]; + len = 0; + } else + if (!FREESPACE(bp)) { + /* + * This is a hack. We can't distinguish between + * FULL_KEY_DATA that contains complete data or + * incomplete data, so we require that if the data + * is complete, there is at least 1 byte of free + * space left. + */ + off = bp[bp[0]]; + len = bp[1] - off; + save_p = bufp; + save_addr = bufp->addr; + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + return (-1); + bp = (uint16 *)bufp->page; + } else { + /* The data is all on one page. */ + tp = (char *)bp; + off = bp[bp[0]]; + val->data = (uint8 *)tp + off; + val->size = bp[1] - off; + if (set_current) { + if (bp[0] == 2) { /* No more buckets in + * chain */ + hashp->cpage = NULL; + hashp->cbucket++; + hashp->cndx = 1; + } else { + hashp->cpage = __get_buf(hashp, + bp[bp[0] - 1], bufp, 0); + if (!hashp->cpage) + return (-1); + hashp->cndx = 1; + if (!((uint16 *) + hashp->cpage->page)[0]) { + hashp->cbucket++; + hashp->cpage = NULL; + } + } + } + return (0); + } + + val->size = collect_data(hashp, bufp, (int)len, set_current); + if (val->size == (size_t)-1) + return (-1); + if (save_p->addr != save_addr) { + /* We are pretty short on buffers. */ + errno = EINVAL; /* OUT OF BUFFERS */ + return (-1); + } + memmove(hashp->tmp_buf, (save_p->page) + off, len); + val->data = (uint8 *)hashp->tmp_buf; + return (0); +} +/* + * Count how big the total datasize is by recursing through the pages. Then + * allocate a buffer and copy the data as you recurse up. + */ +static int +collect_data( + HTAB *hashp, + BUFHEAD *bufp, + int len, int set) +{ + register uint16 *bp; + register char *p; + BUFHEAD *xbp; + uint16 save_addr; + int mylen, totlen; + + p = bufp->page; + bp = (uint16 *)p; + mylen = hashp->BSIZE - bp[1]; + + /* if mylen ever goes negative it means that the + * page is screwed up. + */ + if(mylen < 0) + return (-1); + + save_addr = bufp->addr; + + if (bp[2] == FULL_KEY_DATA) { /* End of Data */ + totlen = len + mylen; + if (hashp->tmp_buf) + free(hashp->tmp_buf); + if ((hashp->tmp_buf = (char *)malloc((size_t)totlen)) == NULL) + return (-1); + if (set) { + hashp->cndx = 1; + if (bp[0] == 2) { /* No more buckets in chain */ + hashp->cpage = NULL; + hashp->cbucket++; + } else { + hashp->cpage = + __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!hashp->cpage) + return (-1); + else if (!((uint16 *)hashp->cpage->page)[0]) { + hashp->cbucket++; + hashp->cpage = NULL; + } + } + } + } else { + xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!xbp || ((totlen = + collect_data(hashp, xbp, len + mylen, set)) < 1)) + return (-1); + } + if (bufp->addr != save_addr) { + errno = EINVAL; /* Out of buffers. */ + return (-1); + } + memmove(&hashp->tmp_buf[len], (bufp->page) + bp[1], (size_t)mylen); + return (totlen); +} + +/* + * Fill in the key and data for this big pair. + */ +extern int +__big_keydata( + HTAB *hashp, + BUFHEAD *bufp, + DBT *key, DBT *val, + int set) +{ + key->size = collect_key(hashp, bufp, 0, val, set); + if (key->size == (size_t)-1) + return (-1); + key->data = (uint8 *)hashp->tmp_key; + return (0); +} + +/* + * Count how big the total key size is by recursing through the pages. Then + * collect the data, allocate a buffer and copy the key as you recurse up. + */ +static int +collect_key( + HTAB *hashp, + BUFHEAD *bufp, + int len, + DBT *val, + int set) +{ + BUFHEAD *xbp; + char *p; + int mylen, totlen; + uint16 *bp, save_addr; + + p = bufp->page; + bp = (uint16 *)p; + mylen = hashp->BSIZE - bp[1]; + + save_addr = bufp->addr; + totlen = len + mylen; + if (bp[2] == FULL_KEY || bp[2] == FULL_KEY_DATA) { /* End of Key. */ + if (hashp->tmp_key != NULL) + free(hashp->tmp_key); + if ((hashp->tmp_key = (char *)malloc((size_t)totlen)) == NULL) + return (-1); + if (__big_return(hashp, bufp, 1, val, set)) + return (-1); + } else { + xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!xbp || ((totlen = + collect_key(hashp, xbp, totlen, val, set)) < 1)) + return (-1); + } + if (bufp->addr != save_addr) { + errno = EINVAL; /* MIS -- OUT OF BUFFERS */ + return (-1); + } + memmove(&hashp->tmp_key[len], (bufp->page) + bp[1], (size_t)mylen); + return (totlen); +} + +/* + * Returns: + * 0 => OK + * -1 => error + */ +extern int +__big_split( + HTAB *hashp, + BUFHEAD *op, /* Pointer to where to put keys that go in old bucket */ + BUFHEAD *np, /* Pointer to new bucket page */ + /* Pointer to first page containing the big key/data */ + BUFHEAD *big_keyp, + uint32 addr, /* Address of big_keyp */ + uint32 obucket,/* Old Bucket */ + SPLIT_RETURN *ret) +{ + register BUFHEAD *tmpp; + register uint16 *tp; + BUFHEAD *bp; + DBT key, val; + uint32 change; + uint16 free_space, n, off; + + bp = big_keyp; + + /* Now figure out where the big key/data goes */ + if (__big_keydata(hashp, big_keyp, &key, &val, 0)) + return (-1); + change = (__call_hash(hashp,(char*) key.data, key.size) != obucket); + + if ((ret->next_addr = __find_last_page(hashp, &big_keyp))) { + if (!(ret->nextp = + __get_buf(hashp, ret->next_addr, big_keyp, 0))) + return (-1);; + } else + ret->nextp = NULL; + + /* Now make one of np/op point to the big key/data pair */ +#ifdef DEBUG + assert(np->ovfl == NULL); +#endif + if (change) + tmpp = np; + else + tmpp = op; + + tmpp->flags |= BUF_MOD; +#ifdef DEBUG1 + (void)fprintf(stderr, + "BIG_SPLIT: %d->ovfl was %d is now %d\n", tmpp->addr, + (tmpp->ovfl ? tmpp->ovfl->addr : 0), (bp ? bp->addr : 0)); +#endif + tmpp->ovfl = bp; /* one of op/np point to big_keyp */ + tp = (uint16 *)tmpp->page; + + +#if 0 /* this get's tripped on database corrupted error */ + assert(FREESPACE(tp) >= OVFLSIZE); +#endif + if(FREESPACE(tp) < OVFLSIZE) + return(DATABASE_CORRUPTED_ERROR); + + n = tp[0]; + off = OFFSET(tp); + free_space = FREESPACE(tp); + tp[++n] = (uint16)addr; + tp[++n] = OVFLPAGE; + tp[0] = n; + OFFSET(tp) = off; + FREESPACE(tp) = free_space - OVFLSIZE; + + /* + * Finally, set the new and old return values. BIG_KEYP contains a + * pointer to the last page of the big key_data pair. Make sure that + * big_keyp has no following page (2 elements) or create an empty + * following page. + */ + + ret->newp = np; + ret->oldp = op; + + tp = (uint16 *)big_keyp->page; + big_keyp->flags |= BUF_MOD; + if (tp[0] > 2) { + /* + * There may be either one or two offsets on this page. If + * there is one, then the overflow page is linked on normally + * and tp[4] is OVFLPAGE. If there are two, tp[4] contains + * the second offset and needs to get stuffed in after the + * next overflow page is added. + */ + n = tp[4]; + free_space = FREESPACE(tp); + off = OFFSET(tp); + tp[0] -= 2; + FREESPACE(tp) = free_space + OVFLSIZE; + OFFSET(tp) = off; + tmpp = __add_ovflpage(hashp, big_keyp); + if (!tmpp) + return (-1); + tp[4] = n; + } else + tmpp = big_keyp; + + if (change) + ret->newp = tmpp; + else + ret->oldp = tmpp; + return (0); +} diff --git a/dbm/src/h_func.c b/dbm/src/h_func.c new file mode 100644 index 000000000..5819efe23 --- /dev/null +++ b/dbm/src/h_func.c @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_func.c 8.2 (Berkeley) 2/21/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifndef macintosh +#include <sys/types.h> +#endif +#include "mcom_db.h" +#include "hash.h" +#include "page.h" +/* #include "extern.h" */ + +#if 0 +static uint32 hash1 __P((const void *, size_t)); +static uint32 hash2 __P((const void *, size_t)); +static uint32 hash3 __P((const void *, size_t)); +#endif +static uint32 hash4 __P((const void *, size_t)); + +/* Global default hash function */ +uint32 (*__default_hash) __P((const void *, size_t)) = hash4; + +/* + * HASH FUNCTIONS + * + * Assume that we've already split the bucket to which this key hashes, + * calculate that bucket, and check that in fact we did already split it. + * + * This came from ejb's hsearch. + */ + +#define PRIME1 37 +#define PRIME2 1048583 + +#if 0 +static uint32 +hash1(const void *keyarg, register size_t len) +{ + register const uint8 *key; + register uint32 h; + + /* Convert string to integer */ + for (key = (const uint8 *)keyarg, h = 0; len--;) + h = h * PRIME1 ^ (*key++ - ' '); + h %= PRIME2; + return (h); +} + +/* + * Phong's linear congruential hash + */ +#define dcharhash(h, c) ((h) = 0x63c63cd9*(h) + 0x9c39c33d + (c)) + +static uint32 +hash2(const void *keyarg, size_t len) +{ + register const uint8 *e, *key; + register uint32 h; + register uint8 c; + + key = (const uint8 *)keyarg; + e = key + len; + for (h = 0; key != e;) { + c = *key++; + if (!c && key > e) + break; + dcharhash(h, c); + } + return (h); +} + +/* + * This is INCREDIBLY ugly, but fast. We break the string up into 8 byte + * units. On the first time through the loop we get the "leftover bytes" + * (strlen % 8). On every other iteration, we perform 8 HASHC's so we handle + * all 8 bytes. Essentially, this saves us 7 cmp & branch instructions. If + * this routine is heavily used enough, it's worth the ugly coding. + * + * OZ's original sdbm hash + */ +static uint32 +hash3(const void *keyarg, register size_t len) +{ + register const uint8 *key; + register size_t loop; + register uint32 h; + +#define HASHC h = *key++ + 65599 * h + + h = 0; + key = (const uint8 *)keyarg; + if (len > 0) { + loop = (len + 8 - 1) >> 3; + + switch (len & (8 - 1)) { + case 0: + do { + HASHC; + /* FALLTHROUGH */ + case 7: + HASHC; + /* FALLTHROUGH */ + case 6: + HASHC; + /* FALLTHROUGH */ + case 5: + HASHC; + /* FALLTHROUGH */ + case 4: + HASHC; + /* FALLTHROUGH */ + case 3: + HASHC; + /* FALLTHROUGH */ + case 2: + HASHC; + /* FALLTHROUGH */ + case 1: + HASHC; + } while (--loop); + } + } + return (h); +} +#endif /* 0 */ + +/* Hash function from Chris Torek. */ +static uint32 +hash4(const void *keyarg, register size_t len) +{ + register const uint8 *key; + register size_t loop; + register uint32 h; + +#define HASH4a h = (h << 5) - h + *key++; +#define HASH4b h = (h << 5) + h + *key++; +#define HASH4 HASH4b + + h = 0; + key = (const uint8 *)keyarg; + if (len > 0) { + loop = (len + 8 - 1) >> 3; + + switch (len & (8 - 1)) { + case 0: + do { + HASH4; + /* FALLTHROUGH */ + case 7: + HASH4; + /* FALLTHROUGH */ + case 6: + HASH4; + /* FALLTHROUGH */ + case 5: + HASH4; + /* FALLTHROUGH */ + case 4: + HASH4; + /* FALLTHROUGH */ + case 3: + HASH4; + /* FALLTHROUGH */ + case 2: + HASH4; + /* FALLTHROUGH */ + case 1: + HASH4; + } while (--loop); + } + } + return (h); +} diff --git a/dbm/src/h_log2.c b/dbm/src/h_log2.c new file mode 100644 index 000000000..4d8b0a715 --- /dev/null +++ b/dbm/src/h_log2.c @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_log2.c 8.2 (Berkeley) 5/31/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#include <stdio.h> +#ifndef macintosh +#include <sys/types.h> +#endif +#include "mcom_db.h" + +uint32 __log2(uint32 num) +{ + register uint32 i, limit; + + limit = 1; + for (i = 0; limit < num; limit = limit << 1, i++) {} + return (i); +} diff --git a/dbm/src/h_page.c b/dbm/src/h_page.c new file mode 100644 index 000000000..e11ad9451 --- /dev/null +++ b/dbm/src/h_page.c @@ -0,0 +1,1290 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + */ + +#if defined(unix) +#define MY_LSEEK lseek +#else +#define MY_LSEEK new_lseek +extern long new_lseek(int fd, long pos, int start); +#endif + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +/* + * PACKAGE: hashing + * + * DESCRIPTION: + * Page manipulation for hashing package. + * + * ROUTINES: + * + * External + * __get_page + * __add_ovflpage + * Internal + * overflow_page + * open_temp + */ +#ifndef macintosh +#include <sys/types.h> +#endif + +#if defined(macintosh) +#include <unistd.h> +#endif + +#include <errno.h> +#include <fcntl.h> +#if defined(_WIN32) || defined(_WINDOWS) +#include <io.h> +#endif +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <unistd.h> +#endif + +#include <assert.h> + +#include "mcom_db.h" +#include "hash.h" +#include "page.h" +/* #include "extern.h" */ + +extern int mkstempflags(char *path, int extraFlags); + +static uint32 *fetch_bitmap __P((HTAB *, uint32)); +static uint32 first_free __P((uint32)); +static int open_temp __P((HTAB *)); +static uint16 overflow_page __P((HTAB *)); +static void squeeze_key __P((uint16 *, const DBT *, const DBT *)); +static int ugly_split + __P((HTAB *, uint32, BUFHEAD *, BUFHEAD *, int, int)); + +#define PAGE_INIT(P) { \ + ((uint16 *)(P))[0] = 0; \ + ((uint16 *)(P))[1] = hashp->BSIZE - 3 * sizeof(uint16); \ + ((uint16 *)(P))[2] = hashp->BSIZE; \ +} + +/* implement a new lseek using lseek that + * writes zero's when extending a file + * beyond the end. + */ +long new_lseek(int fd, long offset, int origin) +{ + long cur_pos=0; + long end_pos=0; + long seek_pos=0; + + if(origin == SEEK_CUR) + { + if(offset < 1) + return(lseek(fd, offset, SEEK_CUR)); + + cur_pos = lseek(fd, 0, SEEK_CUR); + + if(cur_pos < 0) + return(cur_pos); + } + + end_pos = lseek(fd, 0, SEEK_END); + if(end_pos < 0) + return(end_pos); + + if(origin == SEEK_SET) + seek_pos = offset; + else if(origin == SEEK_CUR) + seek_pos = cur_pos + offset; + else if(origin == SEEK_END) + seek_pos = end_pos + offset; + else + { + assert(0); + return(-1); + } + + /* the seek position desired is before the + * end of the file. We don't need + * to do anything special except the seek. + */ + if(seek_pos <= end_pos) + return(lseek(fd, seek_pos, SEEK_SET)); + + /* the seek position is beyond the end of the + * file. Write zero's to the end. + * + * we are already at the end of the file so + * we just need to "write()" zeros for the + * difference between seek_pos-end_pos and + * then seek to the position to finish + * the call + */ + { + char buffer[1024]; + long len = seek_pos-end_pos; + memset(&buffer, 0, 1024); + while(len > 0) + { + write(fd, (char*)&buffer, (size_t)(1024 > len ? len : 1024)); + len -= 1024; + } + return(lseek(fd, seek_pos, SEEK_SET)); + } + +} + +/* + * This is called AFTER we have verified that there is room on the page for + * the pair (PAIRFITS has returned true) so we go right ahead and start moving + * stuff on. + */ +static void +putpair(char *p, const DBT *key, DBT * val) +{ + register uint16 *bp, n, off; + + bp = (uint16 *)p; + + /* Enter the key first. */ + n = bp[0]; + + off = OFFSET(bp) - key->size; + memmove(p + off, key->data, key->size); + bp[++n] = off; + + /* Now the data. */ + off -= val->size; + memmove(p + off, val->data, val->size); + bp[++n] = off; + + /* Adjust page info. */ + bp[0] = n; + bp[n + 1] = off - ((n + 3) * sizeof(uint16)); + bp[n + 2] = off; +} + +/* + * Returns: + * 0 OK + * -1 error + */ +extern int +__delpair(HTAB *hashp, BUFHEAD *bufp, int ndx) +{ + register uint16 *bp, newoff; + register int n; + uint16 pairlen; + + bp = (uint16 *)bufp->page; + n = bp[0]; + + if (bp[ndx + 1] < REAL_KEY) + return (__big_delete(hashp, bufp)); + if (ndx != 1) + newoff = bp[ndx - 1]; + else + newoff = hashp->BSIZE; + pairlen = newoff - bp[ndx + 1]; + + if (ndx != (n - 1)) { + /* Hard Case -- need to shuffle keys */ + register int i; + register char *src = bufp->page + (int)OFFSET(bp); + uint32 dst_offset = (uint32)OFFSET(bp) + (uint32)pairlen; + register char *dst = bufp->page + dst_offset; + uint32 length = bp[ndx + 1] - OFFSET(bp); + + /* + * +-----------+XXX+---------+XXX+---------+---------> +infinity + * | | | | + * 0 src_offset dst_offset BSIZE + * + * Dst_offset is > src_offset, so if src_offset were bad, dst_offset + * would be too, therefore we check only dst_offset. + * + * If dst_offset is >= BSIZE, either OFFSET(bp), or pairlen, or both + * is corrupted. + * + * Once we know dst_offset is < BSIZE, we can subtract it from BSIZE + * to get an upper bound on length. + */ + if(dst_offset > (uint32)hashp->BSIZE) + return(DATABASE_CORRUPTED_ERROR); + + if(length > (uint32)(hashp->BSIZE - dst_offset)) + return(DATABASE_CORRUPTED_ERROR); + + memmove(dst, src, length); + + /* Now adjust the pointers */ + for (i = ndx + 2; i <= n; i += 2) { + if (bp[i + 1] == OVFLPAGE) { + bp[i - 2] = bp[i]; + bp[i - 1] = bp[i + 1]; + } else { + bp[i - 2] = bp[i] + pairlen; + bp[i - 1] = bp[i + 1] + pairlen; + } + } + } + /* Finally adjust the page data */ + bp[n] = OFFSET(bp) + pairlen; + bp[n - 1] = bp[n + 1] + pairlen + 2 * sizeof(uint16); + bp[0] = n - 2; + hashp->NKEYS--; + + bufp->flags |= BUF_MOD; + return (0); +} +/* + * Returns: + * 0 ==> OK + * -1 ==> Error + */ +extern int +__split_page(HTAB *hashp, uint32 obucket, uint32 nbucket) +{ + register BUFHEAD *new_bufp, *old_bufp; + register uint16 *ino; + register uint16 *tmp_uint16_array; + register char *np; + DBT key, val; + uint16 n, ndx; + int retval; + uint16 copyto, diff, moved; + size_t off; + char *op; + + copyto = (uint16)hashp->BSIZE; + off = (uint16)hashp->BSIZE; + old_bufp = __get_buf(hashp, obucket, NULL, 0); + if (old_bufp == NULL) + return (-1); + new_bufp = __get_buf(hashp, nbucket, NULL, 0); + if (new_bufp == NULL) + return (-1); + + old_bufp->flags |= (BUF_MOD | BUF_PIN); + new_bufp->flags |= (BUF_MOD | BUF_PIN); + + ino = (uint16 *)(op = old_bufp->page); + np = new_bufp->page; + + moved = 0; + + for (n = 1, ndx = 1; n < ino[0]; n += 2) { + if (ino[n + 1] < REAL_KEY) { + retval = ugly_split(hashp, obucket, old_bufp, new_bufp, + (int)copyto, (int)moved); + old_bufp->flags &= ~BUF_PIN; + new_bufp->flags &= ~BUF_PIN; + return (retval); + + } + key.data = (uint8 *)op + ino[n]; + + /* check here for ino[n] being greater than + * off. If it is then the database has + * been corrupted. + */ + if(ino[n] > off) + return(DATABASE_CORRUPTED_ERROR); + + key.size = off - ino[n]; + +#ifdef DEBUG + /* make sure the size is positive */ + assert(((int)key.size) > -1); +#endif + + if (__call_hash(hashp, (char *)key.data, key.size) == obucket) { + /* Don't switch page */ + diff = copyto - off; + if (diff) { + copyto = ino[n + 1] + diff; + memmove(op + copyto, op + ino[n + 1], + off - ino[n + 1]); + ino[ndx] = copyto + ino[n] - ino[n + 1]; + ino[ndx + 1] = copyto; + } else + copyto = ino[n + 1]; + ndx += 2; + } else { + /* Switch page */ + val.data = (uint8 *)op + ino[n + 1]; + val.size = ino[n] - ino[n + 1]; + + /* if the pair doesn't fit something is horribly + * wrong. LJM + */ + tmp_uint16_array = (uint16*)np; + if(!PAIRFITS(tmp_uint16_array, &key, &val)) + return(DATABASE_CORRUPTED_ERROR); + + putpair(np, &key, &val); + moved += 2; + } + + off = ino[n + 1]; + } + + /* Now clean up the page */ + ino[0] -= moved; + FREESPACE(ino) = copyto - sizeof(uint16) * (ino[0] + 3); + OFFSET(ino) = copyto; + +#ifdef DEBUG3 + (void)fprintf(stderr, "split %d/%d\n", + ((uint16 *)np)[0] / 2, + ((uint16 *)op)[0] / 2); +#endif + /* unpin both pages */ + old_bufp->flags &= ~BUF_PIN; + new_bufp->flags &= ~BUF_PIN; + return (0); +} + +/* + * Called when we encounter an overflow or big key/data page during split + * handling. This is special cased since we have to begin checking whether + * the key/data pairs fit on their respective pages and because we may need + * overflow pages for both the old and new pages. + * + * The first page might be a page with regular key/data pairs in which case + * we have a regular overflow condition and just need to go on to the next + * page or it might be a big key/data pair in which case we need to fix the + * big key/data pair. + * + * Returns: + * 0 ==> success + * -1 ==> failure + */ + +/* the maximum number of loops we will allow UGLY split to chew + * on before we assume the database is corrupted and throw it + * away. + */ +#define MAX_UGLY_SPLIT_LOOPS 10000 + +static int +ugly_split(HTAB *hashp, uint32 obucket, BUFHEAD *old_bufp, + BUFHEAD *new_bufp,/* Same as __split_page. */ int copyto, int moved) + /* int copyto; First byte on page which contains key/data values. */ + /* int moved; Number of pairs moved to new page. */ +{ + register BUFHEAD *bufp; /* Buffer header for ino */ + register uint16 *ino; /* Page keys come off of */ + register uint16 *np; /* New page */ + register uint16 *op; /* Page keys go on to if they aren't moving */ + uint32 loop_detection=0; + + BUFHEAD *last_bfp; /* Last buf header OVFL needing to be freed */ + DBT key, val; + SPLIT_RETURN ret; + uint16 n, off, ov_addr, scopyto; + char *cino; /* Character value of ino */ + int status; + + bufp = old_bufp; + ino = (uint16 *)old_bufp->page; + np = (uint16 *)new_bufp->page; + op = (uint16 *)old_bufp->page; + last_bfp = NULL; + scopyto = (uint16)copyto; /* ANSI */ + + n = ino[0] - 1; + while (n < ino[0]) { + + + /* this function goes nuts sometimes and never returns. + * I havent found the problem yet but I need a solution + * so if we loop too often we assume a database curruption error + * :LJM + */ + loop_detection++; + + if(loop_detection > MAX_UGLY_SPLIT_LOOPS) + return DATABASE_CORRUPTED_ERROR; + + if (ino[2] < REAL_KEY && ino[2] != OVFLPAGE) { + if ((status = __big_split(hashp, old_bufp, + new_bufp, bufp, bufp->addr, obucket, &ret))) + return (status); + old_bufp = ret.oldp; + if (!old_bufp) + return (-1); + op = (uint16 *)old_bufp->page; + new_bufp = ret.newp; + if (!new_bufp) + return (-1); + np = (uint16 *)new_bufp->page; + bufp = ret.nextp; + if (!bufp) + return (0); + cino = (char *)bufp->page; + ino = (uint16 *)cino; + last_bfp = ret.nextp; + } else if (ino[n + 1] == OVFLPAGE) { + ov_addr = ino[n]; + /* + * Fix up the old page -- the extra 2 are the fields + * which contained the overflow information. + */ + ino[0] -= (moved + 2); + FREESPACE(ino) = + scopyto - sizeof(uint16) * (ino[0] + 3); + OFFSET(ino) = scopyto; + + bufp = __get_buf(hashp, ov_addr, bufp, 0); + if (!bufp) + return (-1); + + ino = (uint16 *)bufp->page; + n = 1; + scopyto = hashp->BSIZE; + moved = 0; + + if (last_bfp) + __free_ovflpage(hashp, last_bfp); + last_bfp = bufp; + } + /* Move regular sized pairs of there are any */ + off = hashp->BSIZE; + for (n = 1; (n < ino[0]) && (ino[n + 1] >= REAL_KEY); n += 2) { + cino = (char *)ino; + key.data = (uint8 *)cino + ino[n]; + key.size = off - ino[n]; + val.data = (uint8 *)cino + ino[n + 1]; + val.size = ino[n] - ino[n + 1]; + off = ino[n + 1]; + + if (__call_hash(hashp, (char*)key.data, key.size) == obucket) { + /* Keep on old page */ + if (PAIRFITS(op, (&key), (&val))) + putpair((char *)op, &key, &val); + else { + old_bufp = + __add_ovflpage(hashp, old_bufp); + if (!old_bufp) + return (-1); + op = (uint16 *)old_bufp->page; + putpair((char *)op, &key, &val); + } + old_bufp->flags |= BUF_MOD; + } else { + /* Move to new page */ + if (PAIRFITS(np, (&key), (&val))) + putpair((char *)np, &key, &val); + else { + new_bufp = + __add_ovflpage(hashp, new_bufp); + if (!new_bufp) + return (-1); + np = (uint16 *)new_bufp->page; + putpair((char *)np, &key, &val); + } + new_bufp->flags |= BUF_MOD; + } + } + } + if (last_bfp) + __free_ovflpage(hashp, last_bfp); + return (0); +} + +/* + * Add the given pair to the page + * + * Returns: + * 0 ==> OK + * 1 ==> failure + */ +extern int +__addel(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT * val) +{ + register uint16 *bp, *sop; + int do_expand; + + bp = (uint16 *)bufp->page; + do_expand = 0; + while (bp[0] && (bp[2] < REAL_KEY || bp[bp[0]] < REAL_KEY)) + /* Exception case */ + if (bp[2] == FULL_KEY_DATA && bp[0] == 2) + /* This is the last page of a big key/data pair + and we need to add another page */ + break; + else if (bp[2] < REAL_KEY && bp[bp[0]] != OVFLPAGE) { + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + { +#ifdef DEBUG + assert(0); +#endif + return (-1); + } + bp = (uint16 *)bufp->page; + } else + /* Try to squeeze key on this page */ + if (FREESPACE(bp) > PAIRSIZE(key, val)) { + { + squeeze_key(bp, key, val); + + /* LJM: I added this because I think it was + * left out on accident. + * if this isn't incremented nkeys will not + * be the actual number of keys in the db. + */ + hashp->NKEYS++; + return (0); + } + } else { + bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0); + if (!bufp) + { +#ifdef DEBUG + assert(0); +#endif + return (-1); + } + bp = (uint16 *)bufp->page; + } + + if (PAIRFITS(bp, key, val)) + putpair(bufp->page, key, (DBT *)val); + else { + do_expand = 1; + bufp = __add_ovflpage(hashp, bufp); + if (!bufp) + { +#ifdef DEBUG + assert(0); +#endif + return (-1); + } + sop = (uint16 *)bufp->page; + + if (PAIRFITS(sop, key, val)) + putpair((char *)sop, key, (DBT *)val); + else + if (__big_insert(hashp, bufp, key, val)) + { +#ifdef DEBUG + assert(0); +#endif + return (-1); + } + } + bufp->flags |= BUF_MOD; + /* + * If the average number of keys per bucket exceeds the fill factor, + * expand the table. + */ + hashp->NKEYS++; + if (do_expand || + (hashp->NKEYS / (hashp->MAX_BUCKET + 1) > hashp->FFACTOR)) + return (__expand_table(hashp)); + return (0); +} + +/* + * + * Returns: + * pointer on success + * NULL on error + */ +extern BUFHEAD * +__add_ovflpage(HTAB *hashp, BUFHEAD *bufp) +{ + register uint16 *sp; + uint16 ndx, ovfl_num; +#ifdef DEBUG1 + int tmp1, tmp2; +#endif + sp = (uint16 *)bufp->page; + + /* Check if we are dynamically determining the fill factor */ + if (hashp->FFACTOR == DEF_FFACTOR) { + hashp->FFACTOR = sp[0] >> 1; + if (hashp->FFACTOR < MIN_FFACTOR) + hashp->FFACTOR = MIN_FFACTOR; + } + bufp->flags |= BUF_MOD; + ovfl_num = overflow_page(hashp); +#ifdef DEBUG1 + tmp1 = bufp->addr; + tmp2 = bufp->ovfl ? bufp->ovfl->addr : 0; +#endif + if (!ovfl_num || !(bufp->ovfl = __get_buf(hashp, ovfl_num, bufp, 1))) + return (NULL); + bufp->ovfl->flags |= BUF_MOD; +#ifdef DEBUG1 + (void)fprintf(stderr, "ADDOVFLPAGE: %d->ovfl was %d is now %d\n", + tmp1, tmp2, bufp->ovfl->addr); +#endif + ndx = sp[0]; + /* + * Since a pair is allocated on a page only if there's room to add + * an overflow page, we know that the OVFL information will fit on + * the page. + */ + sp[ndx + 4] = OFFSET(sp); + sp[ndx + 3] = FREESPACE(sp) - OVFLSIZE; + sp[ndx + 1] = ovfl_num; + sp[ndx + 2] = OVFLPAGE; + sp[0] = ndx + 2; +#ifdef HASH_STATISTICS + hash_overflows++; +#endif + return (bufp->ovfl); +} + +/* + * Returns: + * 0 indicates SUCCESS + * -1 indicates FAILURE + */ +extern int +__get_page(HTAB *hashp, + char * p, + uint32 bucket, + int is_bucket, + int is_disk, + int is_bitmap) +{ + register int fd, page; + size_t size; + int rsize; + uint16 *bp; + + fd = hashp->fp; + size = hashp->BSIZE; + + if ((fd == -1) || !is_disk) { + PAGE_INIT(p); + return (0); + } + if (is_bucket) + page = BUCKET_TO_PAGE(bucket); + else + page = OADDR_TO_PAGE(bucket); + if ((MY_LSEEK(fd, (off_t)page << hashp->BSHIFT, SEEK_SET) == -1) || + ((rsize = read(fd, p, size)) == -1)) + return (-1); + + bp = (uint16 *)p; + if (!rsize) + bp[0] = 0; /* We hit the EOF, so initialize a new page */ + else + if ((unsigned)rsize != size) { + errno = EFTYPE; + return (-1); + } + + if (!is_bitmap && !bp[0]) { + PAGE_INIT(p); + } else { + +#ifdef DEBUG + if(BYTE_ORDER == LITTLE_ENDIAN) + { + int is_little_endian; + is_little_endian = BYTE_ORDER; + } + else if(BYTE_ORDER == BIG_ENDIAN) + { + int is_big_endian; + is_big_endian = BYTE_ORDER; + } + else + { + assert(0); + } +#endif + + if (hashp->LORDER != BYTE_ORDER) { + register int i, max; + + if (is_bitmap) { + max = hashp->BSIZE >> 2; /* divide by 4 */ + for (i = 0; i < max; i++) + M_32_SWAP(((int *)p)[i]); + } else { + M_16_SWAP(bp[0]); + max = bp[0] + 2; + + /* bound the size of max by + * the maximum number of entries + * in the array + */ + if((unsigned)max > (size / sizeof(uint16))) + return(DATABASE_CORRUPTED_ERROR); + + /* do the byte order swap + */ + for (i = 1; i <= max; i++) + M_16_SWAP(bp[i]); + } + } + + /* check the validity of the page here + * (after doing byte order swaping if necessary) + */ + if(!is_bitmap && bp[0] != 0) + { + uint16 num_keys = bp[0]; + uint16 offset; + uint16 i; + + /* bp[0] is supposed to be the number of + * entries currently in the page. If + * bp[0] is too large (larger than the whole + * page) then the page is corrupted + */ + if(bp[0] > (size / sizeof(uint16))) + return(DATABASE_CORRUPTED_ERROR); + + /* bound free space */ + if(FREESPACE(bp) > size) + return(DATABASE_CORRUPTED_ERROR); + + /* check each key and data offset to make + * sure they are all within bounds they + * should all be less than the previous + * offset as well. + */ + offset = size; + for(i=1 ; i <= num_keys; i+=2) + { + /* ignore overflow pages etc. */ + if(bp[i+1] >= REAL_KEY) + { + + if(bp[i] > offset || bp[i+1] > bp[i]) + return(DATABASE_CORRUPTED_ERROR); + + offset = bp[i+1]; + } + else + { + /* there are no other valid keys after + * seeing a non REAL_KEY + */ + break; + } + } + } + } + return (0); +} + +/* + * Write page p to disk + * + * Returns: + * 0 ==> OK + * -1 ==>failure + */ +extern int +__put_page(HTAB *hashp, char *p, uint32 bucket, int is_bucket, int is_bitmap) +{ + register int fd, page; + size_t size; + int wsize; + off_t offset; + + size = hashp->BSIZE; + if ((hashp->fp == -1) && open_temp(hashp)) + return (-1); + fd = hashp->fp; + + if (hashp->LORDER != BYTE_ORDER) { + register int i; + register int max; + + if (is_bitmap) { + max = hashp->BSIZE >> 2; /* divide by 4 */ + for (i = 0; i < max; i++) + M_32_SWAP(((int *)p)[i]); + } else { + max = ((uint16 *)p)[0] + 2; + + /* bound the size of max by + * the maximum number of entries + * in the array + */ + if((unsigned)max > (size / sizeof(uint16))) + return(DATABASE_CORRUPTED_ERROR); + + for (i = 0; i <= max; i++) + M_16_SWAP(((uint16 *)p)[i]); + + } + } + + if (is_bucket) + page = BUCKET_TO_PAGE(bucket); + else + page = OADDR_TO_PAGE(bucket); + offset = (off_t)page << hashp->BSHIFT; + if ((MY_LSEEK(fd, offset, SEEK_SET) == -1) || + ((wsize = write(fd, p, size)) == -1)) + /* Errno is set */ + return (-1); + if ((unsigned)wsize != size) { + errno = EFTYPE; + return (-1); + } +#if defined(_WIN32) || defined(_WINDOWS) + if (offset + size > hashp->file_size) { + hashp->updateEOF = 1; + } +#endif + /* put the page back the way it was so that it isn't byteswapped + * if it remains in memory - LJM + */ + if (hashp->LORDER != BYTE_ORDER) { + register int i; + register int max; + + if (is_bitmap) { + max = hashp->BSIZE >> 2; /* divide by 4 */ + for (i = 0; i < max; i++) + M_32_SWAP(((int *)p)[i]); + } else { + uint16 *bp = (uint16 *)p; + + M_16_SWAP(bp[0]); + max = bp[0] + 2; + + /* no need to bound the size if max again + * since it was done already above + */ + + /* do the byte order re-swap + */ + for (i = 1; i <= max; i++) + M_16_SWAP(bp[i]); + } + } + + return (0); +} + +#define BYTE_MASK ((1 << INT_BYTE_SHIFT) -1) +/* + * Initialize a new bitmap page. Bitmap pages are left in memory + * once they are read in. + */ +extern int +__ibitmap(HTAB *hashp, int pnum, int nbits, int ndx) +{ + uint32 *ip; + size_t clearbytes, clearints; + + if ((ip = (uint32 *)malloc((size_t)hashp->BSIZE)) == NULL) + return (1); + hashp->nmaps++; + clearints = ((nbits - 1) >> INT_BYTE_SHIFT) + 1; + clearbytes = clearints << INT_TO_BYTE; + (void)memset((char *)ip, 0, clearbytes); + (void)memset(((char *)ip) + clearbytes, 0xFF, + hashp->BSIZE - clearbytes); + ip[clearints - 1] = ALL_SET << (nbits & BYTE_MASK); + SETBIT(ip, 0); + hashp->BITMAPS[ndx] = (uint16)pnum; + hashp->mapp[ndx] = ip; + return (0); +} + +static uint32 +first_free(uint32 map) +{ + register uint32 i, mask; + + mask = 0x1; + for (i = 0; i < BITS_PER_MAP; i++) { + if (!(mask & map)) + return (i); + mask = mask << 1; + } + return (i); +} + +static uint16 +overflow_page(HTAB *hashp) +{ + register uint32 *freep=NULL; + register int max_free, offset, splitnum; + uint16 addr; + uint32 i; + int bit, first_page, free_bit, free_page, in_use_bits, j; +#ifdef DEBUG2 + int tmp1, tmp2; +#endif + splitnum = hashp->OVFL_POINT; + max_free = hashp->SPARES[splitnum]; + + free_page = (max_free - 1) >> (hashp->BSHIFT + BYTE_SHIFT); + free_bit = (max_free - 1) & ((hashp->BSIZE << BYTE_SHIFT) - 1); + + /* Look through all the free maps to find the first free block */ + first_page = hashp->LAST_FREED >>(hashp->BSHIFT + BYTE_SHIFT); + for ( i = first_page; i <= (unsigned)free_page; i++ ) { + if (!(freep = (uint32 *)hashp->mapp[i]) && + !(freep = fetch_bitmap(hashp, i))) + return (0); + if (i == (unsigned)free_page) + in_use_bits = free_bit; + else + in_use_bits = (hashp->BSIZE << BYTE_SHIFT) - 1; + + if (i == (unsigned)first_page) { + bit = hashp->LAST_FREED & + ((hashp->BSIZE << BYTE_SHIFT) - 1); + j = bit / BITS_PER_MAP; + bit = bit & ~(BITS_PER_MAP - 1); + } else { + bit = 0; + j = 0; + } + for (; bit <= in_use_bits; j++, bit += BITS_PER_MAP) + if (freep[j] != ALL_SET) + goto found; + } + + /* No Free Page Found */ + hashp->LAST_FREED = hashp->SPARES[splitnum]; + hashp->SPARES[splitnum]++; + offset = hashp->SPARES[splitnum] - + (splitnum ? hashp->SPARES[splitnum - 1] : 0); + +#define OVMSG "HASH: Out of overflow pages. Increase page size\n" + if (offset > SPLITMASK) { + if (++splitnum >= NCACHED) { +#ifndef macintosh + (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); +#endif + return (0); + } + hashp->OVFL_POINT = splitnum; + hashp->SPARES[splitnum] = hashp->SPARES[splitnum-1]; + hashp->SPARES[splitnum-1]--; + offset = 1; + } + + /* Check if we need to allocate a new bitmap page */ + if (free_bit == (hashp->BSIZE << BYTE_SHIFT) - 1) { + free_page++; + if (free_page >= NCACHED) { +#ifndef macintosh + (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); +#endif + return (0); + } + /* + * This is tricky. The 1 indicates that you want the new page + * allocated with 1 clear bit. Actually, you are going to + * allocate 2 pages from this map. The first is going to be + * the map page, the second is the overflow page we were + * looking for. The init_bitmap routine automatically, sets + * the first bit of itself to indicate that the bitmap itself + * is in use. We would explicitly set the second bit, but + * don't have to if we tell init_bitmap not to leave it clear + * in the first place. + */ + if (__ibitmap(hashp, + (int)OADDR_OF(splitnum, offset), 1, free_page)) + return (0); + hashp->SPARES[splitnum]++; +#ifdef DEBUG2 + free_bit = 2; +#endif + offset++; + if (offset > SPLITMASK) { + if (++splitnum >= NCACHED) { +#ifndef macintosh + (void)write(STDERR_FILENO, OVMSG, + sizeof(OVMSG) - 1); +#endif + return (0); + } + hashp->OVFL_POINT = splitnum; + hashp->SPARES[splitnum] = hashp->SPARES[splitnum-1]; + hashp->SPARES[splitnum-1]--; + offset = 0; + } + } else { + /* + * Free_bit addresses the last used bit. Bump it to address + * the first available bit. + */ + free_bit++; + SETBIT(freep, free_bit); + } + + /* Calculate address of the new overflow page */ + addr = OADDR_OF(splitnum, offset); +#ifdef DEBUG2 + (void)fprintf(stderr, "OVERFLOW_PAGE: ADDR: %d BIT: %d PAGE %d\n", + addr, free_bit, free_page); +#endif + return (addr); + +found: + bit = bit + first_free(freep[j]); + SETBIT(freep, bit); +#ifdef DEBUG2 + tmp1 = bit; + tmp2 = i; +#endif + /* + * Bits are addressed starting with 0, but overflow pages are addressed + * beginning at 1. Bit is a bit addressnumber, so we need to increment + * it to convert it to a page number. + */ + bit = 1 + bit + (i * (hashp->BSIZE << BYTE_SHIFT)); + if (bit >= hashp->LAST_FREED) + hashp->LAST_FREED = bit - 1; + + /* Calculate the split number for this page */ + for (i = 0; (i < (unsigned)splitnum) && (bit > hashp->SPARES[i]); i++) {} + offset = (i ? bit - hashp->SPARES[i - 1] : bit); + if (offset >= SPLITMASK) + return (0); /* Out of overflow pages */ + addr = OADDR_OF(i, offset); +#ifdef DEBUG2 + (void)fprintf(stderr, "OVERFLOW_PAGE: ADDR: %d BIT: %d PAGE %d\n", + addr, tmp1, tmp2); +#endif + + /* Allocate and return the overflow page */ + return (addr); +} + +/* + * Mark this overflow page as free. + */ +extern void +__free_ovflpage(HTAB *hashp, BUFHEAD *obufp) +{ + uint16 addr; + uint32 *freep; + uint32 bit_address, free_page, free_bit; + uint16 ndx; + + if(!obufp || !obufp->addr) + return; + + addr = obufp->addr; +#ifdef DEBUG1 + (void)fprintf(stderr, "Freeing %d\n", addr); +#endif + ndx = (((uint16)addr) >> SPLITSHIFT); + bit_address = + (ndx ? hashp->SPARES[ndx - 1] : 0) + (addr & SPLITMASK) - 1; + if (bit_address < (uint32)hashp->LAST_FREED) + hashp->LAST_FREED = bit_address; + free_page = (bit_address >> (hashp->BSHIFT + BYTE_SHIFT)); + free_bit = bit_address & ((hashp->BSIZE << BYTE_SHIFT) - 1); + + if (!(freep = hashp->mapp[free_page])) + freep = fetch_bitmap(hashp, free_page); + +#ifdef DEBUG + /* + * This had better never happen. It means we tried to read a bitmap + * that has already had overflow pages allocated off it, and we + * failed to read it from the file. + */ + if (!freep) + { + assert(0); + return; + } +#endif + CLRBIT(freep, free_bit); +#ifdef DEBUG2 + (void)fprintf(stderr, "FREE_OVFLPAGE: ADDR: %d BIT: %d PAGE %d\n", + obufp->addr, free_bit, free_page); +#endif + __reclaim_buf(hashp, obufp); +} + +/* + * Returns: + * 0 success + * -1 failure + */ +static int +open_temp(HTAB *hashp) +{ +#ifdef XP_OS2 + hashp->fp = mkstemp(NULL); +#else +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) + sigset_t set, oset; +#endif +#if !defined(macintosh) + char * tmpdir; + size_t len; + char last; +#endif + static const char namestr[] = "/_hashXXXXXX"; + char filename[1024]; + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) + /* Block signals; make sure file goes away at process exit. */ + (void)sigfillset(&set); + (void)sigprocmask(SIG_BLOCK, &set, &oset); +#endif + + filename[0] = 0; +#if defined(macintosh) + strcat(filename, namestr + 1); +#else + tmpdir = getenv("TMP"); + if (!tmpdir) + tmpdir = getenv("TMPDIR"); + if (!tmpdir) + tmpdir = getenv("TEMP"); + if (!tmpdir) + tmpdir = "."; + len = strlen(tmpdir); + if (len && len < (sizeof filename - sizeof namestr)) { + strcpy(filename, tmpdir); + } + len = strlen(filename); + last = tmpdir[len - 1]; + strcat(filename, (last == '/' || last == '\\') ? namestr + 1 : namestr); +#endif + +#if defined(_WIN32) || defined(_WINDOWS) + if ((hashp->fp = mkstempflags(filename, _O_BINARY|_O_TEMPORARY)) != -1) { + if (hashp->filename) { + free(hashp->filename); + } + hashp->filename = strdup(filename); + hashp->is_temp = 1; + } +#else + if ((hashp->fp = mkstemp(filename)) != -1) { + (void)unlink(filename); +#if !defined(macintosh) + (void)fcntl(hashp->fp, F_SETFD, 1); +#endif + } +#endif + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) + (void)sigprocmask(SIG_SETMASK, &oset, (sigset_t *)NULL); +#endif +#endif /* !OS2 */ + return (hashp->fp != -1 ? 0 : -1); +} + +/* + * We have to know that the key will fit, but the last entry on the page is + * an overflow pair, so we need to shift things. + */ +static void +squeeze_key(uint16 *sp, const DBT * key, const DBT * val) +{ + register char *p; + uint16 free_space, n, off, pageno; + + p = (char *)sp; + n = sp[0]; + free_space = FREESPACE(sp); + off = OFFSET(sp); + + pageno = sp[n - 1]; + off -= key->size; + sp[n - 1] = off; + memmove(p + off, key->data, key->size); + off -= val->size; + sp[n] = off; + memmove(p + off, val->data, val->size); + sp[0] = n + 2; + sp[n + 1] = pageno; + sp[n + 2] = OVFLPAGE; + FREESPACE(sp) = free_space - PAIRSIZE(key, val); + OFFSET(sp) = off; +} + +static uint32 * +fetch_bitmap(HTAB *hashp, uint32 ndx) +{ + if (ndx >= (unsigned)hashp->nmaps) + return (NULL); + if ((hashp->mapp[ndx] = (uint32 *)malloc((size_t)hashp->BSIZE)) == NULL) + return (NULL); + if (__get_page(hashp, + (char *)hashp->mapp[ndx], hashp->BITMAPS[ndx], 0, 1, 1)) { + free(hashp->mapp[ndx]); + hashp->mapp[ndx] = NULL; /* NEW: 9-11-95 */ + return (NULL); + } + return (hashp->mapp[ndx]); +} + +#ifdef DEBUG4 +int +print_chain(int addr) +{ + BUFHEAD *bufp; + short *bp, oaddr; + + (void)fprintf(stderr, "%d ", addr); + bufp = __get_buf(hashp, addr, NULL, 0); + bp = (short *)bufp->page; + while (bp[0] && ((bp[bp[0]] == OVFLPAGE) || + ((bp[0] > 2) && bp[2] < REAL_KEY))) { + oaddr = bp[bp[0] - 1]; + (void)fprintf(stderr, "%d ", (int)oaddr); + bufp = __get_buf(hashp, (int)oaddr, bufp, 0); + bp = (short *)bufp->page; + } + (void)fprintf(stderr, "\n"); +} +#endif diff --git a/dbm/src/hash.c b/dbm/src/hash.c new file mode 100644 index 000000000..530160244 --- /dev/null +++ b/dbm/src/hash.c @@ -0,0 +1,1258 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <sys/param.h> +#endif + +#if !defined(macintosh) +#ifdef XP_OS2_EMX +#include <sys/types.h> +#endif +#include <sys/stat.h> +#endif + +#if defined(macintosh) +#include <unix.h> +#include <unistd.h> +#endif + +#include <errno.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <unistd.h> +#endif +#if defined(_WIN32) || defined(_WINDOWS) +#include <windows.h> +#endif + +#ifdef XP_OS2_VACPP +#include "types.h" +#define EPERM SOCEPERM +#endif + +#include <assert.h> + +#include "mcom_db.h" +#include "hash.h" +#include "page.h" + +/* +#include "extern.h" +*/ +static int alloc_segs __P((HTAB *, int)); +static int flush_meta __P((HTAB *)); +static int hash_access __P((HTAB *, ACTION, DBT *, DBT *)); +static int hash_close __P((DB *)); +static int hash_delete __P((const DB *, const DBT *, uint)); +static int hash_fd __P((const DB *)); +static int hash_get __P((const DB *, const DBT *, DBT *, uint)); +static int hash_put __P((const DB *, DBT *, const DBT *, uint)); +static void *hash_realloc __P((SEGMENT **, size_t, size_t)); +static int hash_seq __P((const DB *, DBT *, DBT *, uint)); +static int hash_sync __P((const DB *, uint)); +static int hdestroy __P((HTAB *)); +static HTAB *init_hash __P((HTAB *, const char *, HASHINFO *)); +static int init_htab __P((HTAB *, int)); +#if BYTE_ORDER == LITTLE_ENDIAN +static void swap_header __P((HTAB *)); +static void swap_header_copy __P((HASHHDR *, HASHHDR *)); +#endif + +/* Fast arithmetic, relying on powers of 2, */ +#define MOD(x, y) ((x) & ((y) - 1)) + +#define RETURN_ERROR(ERR, LOC) { save_errno = ERR; goto LOC; } + +/* Return values */ +#define SUCCESS (0) +#define DBM_ERROR (-1) +#define ABNORMAL (1) + +#ifdef HASH_STATISTICS +int hash_accesses, hash_collisions, hash_expansions, hash_overflows; +#endif + +/* A new Lou (montulli@mozilla.com) routine. + * + * The database is screwed. + * + * This closes the file, flushing buffers as appropriate. + */ +static void +__remove_database(DB *dbp) +{ + HTAB *hashp = (HTAB *)dbp->internal; + + assert(0); + + if (!hashp) + return; + hdestroy(hashp); + dbp->internal = NULL; +} + +/************************** INTERFACE ROUTINES ***************************/ +/* OPEN/CLOSE */ + + +extern DB * +__hash_open(const char *file, int flags, int mode, const HASHINFO *info, int dflags) +{ + HTAB *hashp=NULL; + struct stat statbuf; + DB *dbp; + int bpages, hdrsize, new_table, nsegs, save_errno; + + if ((flags & O_ACCMODE) == O_WRONLY) { + errno = EINVAL; + RETURN_ERROR(ENOMEM, error0); + } + + /* zero the statbuffer so that + * we can check it for a non-zero + * date to see if stat succeeded + */ + memset(&statbuf, 0, sizeof(struct stat)); + + if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB)))) + RETURN_ERROR(ENOMEM, error0); + hashp->fp = NO_FILE; + if(file) + hashp->filename = strdup(file); + + /* + * Even if user wants write only, we need to be able to read + * the actual file, so we need to open it read/write. But, the + * field in the hashp structure needs to be accurate so that + * we can check accesses. + */ + hashp->flags = flags; + + new_table = 0; + if (!file || (flags & O_TRUNC) || (stat(file, &statbuf) && (errno == ENOENT))) + { + if (errno == ENOENT) + errno = 0; /* Just in case someone looks at errno */ + new_table = 1; + } + else if(statbuf.st_mtime && statbuf.st_size == 0) + { + /* check for a zero length file and delete it + * if it exists + */ + new_table = 1; + } + hashp->file_size = statbuf.st_size; + + if (file) { + +#if defined(_WIN32) || defined(_WINDOWS) || defined (macintosh) || defined(XP_OS2_VACPP) + if ((hashp->fp = DBFILE_OPEN(file, flags | O_BINARY, mode)) == -1) + RETURN_ERROR(errno, error0); +#else + if ((hashp->fp = open(file, flags, mode)) == -1) + RETURN_ERROR(errno, error0); + (void)fcntl(hashp->fp, F_SETFD, 1); +/* We can't use fcntl because of NFS bugs. SIGH */ +#if 0 + { + struct flock fl; + memset(&fl, 0, sizeof(fl)); + fl.l_type = F_WRLCK; + if (fcntl(hashp->fp, F_SETLK, &fl) < 0) { +#ifdef DEBUG + fprintf(stderr, "unable to open %s because it's locked (flags=0x%x)\n", file, flags); +#endif + RETURN_ERROR(EACCES, error1); + } + } +#endif + +#endif + } + if (new_table) { + if (!init_hash(hashp, file, (HASHINFO *)info)) + RETURN_ERROR(errno, error1); + } else { + /* Table already exists */ + if (info && info->hash) + hashp->hash = info->hash; + else + hashp->hash = __default_hash; + + hdrsize = read(hashp->fp, (char *)&hashp->hdr, sizeof(HASHHDR)); +#if BYTE_ORDER == LITTLE_ENDIAN + swap_header(hashp); +#endif + if (hdrsize == -1) + RETURN_ERROR(errno, error1); + if (hdrsize != sizeof(HASHHDR)) + RETURN_ERROR(EFTYPE, error1); + /* Verify file type, versions and hash function */ + if (hashp->MAGIC != HASHMAGIC) + RETURN_ERROR(EFTYPE, error1); +#define OLDHASHVERSION 1 + if (hashp->VERSION != HASHVERSION && + hashp->VERSION != OLDHASHVERSION) + RETURN_ERROR(EFTYPE, error1); + if (hashp->hash(CHARKEY, sizeof(CHARKEY)) != hashp->H_CHARKEY) + RETURN_ERROR(EFTYPE, error1); + if (hashp->NKEYS < 0) { + /* + ** OOPS. Old bad database from previously busted + ** code. Blow it away. + */ + close(hashp->fp); + if (remove(file) < 0) { +#if defined(DEBUG) && defined(XP_UNIX) + fprintf(stderr, + "WARNING: You have an old bad cache.db file" + " '%s', and I couldn't remove it!\n", file); +#endif + } else { +#if defined(DEBUG) && defined(XP_UNIX) + fprintf(stderr, + "WARNING: I blew away your %s file because" + " it was bad due to a recently fixed bug\n", + file); +#endif + } + RETURN_ERROR(ENOENT, error0); + } + + /* + * Figure out how many segments we need. Max_Bucket is the + * maximum bucket number, so the number of buckets is + * max_bucket + 1. + */ + nsegs = (hashp->MAX_BUCKET + 1 + hashp->SGSIZE - 1) / + hashp->SGSIZE; + hashp->nsegs = 0; + if (alloc_segs(hashp, nsegs)) + /* + * If alloc_segs fails, table will have been destroyed + * and errno will have been set. + */ + RETURN_ERROR(ENOMEM, error0); + /* Read in bitmaps */ + bpages = (hashp->SPARES[hashp->OVFL_POINT] + + (hashp->BSIZE << BYTE_SHIFT) - 1) >> + (hashp->BSHIFT + BYTE_SHIFT); + + hashp->nmaps = bpages; + (void)memset(&hashp->mapp[0], 0, bpages * sizeof(uint32 *)); + } + + /* Initialize Buffer Manager */ + if (info && info->cachesize) + __buf_init(hashp, (int32) info->cachesize); + else + __buf_init(hashp, DEF_BUFSIZE); + + hashp->new_file = new_table; +#ifdef macintosh + hashp->save_file = file && !(hashp->flags & O_RDONLY); +#else + hashp->save_file = file && (hashp->flags & O_RDWR); +#endif + hashp->cbucket = -1; + if (!(dbp = (DB *)malloc(sizeof(DB)))) { + save_errno = errno; + hdestroy(hashp); + errno = save_errno; + RETURN_ERROR(ENOMEM, error0); + } + dbp->internal = hashp; + dbp->close = hash_close; + dbp->del = hash_delete; + dbp->fd = hash_fd; + dbp->get = hash_get; + dbp->put = hash_put; + dbp->seq = hash_seq; + dbp->sync = hash_sync; + dbp->type = DB_HASH; + +#if 0 +#if defined(DEBUG) && !defined(_WINDOWS) +{ +extern int MKLib_trace_flag; + + if(MKLib_trace_flag) + (void)fprintf(stderr, +"%s\n%s%lx\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%x\n%s%x\n%s%d\n%s%d\n", + "init_htab:", + "TABLE POINTER ", (unsigned long) hashp, + "BUCKET SIZE ", hashp->BSIZE, + "BUCKET SHIFT ", hashp->BSHIFT, + "DIRECTORY SIZE ", hashp->DSIZE, + "SEGMENT SIZE ", hashp->SGSIZE, + "SEGMENT SHIFT ", hashp->SSHIFT, + "FILL FACTOR ", hashp->FFACTOR, + "MAX BUCKET ", hashp->MAX_BUCKET, + "OVFL POINT ", hashp->OVFL_POINT, + "LAST FREED ", hashp->LAST_FREED, + "HIGH MASK ", hashp->HIGH_MASK, + "LOW MASK ", hashp->LOW_MASK, + "NSEGS ", hashp->nsegs, + "NKEYS ", hashp->NKEYS); +} +#endif +#endif /* 0 */ +#ifdef HASH_STATISTICS + hash_overflows = hash_accesses = hash_collisions = hash_expansions = 0; +#endif + return (dbp); + +error1: + if (hashp != NULL) + (void)close(hashp->fp); + +error0: + free(hashp); + errno = save_errno; + return (NULL); +} + +static int +hash_close(DB *dbp) +{ + HTAB *hashp; + int retval; + + if (!dbp) + return (DBM_ERROR); + + hashp = (HTAB *)dbp->internal; + if(!hashp) + return (DBM_ERROR); + + retval = hdestroy(hashp); + free(dbp); + return (retval); +} + +static int hash_fd(const DB *dbp) +{ + HTAB *hashp; + + if (!dbp) + return (DBM_ERROR); + + hashp = (HTAB *)dbp->internal; + if(!hashp) + return (DBM_ERROR); + + if (hashp->fp == -1) { + errno = ENOENT; + return (-1); + } + return (hashp->fp); +} + +/************************** LOCAL CREATION ROUTINES **********************/ +static HTAB * +init_hash(HTAB *hashp, const char *file, HASHINFO *info) +{ + struct stat statbuf; + int nelem; + + nelem = 1; + hashp->NKEYS = 0; + hashp->LORDER = BYTE_ORDER; + hashp->BSIZE = DEF_BUCKET_SIZE; + hashp->BSHIFT = DEF_BUCKET_SHIFT; + hashp->SGSIZE = DEF_SEGSIZE; + hashp->SSHIFT = DEF_SEGSIZE_SHIFT; + hashp->DSIZE = DEF_DIRSIZE; + hashp->FFACTOR = DEF_FFACTOR; + hashp->hash = __default_hash; + memset(hashp->SPARES, 0, sizeof(hashp->SPARES)); + memset(hashp->BITMAPS, 0, sizeof (hashp->BITMAPS)); + + /* Fix bucket size to be optimal for file system */ + if (file != NULL) { + if (stat(file, &statbuf)) + return (NULL); + +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(VMS) && !defined(XP_OS2) +#if defined(__QNX__) && !defined(__QNXNTO__) + hashp->BSIZE = 512; /* prefered blk size on qnx4 */ +#else + hashp->BSIZE = statbuf.st_blksize; +#endif + + /* new code added by Lou to reduce block + * size down below MAX_BSIZE + */ + if (hashp->BSIZE > MAX_BSIZE) + hashp->BSIZE = MAX_BSIZE; +#endif + hashp->BSHIFT = __log2((uint32)hashp->BSIZE); + } + + if (info) { + if (info->bsize) { + /* Round pagesize up to power of 2 */ + hashp->BSHIFT = __log2(info->bsize); + hashp->BSIZE = 1 << hashp->BSHIFT; + if (hashp->BSIZE > MAX_BSIZE) { + errno = EINVAL; + return (NULL); + } + } + if (info->ffactor) + hashp->FFACTOR = info->ffactor; + if (info->hash) + hashp->hash = info->hash; + if (info->nelem) + nelem = info->nelem; + if (info->lorder) { + if (info->lorder != BIG_ENDIAN && + info->lorder != LITTLE_ENDIAN) { + errno = EINVAL; + return (NULL); + } + hashp->LORDER = info->lorder; + } + } + /* init_htab should destroy the table and set errno if it fails */ + if (init_htab(hashp, nelem)) + return (NULL); + else + return (hashp); +} +/* + * This calls alloc_segs which may run out of memory. Alloc_segs will destroy + * the table and set errno, so we just pass the error information along. + * + * Returns 0 on No Error + */ +static int +init_htab(HTAB *hashp, int nelem) +{ + register int nbuckets, nsegs; + int l2; + + /* + * Divide number of elements by the fill factor and determine a + * desired number of buckets. Allocate space for the next greater + * power of two number of buckets. + */ + nelem = (nelem - 1) / hashp->FFACTOR + 1; + + l2 = __log2((uint32)PR_MAX(nelem, 2)); + nbuckets = 1 << l2; + + hashp->SPARES[l2] = l2 + 1; + hashp->SPARES[l2 + 1] = l2 + 1; + hashp->OVFL_POINT = l2; + hashp->LAST_FREED = 2; + + /* First bitmap page is at: splitpoint l2 page offset 1 */ + if (__ibitmap(hashp, (int)OADDR_OF(l2, 1), l2 + 1, 0)) + return (-1); + + hashp->MAX_BUCKET = hashp->LOW_MASK = nbuckets - 1; + hashp->HIGH_MASK = (nbuckets << 1) - 1; + hashp->HDRPAGES = ((PR_MAX(sizeof(HASHHDR), MINHDRSIZE) - 1) >> + hashp->BSHIFT) + 1; + + nsegs = (nbuckets - 1) / hashp->SGSIZE + 1; + nsegs = 1 << __log2((uint32)nsegs); + + if (nsegs > hashp->DSIZE) + hashp->DSIZE = nsegs; + return (alloc_segs(hashp, nsegs)); +} + +/********************** DESTROY/CLOSE ROUTINES ************************/ + +/* + * Flushes any changes to the file if necessary and destroys the hashp + * structure, freeing all allocated space. + */ +static int +hdestroy(HTAB *hashp) +{ + int i, save_errno; + + save_errno = 0; + +#ifdef HASH_STATISTICS + (void)fprintf(stderr, "hdestroy: accesses %ld collisions %ld\n", + hash_accesses, hash_collisions); + (void)fprintf(stderr, "hdestroy: expansions %ld\n", + hash_expansions); + (void)fprintf(stderr, "hdestroy: overflows %ld\n", + hash_overflows); + (void)fprintf(stderr, "keys %ld maxp %d segmentcount %d\n", + hashp->NKEYS, hashp->MAX_BUCKET, hashp->nsegs); + + for (i = 0; i < NCACHED; i++) + (void)fprintf(stderr, + "spares[%d] = %d\n", i, hashp->SPARES[i]); +#endif + /* + * Call on buffer manager to free buffers, and if required, + * write them to disk. + */ + if (__buf_free(hashp, 1, hashp->save_file)) + save_errno = errno; + if (hashp->dir) { + free(*hashp->dir); /* Free initial segments */ + /* Free extra segments */ + while (hashp->exsegs--) + free(hashp->dir[--hashp->nsegs]); + free(hashp->dir); + } + if (flush_meta(hashp) && !save_errno) + save_errno = errno; + /* Free Bigmaps */ + for (i = 0; i < hashp->nmaps; i++) + if (hashp->mapp[i]) + free(hashp->mapp[i]); + + if (hashp->fp != -1) + (void)close(hashp->fp); + + if(hashp->filename) { +#if defined(_WIN32) || defined(_WINDOWS) || defined(XP_OS2) + if (hashp->is_temp) + (void)unlink(hashp->filename); +#endif + free(hashp->filename); + } + + free(hashp); + + if (save_errno) { + errno = save_errno; + return (DBM_ERROR); + } + return (SUCCESS); +} + +#if defined(_WIN32) || defined(_WINDOWS) +/* + * Close and reopen file to force file length update on windows. + * + * Returns: + * 0 == OK + * -1 DBM_ERROR + */ +static int +update_EOF(HTAB *hashp) +{ +#if defined(DBM_REOPEN_ON_FLUSH) + char * file = hashp->filename; + off_t file_size; + int flags; + int mode = -1; + struct stat statbuf; + + memset(&statbuf, 0, sizeof statbuf); + + /* make sure we won't lose the file by closing it. */ + if (!file || (stat(file, &statbuf) && (errno == ENOENT))) { + /* pretend we did it. */ + return 0; + } + + (void)close(hashp->fp); + + flags = hashp->flags & ~(O_TRUNC | O_CREAT | O_EXCL); + + if ((hashp->fp = DBFILE_OPEN(file, flags | O_BINARY, mode)) == -1) + return -1; + file_size = lseek(hashp->fp, (off_t)0, SEEK_END); + if (file_size == -1) + return -1; + hashp->file_size = file_size; + return 0; +#else + int fd = hashp->fp; + off_t file_size = lseek(fd, (off_t)0, SEEK_END); + HANDLE handle = (HANDLE)_get_osfhandle(fd); + BOOL cool = FlushFileBuffers(handle); +#ifdef DEBUG3 + if (!cool) { + DWORD err = GetLastError(); + (void)fprintf(stderr, + "FlushFileBuffers failed, last error = %d, 0x%08x\n", + err, err); + } +#endif + if (file_size == -1) + return -1; + hashp->file_size = file_size; + return cool ? 0 : -1; +#endif +} +#endif + +/* + * Write modified pages to disk + * + * Returns: + * 0 == OK + * -1 DBM_ERROR + */ +static int +hash_sync(const DB *dbp, uint flags) +{ + HTAB *hashp; + + if (flags != 0) { + errno = EINVAL; + return (DBM_ERROR); + } + + if (!dbp) + return (DBM_ERROR); + + hashp = (HTAB *)dbp->internal; + if(!hashp) + return (DBM_ERROR); + + if (!hashp->save_file) + return (0); + if (__buf_free(hashp, 0, 1) || flush_meta(hashp)) + return (DBM_ERROR); +#if defined(_WIN32) || defined(_WINDOWS) + if (hashp->updateEOF && hashp->filename && !hashp->is_temp) { + int status = update_EOF(hashp); + hashp->updateEOF = 0; + if (status) + return status; + } +#endif + hashp->new_file = 0; + return (0); +} + +/* + * Returns: + * 0 == OK + * -1 indicates that errno should be set + */ +static int +flush_meta(HTAB *hashp) +{ + HASHHDR *whdrp; +#if BYTE_ORDER == LITTLE_ENDIAN + HASHHDR whdr; +#endif + int fp, i, wsize; + + if (!hashp->save_file) + return (0); + hashp->MAGIC = HASHMAGIC; + hashp->VERSION = HASHVERSION; + hashp->H_CHARKEY = hashp->hash(CHARKEY, sizeof(CHARKEY)); + + fp = hashp->fp; + whdrp = &hashp->hdr; +#if BYTE_ORDER == LITTLE_ENDIAN + whdrp = &whdr; + swap_header_copy(&hashp->hdr, whdrp); +#endif + if ((lseek(fp, (off_t)0, SEEK_SET) == -1) || + ((wsize = write(fp, (char*)whdrp, sizeof(HASHHDR))) == -1)) + return (-1); + else + if (wsize != sizeof(HASHHDR)) { + errno = EFTYPE; + hashp->dbmerrno = errno; + return (-1); + } + for (i = 0; i < NCACHED; i++) + if (hashp->mapp[i]) + if (__put_page(hashp, (char *)hashp->mapp[i], + hashp->BITMAPS[i], 0, 1)) + return (-1); + return (0); +} + +/*******************************SEARCH ROUTINES *****************************/ +/* + * All the access routines return + * + * Returns: + * 0 on SUCCESS + * 1 to indicate an external DBM_ERROR (i.e. key not found, etc) + * -1 to indicate an internal DBM_ERROR (i.e. out of memory, etc) + */ +static int +hash_get( + const DB *dbp, + const DBT *key, + DBT *data, + uint flag) +{ + HTAB *hashp; + int rv; + + hashp = (HTAB *)dbp->internal; + if (!hashp) + return (DBM_ERROR); + + if (flag) { + hashp->dbmerrno = errno = EINVAL; + return (DBM_ERROR); + } + + rv = hash_access(hashp, HASH_GET, (DBT *)key, data); + + if(rv == DATABASE_CORRUPTED_ERROR) + { +#if defined(unix) && defined(DEBUG) + printf("\n\nDBM Database has been corrupted, tell Lou...\n\n"); +#endif + __remove_database((DB *)dbp); + } + + return(rv); +} + +static int +hash_put( + const DB *dbp, + DBT *key, + const DBT *data, + uint flag) +{ + HTAB *hashp; + int rv; + + hashp = (HTAB *)dbp->internal; + if (!hashp) + return (DBM_ERROR); + + if (flag && flag != R_NOOVERWRITE) { + hashp->dbmerrno = errno = EINVAL; + return (DBM_ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { + hashp->dbmerrno = errno = EPERM; + return (DBM_ERROR); + } + + rv = hash_access(hashp, flag == R_NOOVERWRITE ? + HASH_PUTNEW : HASH_PUT, (DBT *)key, (DBT *)data); + + if(rv == DATABASE_CORRUPTED_ERROR) + { +#if defined(unix) && defined(DEBUG) + printf("\n\nDBM Database has been corrupted, tell Lou...\n\n"); +#endif + __remove_database((DB *)dbp); + } + + return(rv); +} + +static int +hash_delete( + const DB *dbp, + const DBT *key, + uint flag) /* Ignored */ +{ + HTAB *hashp; + int rv; + + hashp = (HTAB *)dbp->internal; + if (!hashp) + return (DBM_ERROR); + + if (flag && flag != R_CURSOR) { + hashp->dbmerrno = errno = EINVAL; + return (DBM_ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { + hashp->dbmerrno = errno = EPERM; + return (DBM_ERROR); + } + rv = hash_access(hashp, HASH_DELETE, (DBT *)key, NULL); + + if(rv == DATABASE_CORRUPTED_ERROR) + { +#if defined(unix) && defined(DEBUG) + printf("\n\nDBM Database has been corrupted, tell Lou...\n\n"); +#endif + __remove_database((DB *)dbp); + } + + return(rv); +} + +#define MAX_OVERFLOW_HASH_ACCESS_LOOPS 2000 +/* + * Assume that hashp has been set in wrapper routine. + */ +static int +hash_access( + HTAB *hashp, + ACTION action, + DBT *key, DBT *val) +{ + register BUFHEAD *rbufp; + BUFHEAD *bufp, *save_bufp; + register uint16 *bp; + register long n, ndx, off; + register size_t size; + register char *kp; + uint16 pageno; + uint32 ovfl_loop_count=0; + int32 last_overflow_page_no = -1; + +#ifdef HASH_STATISTICS + hash_accesses++; +#endif + + off = hashp->BSIZE; + size = key->size; + kp = (char *)key->data; + rbufp = __get_buf(hashp, __call_hash(hashp, kp, size), NULL, 0); + if (!rbufp) + return (DATABASE_CORRUPTED_ERROR); + save_bufp = rbufp; + + /* Pin the bucket chain */ + rbufp->flags |= BUF_PIN; + for (bp = (uint16 *)rbufp->page, n = *bp++, ndx = 1; ndx < n;) + { + + if (bp[1] >= REAL_KEY) { + /* Real key/data pair */ + if (size == (unsigned long)(off - *bp) && + memcmp(kp, rbufp->page + *bp, size) == 0) + goto found; + off = bp[1]; +#ifdef HASH_STATISTICS + hash_collisions++; +#endif + bp += 2; + ndx += 2; + } else if (bp[1] == OVFLPAGE) { + + /* database corruption: overflow loop detection */ + if(last_overflow_page_no == (int32)*bp) + return (DATABASE_CORRUPTED_ERROR); + + last_overflow_page_no = *bp; + + rbufp = __get_buf(hashp, *bp, rbufp, 0); + if (!rbufp) { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + } + + ovfl_loop_count++; + if(ovfl_loop_count > MAX_OVERFLOW_HASH_ACCESS_LOOPS) + return (DATABASE_CORRUPTED_ERROR); + + /* FOR LOOP INIT */ + bp = (uint16 *)rbufp->page; + n = *bp++; + ndx = 1; + off = hashp->BSIZE; + } else if (bp[1] < REAL_KEY) { + if ((ndx = + __find_bigpair(hashp, rbufp, ndx, kp, (int)size)) > 0) + goto found; + if (ndx == -2) { + bufp = rbufp; + if (!(pageno = + __find_last_page(hashp, &bufp))) { + ndx = 0; + rbufp = bufp; + break; /* FOR */ + } + rbufp = __get_buf(hashp, pageno, bufp, 0); + if (!rbufp) { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + } + /* FOR LOOP INIT */ + bp = (uint16 *)rbufp->page; + n = *bp++; + ndx = 1; + off = hashp->BSIZE; + } else { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + + } + } + } + + /* Not found */ + switch (action) { + case HASH_PUT: + case HASH_PUTNEW: + if (__addel(hashp, rbufp, key, val)) { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + } else { + save_bufp->flags &= ~BUF_PIN; + return (SUCCESS); + } + case HASH_GET: + case HASH_DELETE: + default: + save_bufp->flags &= ~BUF_PIN; + return (ABNORMAL); + } + +found: + switch (action) { + case HASH_PUTNEW: + save_bufp->flags &= ~BUF_PIN; + return (ABNORMAL); + case HASH_GET: + bp = (uint16 *)rbufp->page; + if (bp[ndx + 1] < REAL_KEY) { + if (__big_return(hashp, rbufp, ndx, val, 0)) + return (DBM_ERROR); + } else { + val->data = (uint8 *)rbufp->page + (int)bp[ndx + 1]; + val->size = bp[ndx] - bp[ndx + 1]; + } + break; + case HASH_PUT: + if ((__delpair(hashp, rbufp, ndx)) || + (__addel(hashp, rbufp, key, val))) { + save_bufp->flags &= ~BUF_PIN; + return (DBM_ERROR); + } + break; + case HASH_DELETE: + if (__delpair(hashp, rbufp, ndx)) + return (DBM_ERROR); + break; + default: + abort(); + } + save_bufp->flags &= ~BUF_PIN; + return (SUCCESS); +} + +static int +hash_seq( + const DB *dbp, + DBT *key, DBT *data, + uint flag) +{ + register uint32 bucket; + register BUFHEAD *bufp; + HTAB *hashp; + uint16 *bp, ndx; + + hashp = (HTAB *)dbp->internal; + if (!hashp) + return (DBM_ERROR); + + if (flag && flag != R_FIRST && flag != R_NEXT) { + hashp->dbmerrno = errno = EINVAL; + return (DBM_ERROR); + } +#ifdef HASH_STATISTICS + hash_accesses++; +#endif + if ((hashp->cbucket < 0) || (flag == R_FIRST)) { + hashp->cbucket = 0; + hashp->cndx = 1; + hashp->cpage = NULL; + } + + for (bp = NULL; !bp || !bp[0]; ) { + if (!(bufp = hashp->cpage)) { + for (bucket = hashp->cbucket; + bucket <= (uint32)hashp->MAX_BUCKET; + bucket++, hashp->cndx = 1) { + bufp = __get_buf(hashp, bucket, NULL, 0); + if (!bufp) + return (DBM_ERROR); + hashp->cpage = bufp; + bp = (uint16 *)bufp->page; + if (bp[0]) + break; + } + hashp->cbucket = bucket; + if (hashp->cbucket > hashp->MAX_BUCKET) { + hashp->cbucket = -1; + return (ABNORMAL); + } + } else + bp = (uint16 *)hashp->cpage->page; + +#ifdef DEBUG + assert(bp); + assert(bufp); +#endif + while (bp[hashp->cndx + 1] == OVFLPAGE) { + bufp = hashp->cpage = + __get_buf(hashp, bp[hashp->cndx], bufp, 0); + if (!bufp) + return (DBM_ERROR); + bp = (uint16 *)(bufp->page); + hashp->cndx = 1; + } + if (!bp[0]) { + hashp->cpage = NULL; + ++hashp->cbucket; + } + } + ndx = hashp->cndx; + if (bp[ndx + 1] < REAL_KEY) { + if (__big_keydata(hashp, bufp, key, data, 1)) + return (DBM_ERROR); + } else { + key->data = (uint8 *)hashp->cpage->page + bp[ndx]; + key->size = (ndx > 1 ? bp[ndx - 1] : hashp->BSIZE) - bp[ndx]; + data->data = (uint8 *)hashp->cpage->page + bp[ndx + 1]; + data->size = bp[ndx] - bp[ndx + 1]; + ndx += 2; + if (ndx > bp[0]) { + hashp->cpage = NULL; + hashp->cbucket++; + hashp->cndx = 1; + } else + hashp->cndx = ndx; + } + return (SUCCESS); +} + +/********************************* UTILITIES ************************/ + +/* + * Returns: + * 0 ==> OK + * -1 ==> Error + */ +extern int +__expand_table(HTAB *hashp) +{ + uint32 old_bucket, new_bucket; + int new_segnum, spare_ndx; + size_t dirsize; + +#ifdef HASH_STATISTICS + hash_expansions++; +#endif + new_bucket = ++hashp->MAX_BUCKET; + old_bucket = (hashp->MAX_BUCKET & hashp->LOW_MASK); + + new_segnum = new_bucket >> hashp->SSHIFT; + + /* Check if we need a new segment */ + if (new_segnum >= hashp->nsegs) { + /* Check if we need to expand directory */ + if (new_segnum >= hashp->DSIZE) { + /* Reallocate directory */ + dirsize = hashp->DSIZE * sizeof(SEGMENT *); + if (!hash_realloc(&hashp->dir, dirsize, dirsize << 1)) + return (-1); + hashp->DSIZE = dirsize << 1; + } + if ((hashp->dir[new_segnum] = + (SEGMENT)calloc((size_t)hashp->SGSIZE, sizeof(SEGMENT))) == NULL) + return (-1); + hashp->exsegs++; + hashp->nsegs++; + } + /* + * If the split point is increasing (MAX_BUCKET's log base 2 + * * increases), we need to copy the current contents of the spare + * split bucket to the next bucket. + */ + spare_ndx = __log2((uint32)(hashp->MAX_BUCKET + 1)); + if (spare_ndx > hashp->OVFL_POINT) { + hashp->SPARES[spare_ndx] = hashp->SPARES[hashp->OVFL_POINT]; + hashp->OVFL_POINT = spare_ndx; + } + + if (new_bucket > (uint32)hashp->HIGH_MASK) { + /* Starting a new doubling */ + hashp->LOW_MASK = hashp->HIGH_MASK; + hashp->HIGH_MASK = new_bucket | hashp->LOW_MASK; + } + /* Relocate records to the new bucket */ + return (__split_page(hashp, old_bucket, new_bucket)); +} + +/* + * If realloc guarantees that the pointer is not destroyed if the realloc + * fails, then this routine can go away. + */ +static void * +hash_realloc( + SEGMENT **p_ptr, + size_t oldsize, size_t newsize) +{ + register void *p; + + if ((p = malloc(newsize))) { + memmove(p, *p_ptr, oldsize); + memset((char *)p + oldsize, 0, newsize - oldsize); + free(*p_ptr); + *p_ptr = (SEGMENT *)p; + } + return (p); +} + +extern uint32 +__call_hash(HTAB *hashp, char *k, size_t len) +{ + uint32 n, bucket; + + n = hashp->hash(k, len); + bucket = n & hashp->HIGH_MASK; + if (bucket > (uint32)hashp->MAX_BUCKET) + bucket = bucket & hashp->LOW_MASK; + return (bucket); +} + +/* + * Allocate segment table. On error, destroy the table and set errno. + * + * Returns 0 on success + */ +static int +alloc_segs( + HTAB *hashp, + int nsegs) +{ + register int i; + register SEGMENT store; + + int save_errno; + + if ((hashp->dir = + (SEGMENT *)calloc((size_t)hashp->DSIZE, sizeof(SEGMENT *))) == NULL) { + save_errno = errno; + (void)hdestroy(hashp); + errno = save_errno; + return (-1); + } + /* Allocate segments */ + if ((store = + (SEGMENT)calloc((size_t)nsegs << hashp->SSHIFT, sizeof(SEGMENT))) == NULL) { + save_errno = errno; + (void)hdestroy(hashp); + errno = save_errno; + return (-1); + } + for (i = 0; i < nsegs; i++, hashp->nsegs++) + hashp->dir[i] = &store[i << hashp->SSHIFT]; + return (0); +} + +#if BYTE_ORDER == LITTLE_ENDIAN +/* + * Hashp->hdr needs to be byteswapped. + */ +static void +swap_header_copy( + HASHHDR *srcp, HASHHDR *destp) +{ + int i; + + P_32_COPY(srcp->magic, destp->magic); + P_32_COPY(srcp->version, destp->version); + P_32_COPY(srcp->lorder, destp->lorder); + P_32_COPY(srcp->bsize, destp->bsize); + P_32_COPY(srcp->bshift, destp->bshift); + P_32_COPY(srcp->dsize, destp->dsize); + P_32_COPY(srcp->ssize, destp->ssize); + P_32_COPY(srcp->sshift, destp->sshift); + P_32_COPY(srcp->ovfl_point, destp->ovfl_point); + P_32_COPY(srcp->last_freed, destp->last_freed); + P_32_COPY(srcp->max_bucket, destp->max_bucket); + P_32_COPY(srcp->high_mask, destp->high_mask); + P_32_COPY(srcp->low_mask, destp->low_mask); + P_32_COPY(srcp->ffactor, destp->ffactor); + P_32_COPY(srcp->nkeys, destp->nkeys); + P_32_COPY(srcp->hdrpages, destp->hdrpages); + P_32_COPY(srcp->h_charkey, destp->h_charkey); + for (i = 0; i < NCACHED; i++) { + P_32_COPY(srcp->spares[i], destp->spares[i]); + P_16_COPY(srcp->bitmaps[i], destp->bitmaps[i]); + } +} + +static void +swap_header(HTAB *hashp) +{ + HASHHDR *hdrp; + int i; + + hdrp = &hashp->hdr; + + M_32_SWAP(hdrp->magic); + M_32_SWAP(hdrp->version); + M_32_SWAP(hdrp->lorder); + M_32_SWAP(hdrp->bsize); + M_32_SWAP(hdrp->bshift); + M_32_SWAP(hdrp->dsize); + M_32_SWAP(hdrp->ssize); + M_32_SWAP(hdrp->sshift); + M_32_SWAP(hdrp->ovfl_point); + M_32_SWAP(hdrp->last_freed); + M_32_SWAP(hdrp->max_bucket); + M_32_SWAP(hdrp->high_mask); + M_32_SWAP(hdrp->low_mask); + M_32_SWAP(hdrp->ffactor); + M_32_SWAP(hdrp->nkeys); + M_32_SWAP(hdrp->hdrpages); + M_32_SWAP(hdrp->h_charkey); + for (i = 0; i < NCACHED; i++) { + M_32_SWAP(hdrp->spares[i]); + M_16_SWAP(hdrp->bitmaps[i]); + } +} +#endif diff --git a/dbm/src/hash_buf.c b/dbm/src/hash_buf.c new file mode 100644 index 000000000..7bfe01a34 --- /dev/null +++ b/dbm/src/hash_buf.c @@ -0,0 +1,408 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hash_buf.c 8.5 (Berkeley) 7/15/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +/* + * PACKAGE: hash + * + * DESCRIPTION: + * Contains buffer management + * + * ROUTINES: + * External + * __buf_init + * __get_buf + * __buf_free + * __reclaim_buf + * Internal + * newbuf + */ +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) +#include <sys/param.h> +#endif + +#include <errno.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef DEBUG +#include <assert.h> +#endif + +#include "mcom_db.h" +#include "hash.h" +#include "page.h" +/* #include "extern.h" */ + +static BUFHEAD *newbuf __P((HTAB *, uint32, BUFHEAD *)); + +/* Unlink B from its place in the lru */ +#define BUF_REMOVE(B) { \ + (B)->prev->next = (B)->next; \ + (B)->next->prev = (B)->prev; \ +} + +/* Insert B after P */ +#define BUF_INSERT(B, P) { \ + (B)->next = (P)->next; \ + (B)->prev = (P); \ + (P)->next = (B); \ + (B)->next->prev = (B); \ +} + +#define MRU hashp->bufhead.next +#define LRU hashp->bufhead.prev + +#define MRU_INSERT(B) BUF_INSERT((B), &hashp->bufhead) +#define LRU_INSERT(B) BUF_INSERT((B), LRU) + +/* + * We are looking for a buffer with address "addr". If prev_bp is NULL, then + * address is a bucket index. If prev_bp is not NULL, then it points to the + * page previous to an overflow page that we are trying to find. + * + * CAVEAT: The buffer header accessed via prev_bp's ovfl field may no longer + * be valid. Therefore, you must always verify that its address matches the + * address you are seeking. + */ +extern BUFHEAD * +__get_buf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp, int newpage) +/* If prev_bp set, indicates a new overflow page. */ +{ + register BUFHEAD *bp; + register uint32 is_disk_mask; + register int is_disk, segment_ndx = 0; + SEGMENT segp = 0; + + is_disk = 0; + is_disk_mask = 0; + if (prev_bp) { + bp = prev_bp->ovfl; + if (!bp || (bp->addr != addr)) + bp = NULL; + if (!newpage) + is_disk = BUF_DISK; + } else { + /* Grab buffer out of directory */ + segment_ndx = addr & (hashp->SGSIZE - 1); + + /* valid segment ensured by __call_hash() */ + segp = hashp->dir[addr >> hashp->SSHIFT]; +#ifdef DEBUG + assert(segp != NULL); +#endif + + bp = PTROF(segp[segment_ndx]); + + is_disk_mask = ISDISK(segp[segment_ndx]); + is_disk = is_disk_mask || !hashp->new_file; + } + + if (!bp) { + bp = newbuf(hashp, addr, prev_bp); + if (!bp) + return(NULL); + if(__get_page(hashp, bp->page, addr, !prev_bp, is_disk, 0)) + { + /* free bp and its page */ + if(prev_bp) + { + /* if prev_bp is set then the new page that + * failed is hooked onto prev_bp as an overflow page. + * if we don't remove the pointer to the bad page + * we may try and access it later and we will die + * horribly because it will have already been + * free'd and overwritten with bogus data. + */ + prev_bp->ovfl = NULL; + } + BUF_REMOVE(bp); + free(bp->page); + free(bp); + return (NULL); + } + + if (!prev_bp) + { +#if 0 + /* 16 bit windows and mac can't handle the + * oring of the is disk flag. + */ + segp[segment_ndx] = + (BUFHEAD *)((ptrdiff_t)bp | is_disk_mask); +#else + /* set the is_disk thing inside the structure + */ + bp->is_disk = is_disk_mask; + segp[segment_ndx] = bp; +#endif + } + } else { + BUF_REMOVE(bp); + MRU_INSERT(bp); + } + return (bp); +} + +/* + * We need a buffer for this page. Either allocate one, or evict a resident + * one (if we have as many buffers as we're allowed) and put this one in. + * + * If newbuf finds an error (returning NULL), it also sets errno. + */ +static BUFHEAD * +newbuf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp) +{ + register BUFHEAD *bp; /* The buffer we're going to use */ + register BUFHEAD *xbp; /* Temp pointer */ + register BUFHEAD *next_xbp; + SEGMENT segp; + int segment_ndx; + uint16 oaddr, *shortp; + + oaddr = 0; + bp = LRU; + /* + * If LRU buffer is pinned, the buffer pool is too small. We need to + * allocate more buffers. + */ + if (hashp->nbufs || (bp->flags & BUF_PIN)) { + /* Allocate a new one */ + if ((bp = (BUFHEAD *)malloc(sizeof(BUFHEAD))) == NULL) + return (NULL); + + /* this memset is supposedly unnecessary but lets add + * it anyways. + */ + memset(bp, 0xff, sizeof(BUFHEAD)); + + if ((bp->page = (char *)malloc((size_t)hashp->BSIZE)) == NULL) { + free(bp); + return (NULL); + } + + /* this memset is supposedly unnecessary but lets add + * it anyways. + */ + memset(bp->page, 0xff, (size_t)hashp->BSIZE); + + if (hashp->nbufs) + hashp->nbufs--; + } else { + /* Kick someone out */ + BUF_REMOVE(bp); + /* + * If this is an overflow page with addr 0, it's already been + * flushed back in an overflow chain and initialized. + */ + if ((bp->addr != 0) || (bp->flags & BUF_BUCKET)) { + /* + * Set oaddr before __put_page so that you get it + * before bytes are swapped. + */ + shortp = (uint16 *)bp->page; + if (shortp[0]) + { + if(shortp[0] > (hashp->BSIZE / sizeof(uint16))) + { + return(NULL); + } + oaddr = shortp[shortp[0] - 1]; + } + if ((bp->flags & BUF_MOD) && __put_page(hashp, bp->page, + bp->addr, (int)IS_BUCKET(bp->flags), 0)) + return (NULL); + /* + * Update the pointer to this page (i.e. invalidate it). + * + * If this is a new file (i.e. we created it at open + * time), make sure that we mark pages which have been + * written to disk so we retrieve them from disk later, + * rather than allocating new pages. + */ + if (IS_BUCKET(bp->flags)) { + segment_ndx = bp->addr & (hashp->SGSIZE - 1); + segp = hashp->dir[bp->addr >> hashp->SSHIFT]; +#ifdef DEBUG + assert(segp != NULL); +#endif + + if (hashp->new_file && + ((bp->flags & BUF_MOD) || + ISDISK(segp[segment_ndx]))) + segp[segment_ndx] = (BUFHEAD *)BUF_DISK; + else + segp[segment_ndx] = NULL; + } + /* + * Since overflow pages can only be access by means of + * their bucket, free overflow pages associated with + * this bucket. + */ + for (xbp = bp; xbp->ovfl;) { + next_xbp = xbp->ovfl; + xbp->ovfl = 0; + xbp = next_xbp; + + /* Check that ovfl pointer is up date. */ + if (IS_BUCKET(xbp->flags) || + (oaddr != xbp->addr)) + break; + + shortp = (uint16 *)xbp->page; + if (shortp[0]) + { + /* LJM is the number of reported + * pages way too much? + */ + if(shortp[0] > hashp->BSIZE/sizeof(uint16)) + return NULL; + /* set before __put_page */ + oaddr = shortp[shortp[0] - 1]; + } + if ((xbp->flags & BUF_MOD) && __put_page(hashp, + xbp->page, xbp->addr, 0, 0)) + return (NULL); + xbp->addr = 0; + xbp->flags = 0; + BUF_REMOVE(xbp); + LRU_INSERT(xbp); + } + } + } + + /* Now assign this buffer */ + bp->addr = addr; +#ifdef DEBUG1 + (void)fprintf(stderr, "NEWBUF1: %d->ovfl was %d is now %d\n", + bp->addr, (bp->ovfl ? bp->ovfl->addr : 0), 0); +#endif + bp->ovfl = NULL; + if (prev_bp) { + /* + * If prev_bp is set, this is an overflow page, hook it in to + * the buffer overflow links. + */ +#ifdef DEBUG1 + (void)fprintf(stderr, "NEWBUF2: %d->ovfl was %d is now %d\n", + prev_bp->addr, (prev_bp->ovfl ? bp->ovfl->addr : 0), + (bp ? bp->addr : 0)); +#endif + prev_bp->ovfl = bp; + bp->flags = 0; + } else + bp->flags = BUF_BUCKET; + MRU_INSERT(bp); + return (bp); +} + +extern void __buf_init(HTAB *hashp, int32 nbytes) +{ + BUFHEAD *bfp; + int npages; + + bfp = &(hashp->bufhead); + npages = (nbytes + hashp->BSIZE - 1) >> hashp->BSHIFT; + npages = PR_MAX(npages, MIN_BUFFERS); + + hashp->nbufs = npages; + bfp->next = bfp; + bfp->prev = bfp; + /* + * This space is calloc'd so these are already null. + * + * bfp->ovfl = NULL; + * bfp->flags = 0; + * bfp->page = NULL; + * bfp->addr = 0; + */ +} + +extern int +__buf_free(HTAB *hashp, int do_free, int to_disk) +{ + BUFHEAD *bp; + int status = -1; + + /* Need to make sure that buffer manager has been initialized */ + if (!LRU) + return (0); + for (bp = LRU; bp != &hashp->bufhead;) { + /* Check that the buffer is valid */ + if (bp->addr || IS_BUCKET(bp->flags)) { + if (to_disk && (bp->flags & BUF_MOD) && + (status = __put_page(hashp, bp->page, + bp->addr, IS_BUCKET(bp->flags), 0))) { + + if (do_free) { + if (bp->page) + free(bp->page); + BUF_REMOVE(bp); + free(bp); + } + + return (status); + } + } + /* Check if we are freeing stuff */ + if (do_free) { + if (bp->page) + free(bp->page); + BUF_REMOVE(bp); + free(bp); + bp = LRU; + } else + bp = bp->prev; + } + return (0); +} + +extern void +__reclaim_buf(HTAB *hashp, BUFHEAD *bp) +{ + bp->ovfl = 0; + bp->addr = 0; + bp->flags = 0; + BUF_REMOVE(bp); + LRU_INSERT(bp); +} diff --git a/dbm/src/hsearch.c b/dbm/src/hsearch.c new file mode 100644 index 000000000..fb8a58bad --- /dev/null +++ b/dbm/src/hsearch.c @@ -0,0 +1,108 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)hsearch.c 8.4 (Berkeley) 7/21/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifndef macintosh +#include <sys/types.h> +#endif + +#include <fcntl.h> +#include <string.h> + +#include "mcom_db.h" +#include "hsearch.h" + +static DB *dbp = NULL; +static ENTRY retval; + +extern int +hcreate(uint nel) +{ + HASHINFO info; + + info.nelem = nel; + info.bsize = 256; + info.ffactor = 8; + info.cachesize = 0; + info.hash = NULL; + info.lorder = 0; + dbp = (DB *)__hash_open(NULL, O_CREAT | O_RDWR, 0600, &info, 0); + return ((int)dbp); +} + +extern ENTRY * +hsearch(ENTRY item, ACTION action) +{ + DBT key, val; + int status; + + if (!dbp) + return (NULL); + key.data = (uint8 *)item.key; + key.size = strlen(item.key) + 1; + + if (action == ENTER) { + val.data = (uint8 *)item.data; + val.size = strlen(item.data) + 1; + status = (dbp->put)(dbp, &key, &val, R_NOOVERWRITE); + if (status) + return (NULL); + } else { + /* FIND */ + status = (dbp->get)(dbp, &key, &val, 0); + if (status) + return (NULL); + else + item.data = (char *)val.data; + } + retval.key = item.key; + retval.data = item.data; + return (&retval); +} + +extern void +hdestroy() +{ + if (dbp) { + (void)(dbp->close)(dbp); + dbp = NULL; + } +} diff --git a/dbm/src/memmove.c b/dbm/src/memmove.c new file mode 100644 index 000000000..70eb1e5d2 --- /dev/null +++ b/dbm/src/memmove.c @@ -0,0 +1,150 @@ +#if defined(__sun) && !defined(__SVR4) +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Chris Torek. + * + * 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifdef HAVE_SYS_CDEFS_H +#include <sys/cdefs.h> +#else +#include "cdefs.h" +#endif +#include <string.h> + +/* + * sizeof(word) MUST BE A POWER OF TWO + * SO THAT wmask BELOW IS ALL ONES + */ +typedef int word; /* "word" used for optimal copy speed */ + +#define wsize sizeof(word) +#define wmask (wsize - 1) + +/* + * Copy a block of memory, handling overlap. + * This is the routine that actually implements + * (the portable versions of) bcopy, memcpy, and memmove. + */ +#ifdef MEMCOPY +void * +memcpy(dst0, src0, length) +#else +#ifdef MEMMOVE +void * +memmove(dst0, src0, length) +#else +void +bcopy(src0, dst0, length) +#endif +#endif + void *dst0; + const void *src0; + register size_t length; +{ + register char *dst = dst0; + register const char *src = src0; + register size_t t; + + if (length == 0 || dst == src) /* nothing to do */ + goto done; + + /* + * Macros: loop-t-times; and loop-t-times, t>0 + */ +#define TLOOP(s) if (t) TLOOP1(s) +#define TLOOP1(s) do { s; } while (--t) + + if ((unsigned long)dst < (unsigned long)src) { + /* + * Copy forward. + */ + t = (int)src; /* only need low bits */ + if ((t | (int)dst) & wmask) { + /* + * Try to align operands. This cannot be done + * unless the low bits match. + */ + if ((t ^ (int)dst) & wmask || length < wsize) + t = length; + else + t = wsize - (t & wmask); + length -= t; + TLOOP1(*dst++ = *src++); + } + /* + * Copy whole words, then mop up any trailing bytes. + */ + t = length / wsize; + TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize); + t = length & wmask; + TLOOP(*dst++ = *src++); + } else { + /* + * Copy backwards. Otherwise essentially the same. + * Alignment works as before, except that it takes + * (t&wmask) bytes to align, not wsize-(t&wmask). + */ + src += length; + dst += length; + t = (int)src; + if ((t | (int)dst) & wmask) { + if ((t ^ (int)dst) & wmask || length <= wsize) + t = length; + else + t &= wmask; + length -= t; + TLOOP1(*--dst = *--src); + } + t = length / wsize; + TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src); + t = length & wmask; + TLOOP(*--dst = *--src); + } +done: +#if defined(MEMCOPY) || defined(MEMMOVE) + return (dst0); +#else + return; +#endif +} +#endif /* no __sgi */ + +/* Some compilers don't like an empty source file. */ +static int dummy = 0; diff --git a/dbm/src/mktemp.c b/dbm/src/mktemp.c new file mode 100644 index 000000000..574eb9fe5 --- /dev/null +++ b/dbm/src/mktemp.c @@ -0,0 +1,168 @@ +/* + * Copyright (c) 1987, 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#ifdef macintosh +#include <unix.h> +#else +#include <sys/types.h> +#include <sys/stat.h> +#endif +#include <fcntl.h> +#include <errno.h> +#include <stdio.h> +#include <ctype.h> +#include "mcom_db.h" + +#if !defined(_WINDOWS) && !defined(XP_OS2_VACPP) +#include <unistd.h> +#endif + +#ifdef XP_OS2_VACPP +#define ENOTDIR EBADPOS +#include <process.h> +#include <dirent.h> +#endif + +#ifdef _WINDOWS +#include <process.h> +#include "winfile.h" +#endif + +static int _gettemp(char *path, register int *doopen, int extraFlags); + +int +mkstemp(char *path) +{ +#ifdef XP_OS2 + FILE *temp = tmpfile(); + + return (temp ? fileno(temp) : -1); +#else + int fd; + + return (_gettemp(path, &fd, 0) ? fd : -1); +#endif +} + +int +mkstempflags(char *path, int extraFlags) +{ + int fd; + + return (_gettemp(path, &fd, extraFlags) ? fd : -1); +} + +char * +mktemp(char *path) +{ + return(_gettemp(path, (int *)NULL, 0) ? path : (char *)NULL); +} + +/* NB: This routine modifies its input string, and does not always restore it. +** returns 1 on success, 0 on failure. +*/ +static int +_gettemp(char *path, register int *doopen, int extraFlags) +{ +#if !defined(_WINDOWS) || defined(_WIN32) + extern int errno; +#endif + register char *start, *trv; + struct stat sbuf; + unsigned int pid; + + pid = getpid(); + for (trv = path; *trv; ++trv); /* extra X's get set to 0's */ + while (*--trv == 'X') { + *trv = (pid % 10) + '0'; + pid /= 10; + } + + /* + * check the target directory; if you have six X's and it + * doesn't exist this runs for a *very* long time. + */ + for (start = trv + 1;; --trv) { + char saved; + if (trv <= path) + break; + saved = *trv; + if (saved == '/' || saved == '\\') { + int rv; + *trv = '\0'; + rv = stat(path, &sbuf); + *trv = saved; + if (rv) + return(0); + if (!S_ISDIR(sbuf.st_mode)) { + errno = ENOTDIR; + return(0); + } + break; + } + } + + for (;;) { + if (doopen) { + if ((*doopen = + open(path, O_CREAT|O_EXCL|O_RDWR|extraFlags, 0600)) >= 0) + return(1); + if (errno != EEXIST) + return(0); + } + else if (stat(path, &sbuf)) + return(errno == ENOENT ? 1 : 0); + + /* tricky little algorithm for backward compatibility */ + for (trv = start;;) { + if (!*trv) + return(0); + if (*trv == 'z') + *trv++ = 'a'; + else { + if (isdigit(*trv)) + *trv = 'a'; + else + ++*trv; + break; + } + } + } + /*NOTREACHED*/ +} diff --git a/dbm/src/ndbm.c b/dbm/src/ndbm.c new file mode 100644 index 000000000..03d5cf381 --- /dev/null +++ b/dbm/src/ndbm.c @@ -0,0 +1,199 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Margo Seltzer. + * + * 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)ndbm.c 8.4 (Berkeley) 7/21/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +/* + * This package provides a dbm compatible interface to the new hashing + * package described in db(3). + */ +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(XP_OS2_VACPP) +#include <sys/param.h> +#endif + +#if defined(__linux) +#include <linux/limits.h> +#endif + +#ifdef __OS2__ +#include "dirent.h" +#endif + +#include <stdio.h> +#include <string.h> + +#include "ndbm.h" +#include "hash.h" + +/* + * Returns: + * *DBM on success + * NULL on failure + */ +extern DBM * +dbm_open(const char *file, int flags, int mode) +{ + HASHINFO info; + char path[MAXPATHLEN]; + + info.bsize = 4096; + info.ffactor = 40; + info.nelem = 1; + info.cachesize = 0; + info.hash = NULL; + info.lorder = 0; + (void)strcpy(path, file); + (void)strcat(path, DBM_SUFFIX); + return ((DBM *)__hash_open(path, flags, mode, &info, 0)); +} + +extern void +dbm_close(DBM *db) +{ + (void)(db->close)(db); +} + +/* + * Returns: + * DATUM on success + * NULL on failure + */ +extern datum +dbm_fetch(DBM *db, datum key) +{ + datum retval; + int status; + + status = (db->get)(db, (DBT *)&key, (DBT *)&retval, 0); + if (status) { + retval.dptr = NULL; + retval.dsize = 0; + } + return (retval); +} + +/* + * Returns: + * DATUM on success + * NULL on failure + */ +extern datum +dbm_firstkey(DBM *db) +{ + int status; + datum retdata, retkey; + + status = (db->seq)(db, (DBT *)&retkey, (DBT *)&retdata, R_FIRST); + if (status) + retkey.dptr = NULL; + return (retkey); +} + +/* + * Returns: + * DATUM on success + * NULL on failure + */ +extern datum +dbm_nextkey(DBM *db) +{ + int status; + datum retdata, retkey; + + status = (db->seq)(db, (DBT *)&retkey, (DBT *)&retdata, R_NEXT); + if (status) + retkey.dptr = NULL; + return (retkey); +} +/* + * Returns: + * 0 on success + * <0 failure + */ +extern int +dbm_delete(DBM *db, datum key) +{ + int status; + + status = (db->del)(db, (DBT *)&key, 0); + if (status) + return (-1); + else + return (0); +} + +/* + * Returns: + * 0 on success + * <0 failure + * 1 if DBM_INSERT and entry exists + */ +extern int +dbm_store(DBM *db, datum key, datum content, int flags) +{ + return ((db->put)(db, (DBT *)&key, (DBT *)&content, + (flags == DBM_INSERT) ? R_NOOVERWRITE : 0)); +} + + +extern int +dbm_error(DBM *db) +{ + HTAB *hp; + + hp = (HTAB *)db->internal; + return (hp->dbmerrno); +} + +extern int +dbm_clearerr(DBM *db) +{ + HTAB *hp; + + hp = (HTAB *)db->internal; + hp->dbmerrno = 0; + return (0); +} + +extern int +dbm_dirfno(DBM *db) +{ + return(((HTAB *)db->internal)->fp); +} diff --git a/dbm/src/nsres.c b/dbm/src/nsres.c new file mode 100644 index 000000000..e383d58e5 --- /dev/null +++ b/dbm/src/nsres.c @@ -0,0 +1,307 @@ +#include "watcomfx.h" + +#include "nsres.h" + +#include <stdio.h> + +#include <stdlib.h> + +#include <string.h> + +struct RESDATABASE +{ + DB *hdb; + NSRESTHREADINFO *threadinfo; + char * pbuf[MAXBUFNUM]; +} ; +typedef struct RESDATABASE * RESHANDLE; + +typedef struct STRINGDATA +{ + char *str; + unsigned int charsetid; +} STRINGDATA; + + +typedef unsigned int CHARSETTYPE; +#define RES_LOCK if (hres->threadinfo) hres->threadinfo->fn_lock(hres->threadinfo->lock); +#define RES_UNLOCK if (hres->threadinfo) hres->threadinfo->fn_unlock(hres->threadinfo->lock); + +int GenKeyData(const char *library, int32 id, DBT *key); + +/* + Right now, the page size used for resource is same as for Navigator cache + database + */ +HASHINFO res_hash_info = { + 32*1024, + 0, + 0, + 0, + 0, /* 64 * 1024U */ + 0}; + +int GenKeyData(const char *library, int32 id, DBT *key) +{ + char idstr[10]; + static char * strdata = NULL; + size_t len; + + if (strdata) + free (strdata); + + if (id == 0) + idstr[0] = '\0'; + else + { + sprintf(idstr, "%d", id); + /* itoa(id, idstr, 10); */ + } + + if (library == NULL) + len = strlen(idstr) + 1; + else + len = strlen(library) + strlen(idstr) + 1; + strdata = (char *) malloc (len); + strcpy(strdata, library); + strcat(strdata, idstr); + + key->size = len; + key->data = strdata; + + return 1; +} + +NSRESHANDLE NSResCreateTable(const char *filename, NSRESTHREADINFO *threadinfo) +{ + RESHANDLE hres; + int flag; + + flag = O_RDWR | O_CREAT; + + hres = (RESHANDLE) malloc ( sizeof(struct RESDATABASE) ); + memset(hres, 0, sizeof(struct RESDATABASE)); + + if (threadinfo && threadinfo->lock && threadinfo->fn_lock + && threadinfo->fn_unlock) + { + hres->threadinfo = (NSRESTHREADINFO *) malloc( sizeof(NSRESTHREADINFO) ); + hres->threadinfo->lock = threadinfo->lock; + hres->threadinfo->fn_lock = threadinfo->fn_lock; + hres->threadinfo->fn_unlock = threadinfo->fn_unlock; + } + + + RES_LOCK + + hres->hdb = dbopen(filename, flag, 0644, DB_HASH, &res_hash_info); + + RES_UNLOCK + + if(!hres->hdb) + return NULL; + + return (NSRESHANDLE) hres; +} + +NSRESHANDLE NSResOpenTable(const char *filename, NSRESTHREADINFO *threadinfo) +{ + RESHANDLE hres; + int flag; + + flag = O_RDONLY; /* only open database for reading */ + + hres = (RESHANDLE) malloc ( sizeof(struct RESDATABASE) ); + memset(hres, 0, sizeof(struct RESDATABASE)); + + if (threadinfo && threadinfo->lock && threadinfo->fn_lock + && threadinfo->fn_unlock) + { + hres->threadinfo = (NSRESTHREADINFO *) malloc( sizeof(NSRESTHREADINFO) ); + hres->threadinfo->lock = threadinfo->lock; + hres->threadinfo->fn_lock = threadinfo->fn_lock; + hres->threadinfo->fn_unlock = threadinfo->fn_unlock; + } + + + RES_LOCK + + hres->hdb = dbopen(filename, flag, 0644, DB_HASH, &res_hash_info); + + RES_UNLOCK + + if(!hres->hdb) + return NULL; + + return (NSRESHANDLE) hres; +} + + + +void NSResCloseTable(NSRESHANDLE handle) +{ + RESHANDLE hres; + int i; + + if (handle == NULL) + return; + hres = (RESHANDLE) handle; + + RES_LOCK + + (*hres->hdb->sync)(hres->hdb, 0); + (*hres->hdb->close)(hres->hdb); + + RES_UNLOCK + + for (i = 0; i < MAXBUFNUM; i++) + { + if (hres->pbuf[i]) + free (hres->pbuf[i]); + } + + if (hres->threadinfo) + free (hres->threadinfo); + free (hres); +} + + +char *NSResLoadString(NSRESHANDLE handle, const char * library, int32 id, + unsigned int charsetid, char *retbuf) +{ + int status; + RESHANDLE hres; + DBT key, data; + if (handle == NULL) + return NULL; + + hres = (RESHANDLE) handle; + GenKeyData(library, id, &key); + + RES_LOCK + + status = (*hres->hdb->get)(hres->hdb, &key, &data, 0); + + RES_UNLOCK + + if (retbuf) + { + memcpy(retbuf, (char *)data.data + sizeof(CHARSETTYPE), data.size - sizeof(CHARSETTYPE)); + return retbuf; + } + else + { + static int WhichString = 0; + static int bFirstTime = 1; + char *szLoadedString; + int i; + + RES_LOCK + + if (bFirstTime) { + for (i = 0; i < MAXBUFNUM; i++) + hres->pbuf[i] = (char *) malloc(MAXSTRINGLEN * sizeof(char)); + bFirstTime = 0; + } + + szLoadedString = hres->pbuf[WhichString]; + WhichString++; + + /* reset to 0, if WhichString reaches to the end */ + if (WhichString == MAXBUFNUM) + WhichString = 0; + + if (status == 0) + memcpy(szLoadedString, (char *) data.data + sizeof(CHARSETTYPE), + data.size - sizeof(CHARSETTYPE)); + else + szLoadedString[0] = 0; + + RES_UNLOCK + + return szLoadedString; + } +} + +int32 NSResGetSize(NSRESHANDLE handle, const char *library, int32 id) +{ + int status; + RESHANDLE hres; + DBT key, data; + if (handle == NULL) + return 0; + hres = (RESHANDLE) handle; + GenKeyData(library, id, &key); + + RES_LOCK + + status = (*hres->hdb->get)(hres->hdb, &key, &data, 0); + + RES_UNLOCK + + return data.size - sizeof(CHARSETTYPE); +} + +int32 NSResLoadResource(NSRESHANDLE handle, const char *library, int32 id, char *retbuf) +{ + int status; + RESHANDLE hres; + DBT key, data; + if (handle == NULL) + return 0; + hres = (RESHANDLE) handle; + GenKeyData(library, id, &key); + + RES_LOCK + + status = (*hres->hdb->get)(hres->hdb, &key, &data, 0); + + RES_UNLOCK + + if (retbuf) + { + memcpy(retbuf, (char *)data.data + sizeof(CHARSETTYPE), data.size - sizeof(CHARSETTYPE)); + return data.size; + } + else + return 0; +} + +int NSResAddString(NSRESHANDLE handle, const char *library, int32 id, + const char *string, unsigned int charset) +{ + int status; + RESHANDLE hres; + DBT key, data; + char * recdata; + + if (handle == NULL) + return 0; + hres = (RESHANDLE) handle; + + GenKeyData(library, id, &key); + + data.size = sizeof(CHARSETTYPE) + (strlen(string) + 1) ; + + recdata = (char *) malloc(data.size) ; + + /* set charset to the first field of record data */ + *((CHARSETTYPE *)recdata) = (CHARSETTYPE)charset; + + /* set data field */ + memcpy(recdata+sizeof(CHARSETTYPE), string, strlen(string) + 1); + + data.data = recdata; + + RES_LOCK + + status = (*hres->hdb->put)(hres->hdb, &key, &data, 0); + + + if (recdata) + free(recdata); + + RES_UNLOCK + + return status; +} diff --git a/dbm/src/snprintf.c b/dbm/src/snprintf.c new file mode 100644 index 000000000..498778572 --- /dev/null +++ b/dbm/src/snprintf.c @@ -0,0 +1,75 @@ +#ifndef HAVE_SNPRINTF + +#include "watcomfx.h" +#include <sys/types.h> +#include <stddef.h> +#include <stdio.h> + +#ifdef HAVE_SYS_CDEFS_H +#include <sys/cdefs.h> +#else +#include "cdefs.h" +#endif + +#include "prtypes.h" + +#include <ncompat.h> + +/* The OS/2 VAC compiler doesn't appear to define __STDC__ and won't let us define it either */ +#if defined(__STDC__) || defined(XP_OS2_VACPP) +#include <stdarg.h> +#else +#include <varargs.h> +#endif + +int +#if defined(__STDC__) || defined(XP_OS2_VACPP) +snprintf(char *str, size_t n, const char *fmt, ...) +#else +snprintf(str, n, fmt, va_alist) + char *str; + size_t n; + const char *fmt; + va_dcl +#endif +{ + va_list ap; +#ifdef VSPRINTF_CHARSTAR + char *rp; +#else + int rval; +#endif +#if defined(__STDC__) || defined(XP_OS2_VACPP) + va_start(ap, fmt); +#else + va_start(ap); +#endif +#ifdef VSPRINTF_CHARSTAR + rp = vsprintf(str, fmt, ap); + va_end(ap); + return (strlen(rp)); +#else + rval = vsprintf(str, fmt, ap); + va_end(ap); + return (rval); +#endif +} + +int +vsnprintf(str, n, fmt, ap) + char *str; + size_t n; + const char *fmt; + va_list ap; +{ +#ifdef VSPRINTF_CHARSTAR + return (strlen(vsprintf(str, fmt, ap))); +#else + return (vsprintf(str, fmt, ap)); +#endif +} + +#endif /* HAVE_SNPRINTF */ + +/* Some compilers don't like an empty source file. */ +static int dummy = 0; diff --git a/dbm/src/strerror.c b/dbm/src/strerror.c new file mode 100644 index 000000000..d1ae2666a --- /dev/null +++ b/dbm/src/strerror.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1988, 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#include "watcomfx.h" + +#include <string.h> + +#ifdef _DLL +#define sys_nerr (*_sys_nerr_dll) +#endif + +#ifndef HAVE_STRERROR +#ifndef _AFXDLL +char * +strerror(num) + int num; +{ + extern int sys_nerr; + extern char *sys_errlist[]; +#define UPREFIX "Unknown error: " + static char ebuf[40] = UPREFIX; /* 64-bit number + slop */ + register unsigned int errnum; + register char *p, *t; + char tmp[40]; + + errnum = num; /* convert to unsigned */ + if (errnum < sys_nerr) + return(sys_errlist[errnum]); + + /* Do this by hand, so we don't include stdio(3). */ + t = tmp; + do { + *t++ = "0123456789"[errnum % 10]; + } while (errnum /= 10); + for (p = ebuf + sizeof(UPREFIX) - 1;;) { + *p++ = *--t; + if (t <= tmp) + break; + } + return(ebuf); +} + +#endif +#endif /* !HAVE_STRERROR */ diff --git a/dbm/tests/.cvsignore b/dbm/tests/.cvsignore new file mode 100644 index 000000000..a21fbfc35 --- /dev/null +++ b/dbm/tests/.cvsignore @@ -0,0 +1,3 @@ +Makefile +lots +test.db diff --git a/dbm/tests/Makefile.in b/dbm/tests/Makefile.in new file mode 100644 index 000000000..96cbdf8b5 --- /dev/null +++ b/dbm/tests/Makefile.in @@ -0,0 +1,46 @@ +# +# 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.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. +# +# Contributor(s): +# + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = dbm +PROGRAM = lots$(BIN_SUFFIX) + +CSRCS = lots.c + +ifeq ($(OS_ARCH),WINNT) +EXTRA_DSO_LIBS = dbm$(MOZ_BITS) +else +EXTRA_DSO_LIBS = mozdbm_s +endif + +LIBS = $(EXTRA_DSO_LIBS) + +include $(topsrcdir)/config/rules.mk + +ifeq ($(OS_ARCH), Linux) +DEFINES += -D_BSD_SOURCE +endif diff --git a/dbm/tests/lots.c b/dbm/tests/lots.c new file mode 100644 index 000000000..0b3191e74 --- /dev/null +++ b/dbm/tests/lots.c @@ -0,0 +1,639 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * 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.org code. + * + * 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 NPL, 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 NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* use sequental numbers printed to strings + * to store lots and lots of entries in the + * database. + * + * Start with 100 entries, put them and then + * read them out. Then delete the first + * half and verify that all of the first half + * is gone and then verify that the second + * half is still there. + * Then add the first half back and verify + * again. Then delete the middle third + * and verify again. + * Then increase the size by 1000 and do + * the whole add delete thing again. + * + * The data for each object is the number string translated + * to hex and replicated a random number of times. The + * number of times that the data is replicated is the first + * int32 in the data. + */ + +#include <stdio.h> + +#include <stdlib.h> +#ifdef STDC_HEADERS +#include <stdarg.h> +#else +#include <varargs.h> +#endif + +#ifdef HAVE_MEMORY_H +#include <memory.h> +#endif +#include <string.h> +#include <assert.h> +#include "mcom_db.h" + +DB *database=0; +int MsgPriority=5; + +#if defined(_WINDOWS) && !defined(WIN32) +#define int32 long +#define uint32 unsigned long +#else +#define int32 int +#define uint32 unsigned int +#endif + +typedef enum { +USE_LARGE_KEY, +USE_SMALL_KEY +} key_type_enum; + +#define TraceMe(priority, msg) \ + do { \ + if(priority <= MsgPriority) \ + { \ + ReportStatus msg; \ + } \ + } while(0) + +int +ReportStatus(char *string, ...) +{ + va_list args; + +#ifdef STDC_HEADERS + va_start(args, string); +#else + va_start(args); +#endif + vfprintf(stderr, string, args); + va_end(args); + + fprintf (stderr, "\n"); + + return(0); +} + +int +ReportError(char *string, ...) +{ + va_list args; + +#ifdef STDC_HEADERS + va_start(args, string); +#else + va_start(args); +#endif + fprintf (stderr, "\n "); + vfprintf(stderr, string, args); + fprintf (stderr, "\n"); + va_end(args); + + return(0); +} + +DBT * MakeLargeKey(int32 num) +{ + int32 low_bits; + static DBT rv; + static char *string_rv=0; + int rep_char; + size_t size; + + if(string_rv) + free(string_rv); + + /* generate a really large text key derived from + * an int32 + */ + low_bits = (num % 10000) + 1; + + /* get the repeat char from the low 26 */ + rep_char = (char) ((low_bits % 26) + 'a'); + + /* malloc a string low_bits wide */ + size = low_bits*sizeof(char); + string_rv = (char *)malloc(size); + + memset(string_rv, rep_char, size); + + rv.data = string_rv; + rv.size = size; + + return(&rv); +} + +DBT * MakeSmallKey(int32 num) +{ + static DBT rv; + static char data_string[64]; + + rv.data = data_string; + + sprintf(data_string, "%ld", (long)num); + rv.size = strlen(data_string); + + return(&rv); + +} + +DBT * GenKey(int32 num, key_type_enum key_type) +{ + DBT *key; + + switch(key_type) + { + case USE_LARGE_KEY: + key = MakeLargeKey(num); + break; + case USE_SMALL_KEY: + key = MakeSmallKey(num); + break; + default: + abort(); + break; + } + + return(key); +} + +int +SeqDatabase() +{ + int status; + DBT key, data; + + ReportStatus("SEQuencing through database..."); + + /* seq throught the whole database */ + if(!(status = (*database->seq)(database, &key, &data, R_FIRST))) + { + while(!(status = (database->seq) (database, &key, &data, R_NEXT))); + ; /* null body */ + } + + if(status < 0) + ReportError("Error seq'ing database"); + + return(status); +} + +int +VerifyData(DBT *data, int32 num, key_type_enum key_type) +{ + int32 count, compare_num; + size_t size; + int32 *int32_array; + + /* The first int32 is count + * The other n entries should + * all equal num + */ + if(data->size < sizeof(int32)) + { + ReportError("Data size corrupted"); + return -1; + } + + memcpy(&count, data->data, sizeof(int32)); + + size = sizeof(int32)*(count+1); + + if(size != data->size) + { + ReportError("Data size corrupted"); + return -1; + } + + int32_array = (int32*)data->data; + + for(;count > 0; count--) + { + memcpy(&compare_num, &int32_array[count], sizeof(int32)); + + if(compare_num != num) + { + ReportError("Data corrupted"); + return -1; + } + } + + return(0); +} + + +/* verify that a range of number strings exist + * or don't exist. And that the data is valid + */ +#define SHOULD_EXIST 1 +#define SHOULD_NOT_EXIST 0 +int +VerifyRange(int32 low, int32 high, int32 should_exist, key_type_enum key_type) +{ + DBT *key, data; + int32 num; + int status; + + TraceMe(1, ("Verifying: %ld to %ld, using %s keys", + low, high, key_type == USE_SMALL_KEY ? "SMALL" : "LARGE")); + + for(num = low; num <= high; num++) + { + + key = GenKey(num, key_type); + + status = (*database->get)(database, key, &data, 0); + + if(status == 0) + { + /* got the item */ + if(!should_exist) + { + ReportError("Item exists but shouldn't: %ld", num); + } + else + { + /* else verify the data */ + VerifyData(&data, num, key_type); + } + } + else if(status > 0) + { + /* item not found */ + if(should_exist) + { + ReportError("Item not found but should be: %ld", num); + } + } + else + { + /* database error */ + ReportError("Database error"); + return(-1); + } + + } + + TraceMe(1, ("Correctly verified: %ld to %ld", low, high)); + + return(0); + +} + +DBT * +GenData(int32 num) +{ + int32 n; + static DBT *data=0; + int32 *int32_array; + size_t size; + + if(!data) + { + data = (DBT*)malloc(sizeof(DBT)); + data->size = 0; + data->data = 0; + } + else if(data->data) + { + free(data->data); + } + + n = rand(); + + n = n % 512; /* bound to a 2K size */ + + + size = sizeof(int32)*(n+1); + int32_array = (int32 *) malloc(size); + + memcpy(&int32_array[0], &n, sizeof(int32)); + + for(; n > 0; n--) + { + memcpy(&int32_array[n], &num, sizeof(int32)); + } + + data->data = (void*)int32_array; + data->size = size; + + return(data); +} + +#define ADD_RANGE 1 +#define DELETE_RANGE 2 + +int +AddOrDelRange(int32 low, int32 high, int action, key_type_enum key_type) +{ + DBT *key, *data; +#if 0 /* only do this if your really analy checking the puts */ + DBT tmp_data; +#endif + int32 num; + int status; + + if(action != ADD_RANGE && action != DELETE_RANGE) + assert(0); + + if(action == ADD_RANGE) + { + TraceMe(1, ("Adding: %ld to %ld: %s keys", low, high, + key_type == USE_SMALL_KEY ? "SMALL" : "LARGE")); + } + else + { + TraceMe(1, ("Deleting: %ld to %ld: %s keys", low, high, + key_type == USE_SMALL_KEY ? "SMALL" : "LARGE")); + } + + for(num = low; num <= high; num++) + { + + key = GenKey(num, key_type); + + if(action == ADD_RANGE) + { + data = GenData(num); + status = (*database->put)(database, key, data, 0); + } + else + { + status = (*database->del)(database, key, 0); + } + + if(status < 0) + { + ReportError("Database error %s item: %ld", + action == ADD_RANGE ? "ADDING" : "DELETING", + num); + } + else if(status > 0) + { + ReportError("Could not %s item: %ld", + action == ADD_RANGE ? "ADD" : "DELETE", + num); + } + else if(action == ADD_RANGE) + { +#define SYNC_EVERY_TIME +#ifdef SYNC_EVERY_TIME + status = (*database->sync)(database, 0); + if(status != 0) + ReportError("Database error syncing after add"); +#endif + +#if 0 /* only do this if your really analy checking the puts */ + + /* make sure we can still get it + */ + status = (*database->get)(database, key, &tmp_data, 0); + + if(status != 0) + { + ReportError("Database error checking item just added: %d", + num); + } + else + { + /* now verify that none of the ones we already + * put in have disappeared + */ + VerifyRange(low, num, SHOULD_EXIST, key_type); + } +#endif + + } + } + + + if(action == ADD_RANGE) + { + TraceMe(1, ("Successfully added: %ld to %ld", low, high)); + } + else + { + TraceMe(1, ("Successfully deleted: %ld to %ld", low, high)); + } + + return(0); +} + +int +TestRange(int32 low, int32 range, key_type_enum key_type) +{ + int status; int32 low_of_range1, high_of_range1; int32 low_of_range2, high_of_range2; + int32 low_of_range3, high_of_range3; + + status = AddOrDelRange(low, low+range, ADD_RANGE, key_type); + status = VerifyRange(low, low+range, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 1")); + + SeqDatabase(); + + low_of_range1 = low; + high_of_range1 = low+(range/2); + low_of_range2 = high_of_range1+1; + high_of_range2 = low+range; + status = AddOrDelRange(low_of_range1, high_of_range1, DELETE_RANGE, key_type); + status = VerifyRange(low_of_range1, high_of_range1, SHOULD_NOT_EXIST, key_type); + status = VerifyRange(low_of_range2, low_of_range2, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 2")); + + SeqDatabase(); + + status = AddOrDelRange(low_of_range1, high_of_range1, ADD_RANGE, key_type); + /* the whole thing should exist now */ + status = VerifyRange(low, low+range, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 3")); + + SeqDatabase(); + + status = AddOrDelRange(low_of_range2, high_of_range2, DELETE_RANGE, key_type); + status = VerifyRange(low_of_range1, high_of_range1, SHOULD_EXIST, key_type); + status = VerifyRange(low_of_range2, high_of_range2, SHOULD_NOT_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 4")); + + SeqDatabase(); + + status = AddOrDelRange(low_of_range2, high_of_range2, ADD_RANGE, key_type); + /* the whole thing should exist now */ + status = VerifyRange(low, low+range, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 5")); + + SeqDatabase(); + + low_of_range1 = low; + high_of_range1 = low+(range/3); + low_of_range2 = high_of_range1+1; + high_of_range2 = high_of_range1+(range/3); + low_of_range3 = high_of_range2+1; + high_of_range3 = low+range; + /* delete range 2 */ + status = AddOrDelRange(low_of_range2, high_of_range2, DELETE_RANGE, key_type); + status = VerifyRange(low_of_range1, high_of_range1, SHOULD_EXIST, key_type); + status = VerifyRange(low_of_range2, low_of_range2, SHOULD_NOT_EXIST, key_type); + status = VerifyRange(low_of_range3, low_of_range2, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 6")); + + SeqDatabase(); + + status = AddOrDelRange(low_of_range2, high_of_range2, ADD_RANGE, key_type); + /* the whole thing should exist now */ + status = VerifyRange(low, low+range, SHOULD_EXIST, key_type); + + TraceMe(1, ("Finished with sub test 7")); + + return(0); +} + +#define START_RANGE 109876 +int +main(int argc, char **argv) +{ + int32 i, j=0; + int quick_exit = 0; + int large_keys = 0; + HASHINFO hash_info = { + 16*1024, + 0, + 0, + 0, + 0, + 0}; + + + if(argc > 1) + { + while(argc > 1) + { + if(!strcmp(argv[argc-1], "-quick")) + quick_exit = 1; + else if(!strcmp(argv[argc-1], "-large")) + { + large_keys = 1; + } + argc--; + } + } + + database = dbopen("test.db", O_RDWR | O_CREAT, 0644, DB_HASH, &hash_info); + + if(!database) + { + ReportError("Could not open database"); +#ifdef unix + perror(""); +#endif + exit(1); + } + + if(quick_exit) + { + if(large_keys) + TestRange(START_RANGE, 200, USE_LARGE_KEY); + else + TestRange(START_RANGE, 200, USE_SMALL_KEY); + + (*database->sync)(database, 0); + (*database->close)(database); + exit(0); + } + + for(i=100; i < 10000000; i+=200) + { + if(1 || j) + { + TestRange(START_RANGE, i, USE_LARGE_KEY); + j = 0; + } + else + { + TestRange(START_RANGE, i, USE_SMALL_KEY); + j = 1; + } + + if(1 == rand() % 3) + { + (*database->sync)(database, 0); + } + + if(1 == rand() % 3) + { + /* close and reopen */ + (*database->close)(database); + database = dbopen("test.db", O_RDWR | O_CREAT, 0644, DB_HASH, 0); + if(!database) + { + ReportError("Could not reopen database"); +#ifdef unix + perror(""); +#endif + exit(1); + } + } + else + { + /* reopen database without closeing the other */ + database = dbopen("test.db", O_RDWR | O_CREAT, 0644, DB_HASH, 0); + if(!database) + { + ReportError("Could not reopen database " + "after not closing the other"); +#ifdef unix + perror(""); +#endif + exit(1); + } + } + } + + return(0); +} diff --git a/security/coreconf/prefix.mk b/security/coreconf/prefix.mk index fd34edbd7..bda9dfe27 100644 --- a/security/coreconf/prefix.mk +++ b/security/coreconf/prefix.mk @@ -48,7 +48,7 @@ endif # ifndef LIB_PREFIX - ifeq ($(OS_ARCH), WINNT) + ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET))) LIB_PREFIX = else LIB_PREFIX = lib @@ -57,7 +57,7 @@ endif ifndef DLL_PREFIX - ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH))) + ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET))) DLL_PREFIX = else DLL_PREFIX = lib diff --git a/security/coreconf/ruleset.mk b/security/coreconf/ruleset.mk index 7ee92ab81..8882c21ff 100644 --- a/security/coreconf/ruleset.mk +++ b/security/coreconf/ruleset.mk @@ -146,23 +146,17 @@ endif # ifdef LIBRARY_NAME - ifeq ($(OS_ARCH), WINNT) - LIBRARY = $(OBJDIR)/$(LIBRARY_NAME).lib + LIBRARY = $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX) + SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX) + ifeq (,$(filter-out WIN%,$(OS_TARGET))) SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib - else - ifeq ($(OS_ARCH), OS2) - LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME).lib - SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).dll - IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).lib - else - LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME).$(LIB_SUFFIX) - ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1) - SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr$(JDK_DEBUG_SUFFIX).a - else - SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX) - endif - endif + endif + ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1) + SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr$(JDK_DEBUG_SUFFIX).a + endif + ifeq ($(OS_TARGET), OS2) + IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).lib endif endif diff --git a/security/dbm/Makefile b/security/dbm/Makefile new file mode 100644 index 000000000..34cd6d899 --- /dev/null +++ b/security/dbm/Makefile @@ -0,0 +1,80 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + + + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + +coreconf_hack: + cd ../coreconf; gmake + gmake import + +RelEng_bld: coreconf_hack + gmake diff --git a/security/dbm/config/config.mk b/security/dbm/config/config.mk new file mode 100644 index 000000000..94fc55a0b --- /dev/null +++ b/security/dbm/config/config.mk @@ -0,0 +1,67 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# These macros are defined by mozilla's configure script. +# We define them manually here. +# + +DEFINES += -DSTDC_HEADERS -DHAVE_STRERROR + +# +# Most platforms have snprintf, so it's simpler to list the exceptions. +# +HAVE_SNPRINTF = 1 +# +# OSF1 V4.0D doesn't have snprintf but V5.0A does. +# +ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0D) +HAVE_SNPRINTF = +endif +ifdef HAVE_SNPRINTF +DEFINES += -DHAVE_SNPRINTF +endif + +ifeq (,$(filter-out IRIX Linux,$(OS_ARCH))) +DEFINES += -DHAVE_SYS_CDEFS_H +endif + +ifeq (,$(filter-out DGUX NCR ReliantUNIX SCO_SV SCOOS UNIXWARE,$(OS_ARCH))) +DEFINES += -DHAVE_SYS_BYTEORDER_H +endif + +# +# None of the platforms that we are interested in need to +# define HAVE_MEMORY_H. +# diff --git a/security/dbm/include/Makefile b/security/dbm/include/Makefile new file mode 100644 index 000000000..ba4dd8ddf --- /dev/null +++ b/security/dbm/include/Makefile @@ -0,0 +1,76 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + + + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + + diff --git a/security/dbm/include/manifest.mn b/security/dbm/include/manifest.mn new file mode 100644 index 000000000..886fedd98 --- /dev/null +++ b/security/dbm/include/manifest.mn @@ -0,0 +1,57 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +CORE_DEPTH = ../.. + +VPATH = $(CORE_DEPTH)/../dbm/include + +MODULE = dbm + +EXPORTS = nsres.h \ + cdefs.h \ + mcom_db.h \ + ncompat.h \ + winfile.h \ + $(NULL) + +PRIVATE_EXPORTS = hsearch.h \ + page.h \ + extern.h \ + ndbm.h \ + queue.h \ + hash.h \ + mpool.h \ + search.h \ + $(NULL) + diff --git a/security/dbm/manifest.mn b/security/dbm/manifest.mn new file mode 100644 index 000000000..11f4f4237 --- /dev/null +++ b/security/dbm/manifest.mn @@ -0,0 +1,45 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +CORE_DEPTH = .. + +MODULE = dbm + +IMPORTS = nspr20/v4.1.2 + +RELEASE = dbm + +DIRS = include \ + src \ + $(NULL) diff --git a/security/dbm/src/Makefile b/security/dbm/src/Makefile new file mode 100644 index 000000000..8fce98394 --- /dev/null +++ b/security/dbm/src/Makefile @@ -0,0 +1,76 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/dbm/config/config.mk + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include config.mk + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + + diff --git a/security/dbm/src/config.mk b/security/dbm/src/config.mk new file mode 100644 index 000000000..32baf1737 --- /dev/null +++ b/security/dbm/src/config.mk @@ -0,0 +1,65 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) + +INCLUDES += -I$(CORE_DEPTH)/../dbm/include + +# +# Currently, override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PURE_LIBRARY = +PROGRAM = + +ifdef SHARED_LIBRARY + ifeq ($(OS_ARCH),WINNT) + ifneq ($(OS_TARGET),WIN16) + DLLBASE=/BASE:0x30000000 + RES=$(OBJDIR)/dbm.res + RESNAME=../include/dbm.rc + endif + endif + ifeq ($(DLL_SUFFIX),dll) + DEFINES += -D_DLL + endif +endif + +ifeq ($(OS_ARCH),AIX) + OS_LIBS += -lc_r +endif diff --git a/security/dbm/src/dirent.c b/security/dbm/src/dirent.c new file mode 100644 index 000000000..001a48c5c --- /dev/null +++ b/security/dbm/src/dirent.c @@ -0,0 +1,348 @@ +#ifdef OS2 + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> + +#include <dirent.h> +#include <errno.h> + +/*#ifndef __EMX__ +#include <libx.h> +#endif */ + +#define INCL_DOSFILEMGR +#define INCL_DOSERRORS +#include <os2.h> + +#if OS2 >= 2 +# define FFBUF FILEFINDBUF3 +# define Word ULONG + /* + * LS20 recommends a request count of 100, but according to the + * APAR text it does not lead to missing files, just to funny + * numbers of returned entries. + * + * LS30 HPFS386 requires a count greater than 2, or some files + * are missing (those starting with a character less that '.'). + * + * Novell looses entries which overflow the buffer. In previous + * versions of dirent2, this could have lead to missing files + * when the average length of 100 directory entries was 40 bytes + * or more (quite unlikely for files on a Novell server). + * + * Conclusion: Make sure that the entries all fit into the buffer + * and that the buffer is large enough for more than 2 entries + * (each entry is at most 300 bytes long). And ignore the LS20 + * effect. + */ +# define Count 25 +# define BufSz (25 * (sizeof(FILEFINDBUF3)+1)) +#else +# define FFBUF FILEFINDBUF +# define Word USHORT +# define BufSz 1024 +# define Count 3 +#endif + +#if defined(__IBMC__) || defined(__IBMCPP__) + #define error(rc) _doserrno = rc, errno = EOS2ERR +#elif defined(MICROSOFT) + #define error(rc) _doserrno = rc, errno = 255 +#else + #define error(rc) errno = 255 +#endif + +struct _dirdescr { + HDIR handle; /* DosFindFirst handle */ + char fstype; /* filesystem type */ + Word count; /* valid entries in <ffbuf> */ + long number; /* absolute number of next entry */ + int index; /* relative number of next entry */ + FFBUF * next; /* pointer to next entry */ + char name[MAXPATHLEN+3]; /* directory name */ + unsigned attrmask; /* attribute mask for seekdir */ + struct dirent entry; /* buffer for directory entry */ + BYTE ffbuf[BufSz]; +}; + +/* + * Return first char of filesystem type, or 0 if unknown. + */ +static char +getFSType(const char *path) +{ + static char cache[1+26]; + char drive[3], info[512]; + Word unit, infolen; + char r; + + if (isalpha(path[0]) && path[1] == ':') { + unit = toupper(path[0]) - '@'; + path += 2; + } else { + ULONG driveMap; +#if OS2 >= 2 + if (DosQueryCurrentDisk(&unit, &driveMap)) +#else + if (DosQCurDisk(&unit, &driveMap)) +#endif + return 0; + } + + if ((path[0] == '\\' || path[0] == '/') + && (path[1] == '\\' || path[1] == '/')) + return 0; + + if (cache [unit]) + return cache [unit]; + + drive[0] = '@' + unit; + drive[1] = ':'; + drive[2] = '\0'; + infolen = sizeof info; +#if OS2 >= 2 + if (DosQueryFSAttach(drive, 0, FSAIL_QUERYNAME, (PVOID)info, &infolen)) + return 0; + if (infolen >= sizeof(FSQBUFFER2)) { + FSQBUFFER2 *p = (FSQBUFFER2 *)info; + r = p->szFSDName[p->cbName]; + } else +#else + if (DosQFSAttach((PSZ)drive, 0, FSAIL_QUERYNAME, (PVOID)info, &infolen, 0)) + return 0; + if (infolen >= 9) { + char *p = info + sizeof(USHORT); + p += sizeof(USHORT) + *(USHORT *)p + 1 + sizeof(USHORT); + r = *p; + } else +#endif + r = 0; + return cache [unit] = r; +} + +char * +abs_path(const char *name, char *buffer, int len) +{ + char buf[4]; + if (isalpha(name[0]) && name[1] == ':' && name[2] == '\0') { + buf[0] = name[0]; + buf[1] = name[1]; + buf[2] = '.'; + buf[3] = '\0'; + name = buf; + } +#if OS2 >= 2 + if (DosQueryPathInfo((PSZ)name, FIL_QUERYFULLNAME, buffer, len)) +#else + if (DosQPathInfo((PSZ)name, FIL_QUERYFULLNAME, (PBYTE)buffer, len, 0L)) +#endif + return NULL; + return buffer; +} + +DIR * +openxdir(const char *path, unsigned att_mask) +{ + DIR *dir; + char name[MAXPATHLEN+3]; + Word rc; + + dir = malloc(sizeof(DIR)); + if (dir == NULL) { + errno = ENOMEM; + return NULL; + } + + strncpy(name, path, MAXPATHLEN); + name[MAXPATHLEN] = '\0'; + switch (name[strlen(name)-1]) { + default: + strcat(name, "\\"); + case '\\': + case '/': + case ':': + ; + } + strcat(name, "."); + if (!abs_path(name, dir->name, MAXPATHLEN+1)) + strcpy(dir->name, name); + if (dir->name[strlen(dir->name)-1] == '\\') + strcat(dir->name, "*"); + else + strcat(dir->name, "\\*"); + + dir->fstype = getFSType(dir->name); + dir->attrmask = att_mask | A_DIR; + + dir->handle = HDIR_CREATE; + dir->count = 100; +#if OS2 >= 2 + rc = DosFindFirst(dir->name, &dir->handle, dir->attrmask, + dir->ffbuf, sizeof dir->ffbuf, &dir->count, FIL_STANDARD); +#else + rc = DosFindFirst((PSZ)dir->name, &dir->handle, dir->attrmask, + (PFILEFINDBUF)dir->ffbuf, sizeof dir->ffbuf, &dir->count, 0); +#endif + switch (rc) { + default: + free(dir); + error(rc); + return NULL; + case NO_ERROR: + case ERROR_NO_MORE_FILES: + ; + } + + dir->number = 0; + dir->index = 0; + dir->next = (FFBUF *)dir->ffbuf; + + return (DIR *)dir; +} + +DIR * +opendir(const char *pathname) +{ + return openxdir(pathname, 0); +} + +struct dirent * +readdir(DIR *dir) +{ + static int dummy_ino = 2; + + if (dir->index == dir->count) { + Word rc; + dir->count = 100; +#if OS2 >= 2 + rc = DosFindNext(dir->handle, dir->ffbuf, + sizeof dir->ffbuf, &dir->count); +#else + rc = DosFindNext(dir->handle, (PFILEFINDBUF)dir->ffbuf, + sizeof dir->ffbuf, &dir->count); +#endif + if (rc) { + error(rc); + return NULL; + } + + dir->index = 0; + dir->next = (FFBUF *)dir->ffbuf; + } + + if (dir->index == dir->count) + return NULL; + + memcpy(dir->entry.d_name, dir->next->achName, dir->next->cchName); + dir->entry.d_name[dir->next->cchName] = '\0'; + dir->entry.d_ino = dummy_ino++; + dir->entry.d_reclen = dir->next->cchName; + dir->entry.d_namlen = dir->next->cchName; + dir->entry.d_size = dir->next->cbFile; + dir->entry.d_attribute = dir->next->attrFile; + dir->entry.d_time = *(USHORT *)&dir->next->ftimeLastWrite; + dir->entry.d_date = *(USHORT *)&dir->next->fdateLastWrite; + + switch (dir->fstype) { + case 'F': /* FAT */ + case 'C': /* CDFS */ + if (dir->next->attrFile & FILE_DIRECTORY) + strupr(dir->entry.d_name); + else + strlwr(dir->entry.d_name); + } + +#if OS2 >= 2 + dir->next = (FFBUF *)((BYTE *)dir->next + dir->next->oNextEntryOffset); +#else + dir->next = (FFBUF *)((BYTE *)dir->next->achName + dir->next->cchName + 1); +#endif + ++dir->number; + ++dir->index; + + return &dir->entry; +} + +long +telldir(DIR *dir) +{ + return dir->number; +} + +void +seekdir(DIR *dir, long off) +{ + if (dir->number > off) { + char name[MAXPATHLEN+2]; + Word rc; + + DosFindClose(dir->handle); + + strcpy(name, dir->name); + strcat(name, "*"); + + dir->handle = HDIR_CREATE; + dir->count = 32767; +#if OS2 >= 2 + rc = DosFindFirst(name, &dir->handle, dir->attrmask, + dir->ffbuf, sizeof dir->ffbuf, &dir->count, FIL_STANDARD); +#else + rc = DosFindFirst((PSZ)name, &dir->handle, dir->attrmask, + (PFILEFINDBUF)dir->ffbuf, sizeof dir->ffbuf, &dir->count, 0); +#endif + switch (rc) { + default: + error(rc); + return; + case NO_ERROR: + case ERROR_NO_MORE_FILES: + ; + } + + dir->number = 0; + dir->index = 0; + dir->next = (FFBUF *)dir->ffbuf; + } + + while (dir->number < off && readdir(dir)) + ; +} + +void +closedir(DIR *dir) +{ + DosFindClose(dir->handle); + free(dir); +} + +/*****************************************************************************/ + +#ifdef TEST + +main(int argc, char **argv) +{ + int i; + DIR *dir; + struct dirent *ep; + + for (i = 1; i < argc; ++i) { + dir = opendir(argv[i]); + if (!dir) + continue; + while (ep = readdir(dir)) + if (strchr("\\/:", argv[i] [strlen(argv[i]) - 1])) + printf("%s%s\n", argv[i], ep->d_name); + else + printf("%s/%s\n", argv[i], ep->d_name); + closedir(dir); + } + + return 0; +} + +#endif + +#endif /* OS2 */ + diff --git a/security/dbm/src/dirent.h b/security/dbm/src/dirent.h new file mode 100644 index 000000000..07a6c0ac8 --- /dev/null +++ b/security/dbm/src/dirent.h @@ -0,0 +1,97 @@ +#ifndef __DIRENT_H__ +#define __DIRENT_H__ +/* + * @(#)msd_dir.h 1.4 87/11/06 Public Domain. + * + * A public domain implementation of BSD directory routines for + * MS-DOS. Written by Michael Rendell ({uunet,utai}michael@garfield), + * August 1897 + * + * Extended by Peter Lim (lim@mullian.oz) to overcome some MS DOS quirks + * and returns 2 more pieces of information - file size & attribute. + * Plus a little reshuffling of some #define's positions December 1987 + * + * Some modifications by Martin Junius 02-14-89 + * + * AK900712 + * AK910410 abs_path - make absolute path + * + */ + +#ifdef __EMX__ +#include <sys/param.h> +#else +#if defined(__IBMC__) || defined(__IBMCPP__) || defined(XP_W32_MSVC) +#include <stdio.h> +#ifdef MAXPATHLEN + #undef MAXPATHLEN +#endif +#define MAXPATHLEN (FILENAME_MAX*4) +#define MAXNAMLEN FILENAME_MAX + +#else +#include <param.h> +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* attribute stuff */ +#ifndef A_RONLY +# define A_RONLY 0x01 +# define A_HIDDEN 0x02 +# define A_SYSTEM 0x04 +# define A_LABEL 0x08 +# define A_DIR 0x10 +# define A_ARCHIVE 0x20 +#endif + +struct dirent { +#if defined(OS2) || defined(WIN32) /* use the layout of EMX to avoid trouble */ + int d_ino; /* Dummy */ + int d_reclen; /* Dummy, same as d_namlen */ + int d_namlen; /* length of name */ + char d_name[MAXNAMLEN + 1]; + unsigned long d_size; + unsigned short d_attribute; /* attributes (see above) */ + unsigned short d_time; /* modification time */ + unsigned short d_date; /* modification date */ +#else + char d_name[MAXNAMLEN + 1]; /* garentee null termination */ + char d_attribute; /* .. extension .. */ + unsigned long d_size; /* .. extension .. */ +#endif +}; + +typedef struct _dirdescr DIR; +/* the structs do not have to be defined here */ + +extern DIR *opendir(const char *); +extern DIR *openxdir(const char *, unsigned); +extern struct dirent *readdir(DIR *); +extern void seekdir(DIR *, long); +extern long telldir(DIR *); +extern void closedir(DIR *); +#define rewinddir(dirp) seekdir(dirp, 0L) + +extern char * abs_path(const char *name, char *buffer, int len); + +#ifndef S_IFMT +#define S_IFMT ( S_IFDIR | S_IFREG ) +#endif + +#ifndef S_ISDIR +#define S_ISDIR( m ) (((m) & S_IFMT) == S_IFDIR) +#endif + +#ifndef S_ISREG +#define S_ISREG( m ) (((m) & S_IFMT) == S_IFREG) +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/security/dbm/src/manifest.mn b/security/dbm/src/manifest.mn new file mode 100644 index 000000000..80f2abfd0 --- /dev/null +++ b/security/dbm/src/manifest.mn @@ -0,0 +1,61 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +CORE_DEPTH = ../.. + +VPATH = $(CORE_DEPTH)/../dbm/src + +MODULE = dbm + +# +# memmove.c, snprintf.c, and strerror.c are not in CSRCS because +# the Standard C Library has memmove and strerror and DBM is not +# using snprintf. +# + +CSRCS = db.c \ + h_bigkey.c \ + h_func.c \ + h_log2.c \ + h_page.c \ + hash.c \ + hash_buf.c \ + hsearch.c \ + mktemp.c \ + ndbm.c \ + nsres.c \ + dirent.c \ + $(NULL) + +LIBRARY_NAME = dbm diff --git a/security/dbm/tests/Makefile b/security/dbm/tests/Makefile new file mode 100644 index 000000000..5e0f96eb5 --- /dev/null +++ b/security/dbm/tests/Makefile @@ -0,0 +1,69 @@ +#! gmake +# +# 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 Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +DEPTH = ../.. +CORE_DEPTH = ../.. + +VPATH = $(CORE_DEPTH)/../dbm/tests + +MODULE = dbm + +CSRCS = lots.c + +PROGRAM = lots + +include $(DEPTH)/coreconf/config.mk + +include $(DEPTH)/dbm/config/config.mk + +ifeq ($(OS_ARCH),WINNT) +LIBDBM = ../src/$(PLATFORM)/dbm$(STATIC_LIB_SUFFIX) +else +LIBDBM = ../src/$(PLATFORM)/libdbm$(STATIC_LIB_SUFFIX) +endif + +INCLUDES += -I$(CORE_DEPTH)/../dbm/include + +LDFLAGS = $(LDOPTS) $(LIBDBM) + +include $(DEPTH)/coreconf/rules.mk + +lots.pure: lots + purify $(CC) -o lots.pure $(CFLAGS) $(OBJS) $(MYLIBS) + +crash: crash.o $(MYLIBS) + $(CC) -o crash $(CFLAGS) $^ + +crash.pure: crash.o $(MYLIBS) + purify $(CC) -o crash.pure $(CFLAGS) $^ + diff --git a/security/nss/cmd/certutil/certutil.c b/security/nss/cmd/certutil/certutil.c index ffbfe8e2f..af18eb80e 100644 --- a/security/nss/cmd/certutil/certutil.c +++ b/security/nss/cmd/certutil/certutil.c @@ -1112,6 +1112,7 @@ Usage(char *progName) FPS "\t%s -L [-n cert-name] [-X] [-d certdir] [-P dbprefix] [-r] [-a]\n", progName); FPS "\t%s -M -n cert-name -t trustargs [-d certdir] [-P dbprefix]\n", progName); + FPS "\t%s -O -n cert-name [-X] [-d certdir] [-P dbprefix]\n", progName); FPS "\t%s -R -s subj -o cert-request-file [-d certdir] [-P dbprefix] [-p phone] [-a]\n" "\t\t [-k key-type] [-h token-name] [-f pwfile] [-g key-size]\n", progName); @@ -1301,6 +1302,19 @@ static void LongUsage(char *progName) " -h token-name"); FPS "\n"); + FPS "\n"); + FPS "%-15s Print the chain of a certificate\n", + "-O"); + FPS "%-20s The nickname of the cert to modify\n", + " -n cert-name"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s force the database to open R/W\n", + " -X"); + FPS "\n"); + FPS "%-15s Generate a certificate request (stdout)\n", "-R"); FPS "%-20s Specify the subject name (using RFC1485)\n", @@ -2239,7 +2253,7 @@ static secuCommandFlag certutil_commands[] = { /* cmd_ListCerts */ 'L', PR_FALSE, 0, PR_FALSE }, { /* cmd_ModifyCertTrust */ 'M', PR_FALSE, 0, PR_FALSE }, { /* cmd_NewDBs */ 'N', PR_FALSE, 0, PR_FALSE }, - { /* cmd_DumpChain */ 'P', PR_FALSE, 0, PR_FALSE }, + { /* cmd_DumpChain */ 'O', PR_FALSE, 0, PR_FALSE }, { /* cmd_CertReq */ 'R', PR_FALSE, 0, PR_FALSE }, { /* cmd_CreateAndAddCert */ 'S', PR_FALSE, 0, PR_FALSE }, { /* cmd_TokenReset */ 'T', PR_FALSE, 0, PR_FALSE }, diff --git a/security/nss/cmd/lib/secutil.c b/security/nss/cmd/lib/secutil.c index d8d93b2f3..186f32b8b 100644 --- a/security/nss/cmd/lib/secutil.c +++ b/security/nss/cmd/lib/secutil.c @@ -97,7 +97,7 @@ SECU_PrintError(char *progName, char *msg, ...) if (errString != NULL && PORT_Strlen(errString) > 0) fprintf(stderr, ": %s\n", errString); else - fprintf(stderr, "\n"); + fprintf(stderr, ": error %d\n", (int)err); va_end(args); } diff --git a/security/nss/cmd/platlibs.mk b/security/nss/cmd/platlibs.mk index f6ebce08d..4a598b8c5 100644 --- a/security/nss/cmd/platlibs.mk +++ b/security/nss/cmd/platlibs.mk @@ -82,39 +82,39 @@ OS_LIBS += \ else # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) -CRYPTOLIB=$(DIST)/lib/libfreebl.$(LIB_SUFFIX) +CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) ifdef MOZILLA_SECURITY_BUILD - CRYPTOLIB=$(DIST)/lib/libcrypto.$(LIB_SUFFIX) + CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)crypto.$(LIB_SUFFIX) endif ifdef MOZILLA_BSAFE_BUILD - CRYPTOLIB+=$(DIST)/lib/libbsafe.$(LIB_SUFFIX) - CRYPTOLIB+=$(DIST)/lib/libfreebl.$(LIB_SUFFIX) + CRYPTOLIB+=$(DIST)/lib/$(LIB_PREFIX)bsafe.$(LIB_SUFFIX) + CRYPTOLIB+=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) endif EXTRA_LIBS += \ - $(DIST)/lib/libsmime.$(LIB_SUFFIX) \ - $(DIST)/lib/libssl.$(LIB_SUFFIX) \ - $(DIST)/lib/libjar.$(LIB_SUFFIX) \ - $(DIST)/lib/libzlib.$(LIB_SUFFIX) \ - $(DIST)/lib/libnss.$(LIB_SUFFIX) \ - $(DIST)/lib/libssl.$(LIB_SUFFIX) \ - $(DIST)/lib/libsectool.$(LIB_SUFFIX) \ - $(DIST)/lib/libpkcs12.$(LIB_SUFFIX) \ - $(DIST)/lib/libpkcs7.$(LIB_SUFFIX) \ - $(DIST)/lib/libcerthi.$(LIB_SUFFIX) \ - $(DIST)/lib/libpk11wrap.$(LIB_SUFFIX) \ - $(DIST)/lib/libcryptohi.$(LIB_SUFFIX) \ - $(DIST)/lib/libcerthi.$(LIB_SUFFIX) \ - $(DIST)/lib/libnsspki.$(LIB_SUFFIX) \ - $(DIST)/lib/libpk11wrap.$(LIB_SUFFIX) \ - $(DIST)/lib/libsoftokn.$(LIB_SUFFIX) \ - $(DIST)/lib/libcertdb.$(LIB_SUFFIX) \ - $(DIST)/lib/libnsspki.$(LIB_SUFFIX) \ - $(DIST)/lib/libnssdev.$(LIB_SUFFIX) \ - $(DIST)/lib/libnssb.$(LIB_SUFFIX) \ - $(DIST)/lib/libswfci.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)smime.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)zlib.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)pkcs12.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)pkcs7.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)swfci.$(LIB_SUFFIX) \ $(CRYPTOLIB) \ - $(DIST)/lib/libsecutil.$(LIB_SUFFIX) \ - $(DIST)/lib/libdbm.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \ $(NULL) ifeq ($(OS_ARCH), AIX) @@ -163,18 +163,23 @@ else # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) EXTRA_LIBS += \ - $(DIST)/lib/libsectool.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ $(NULL) ifeq ($(OS_ARCH), AIX) EXTRA_SHARED_LIBS += -brtl endif +# On Linux we must use the -rpath-link option to tell the linker +# where to find libsoftokn3.so, an implicit dependency of libnss3.so. +ifeq ($(OS_ARCH), Linux) +EXTRA_SHARED_LIBS += -Wl,-rpath-link,$(DIST)/lib +endif + # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. EXTRA_SHARED_LIBS += \ -L$(DIST)/lib/ \ - -lsoftokn3 \ -lssl3 \ -lsmime3 \ -lnss3 \ diff --git a/security/nss/cmd/selfserv/selfserv.c b/security/nss/cmd/selfserv/selfserv.c index 0967b44be..7d58d94bc 100644 --- a/security/nss/cmd/selfserv/selfserv.c +++ b/security/nss/cmd/selfserv/selfserv.c @@ -1380,7 +1380,7 @@ WaitForDebugger(void) static void sigterm_handler(int signum) { static char err_msg[] = "selfserv: received SIGTERM\n"; - write(2, err_msg, sizeof(err_msg) - 1); + write(1, err_msg, sizeof(err_msg) - 1); _exit(1); } #endif /* LINUX */ diff --git a/security/nss/lib/base/hashops.c b/security/nss/lib/base/hashops.c index 1628f3797..074e0d93a 100644 --- a/security/nss/lib/base/hashops.c +++ b/security/nss/lib/base/hashops.c @@ -82,7 +82,7 @@ nss_arena_hash_alloc_entry const void *key ) { - NSSArena *arena = (NSSArena *)pool; + NSSArena *arena = NULL; #ifdef NSSDEBUG if( (void *)NULL != arena ) { diff --git a/security/nss/lib/base/list.c b/security/nss/lib/base/list.c index dd071470b..89aadf283 100644 --- a/security/nss/lib/base/list.c +++ b/security/nss/lib/base/list.c @@ -205,6 +205,9 @@ static PRStatus nsslist_add_element(nssList *list, void *data) { nssListElement *node = nss_ZNEW(list->arena, nssListElement); + if (!node) { + return PR_FAILURE; + } PR_INIT_CLIST(&node->link); node->data = data; if (list->head) { @@ -327,7 +330,7 @@ nssList_Clone(nssList *list) { nssList *rvList; nssListElement *node; - rvList = nssList_Create(list->arena, (list->lock != NULL)); + rvList = nssList_Create(NULL, (list->lock != NULL)); if (!rvList) { return NULL; } @@ -350,11 +353,22 @@ NSS_IMPLEMENT nssListIterator * nssList_CreateIterator(nssList *list) { nssListIterator *rvIterator; - rvIterator = nss_ZNEW(list->arena, nssListIterator); + rvIterator = nss_ZNEW(NULL, nssListIterator); + if (!rvIterator) { + return NULL; + } rvIterator->list = nssList_Clone(list); + if (!rvIterator->list) { + nss_ZFreeIf(rvIterator); + return NULL; + } rvIterator->current = rvIterator->list->head; if (list->lock) { rvIterator->lock = PZ_NewLock(nssILockOther); + if (!rvIterator->lock) { + nssList_Destroy(rvIterator->list); + nss_ZFreeIf(rvIterator); + } } return rvIterator; } diff --git a/security/nss/lib/certdb/certdb.c b/security/nss/lib/certdb/certdb.c index d77e9db04..2068f81e1 100644 --- a/security/nss/lib/certdb/certdb.c +++ b/security/nss/lib/certdb/certdb.c @@ -1600,7 +1600,8 @@ CERT_IsCACert(CERTCertificate *cert, unsigned int *rettype) ret = PR_FALSE; type = 0; - if ( cert->trust ) { + if ( cert->trust && (cert->trust->sslFlags|cert->trust->emailFlags| + cert->trust->objectSigningFlags)) { trust = cert->trust; if ( ( ( trust->sslFlags & CERTDB_VALID_CA ) == CERTDB_VALID_CA ) || ( ( trust->sslFlags & CERTDB_TRUSTED_CA ) == CERTDB_TRUSTED_CA ) ) { diff --git a/security/nss/lib/certdb/stanpcertdb.c b/security/nss/lib/certdb/stanpcertdb.c index d1069599a..1cf111a47 100644 --- a/security/nss/lib/certdb/stanpcertdb.c +++ b/security/nss/lib/certdb/stanpcertdb.c @@ -180,12 +180,18 @@ __CERT_NewTempCertificate(CERTCertDBHandle *handle, SECItem *derCert, NSSCryptoContext *context; NSSArena *arena; CERTCertificate *cc; + NSSCryptoContext *gCC = STAN_GetDefaultCryptoContext(); if (!isperm) { - /* Look for a perm cert first */ NSSDER encoding; NSSITEM_FROM_SECITEM(&encoding, derCert); - c = NSSTrustDomain_FindCertificateByEncodedCertificate(handle, + /* First, see if it is already a temp cert */ + c = NSSCryptoContext_FindCertificateByEncodedCertificate(gCC, &encoding); + if (!c) { + /* Then, see if it is already a perm cert */ + c = NSSTrustDomain_FindCertificateByEncodedCertificate(handle, + &encoding); + } if (c) { return STAN_GetCERTCertificate(c); } @@ -284,7 +290,6 @@ get_best_temp_or_perm(NSSCertificate *ct, NSSCertificate *cp) if (cp) { nssBestCertificate_Callback(cp, (void *)&best); } - nss_ZFreeIf(best.time); return best.cert; } @@ -506,7 +511,6 @@ CERT_DestroyCertificate(CERTCertificate *cert) if (tmp) { /* delete the NSSCertificate */ PK11SlotInfo *slot = cert->slot; - PRBool freeSlot = cert->ownSlot; NSSTrustDomain *td = STAN_GetDefaultTrustDomain(); refCount = (int)tmp->object.refCount; /* This is a hack. For 3.4, there are persistent references @@ -531,10 +535,6 @@ CERT_DestroyCertificate(CERTCertificate *cert) refCount = (int)tmp->object.refCount; } NSSCertificate_Destroy(tmp); - /* another hack... the destroy *must* decrement the count */ - if (--refCount == 0) { - if (freeSlot) PK11_FreeSlot(slot); - } } #endif } @@ -664,7 +664,7 @@ CERT_SaveSMimeProfile(CERTCertificate *cert, SECItem *emailProfile, PK11SlotInfo *slot = NULL; NSSCertificate *c; NSSCryptoContext *cc; - nssSMIMEProfile *stanProfile; + nssSMIMEProfile *stanProfile = NULL; emailAddr = cert->emailAddr; diff --git a/security/nss/lib/ckfw/builtins/Makefile b/security/nss/lib/ckfw/builtins/Makefile index ac3282c4a..ca036297f 100644 --- a/security/nss/lib/ckfw/builtins/Makefile +++ b/security/nss/lib/ckfw/builtins/Makefile @@ -35,12 +35,16 @@ MAKEFILE_CVS_ID = "@(#) $RCSfile$ $Revision$ $Date$ $Name$" include manifest.mn include $(CORE_DEPTH)/coreconf/config.mk include config.mk + +EXTRA_LIBS = \ + $(DIST)/lib/$(LIB_PREFIX)nssckfw.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ + $(NULL) + # can't do this in manifest.mn because OS_ARCH isn't defined there. ifeq ($(OS_ARCH), WINNT) -EXTRA_LIBS = \ - $(DIST)/lib/nssckfw.lib \ - $(DIST)/lib/nssb.lib \ +EXTRA_LIBS += \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \ wsock32.lib \ @@ -49,19 +53,9 @@ EXTRA_LIBS = \ else -ifeq ($(OS_ARCH), OS2) -PLC_STATIC_LIB = $(DIST)/lib/plc4.$(LIB_SUFFIX) -PLDS_STATIC_LIB = $(DIST)/lib/plds4.$(LIB_SUFFIX) -else -PLC_STATIC_LIB = $(DIST)/lib/libplc4.$(LIB_SUFFIX) -PLDS_STATIC_LIB = $(DIST)/lib/libplds4.$(LIB_SUFFIX) -endif - EXTRA_LIBS += \ - $(DIST)/lib/libnssckfw.$(LIB_SUFFIX) \ - $(DIST)/lib/libnssb.$(LIB_SUFFIX) \ - $(PLC_STATIC_LIB) \ - $(PLDS_STATIC_LIB) \ + $(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \ $(NULL) endif diff --git a/security/nss/lib/ckfw/builtins/find.c b/security/nss/lib/ckfw/builtins/bfind.c index 17737fd22..87cb91cbc 100644 --- a/security/nss/lib/ckfw/builtins/find.c +++ b/security/nss/lib/ckfw/builtins/bfind.c @@ -67,9 +67,13 @@ builtins_mdFindObjects_Final ) { struct builtinsFOStr *fo = (struct builtinsFOStr *)mdFindObjects->etc; + NSSArena *arena = fo->arena; nss_ZFreeIf(fo->objs); nss_ZFreeIf(fo); + if ((NSSArena *)NULL != arena) { + NSSArena_Destroy(arena); + } return; } @@ -175,7 +179,7 @@ nss_builtins_FindObjectsInit builtinsInternalObject **temp = (builtinsInternalObject **)NULL; PRUint32 i; - arena = NSSCKFWSession_GetArena(fwSession, pError); + arena = NSSArena_Create(); if( (NSSArena *)NULL == arena ) { goto loser; } diff --git a/security/nss/lib/ckfw/builtins/instance.c b/security/nss/lib/ckfw/builtins/binst.c index e97c0d4bf..e97c0d4bf 100644 --- a/security/nss/lib/ckfw/builtins/instance.c +++ b/security/nss/lib/ckfw/builtins/binst.c diff --git a/security/nss/lib/ckfw/builtins/object.c b/security/nss/lib/ckfw/builtins/bobject.c index 030bc11a0..9ad2ccaec 100644 --- a/security/nss/lib/ckfw/builtins/object.c +++ b/security/nss/lib/ckfw/builtins/bobject.c @@ -216,7 +216,7 @@ builtins_mdObject_GetObjectSize return rv; } -static NSSCKMDObject +static const NSSCKMDObject builtins_prototype_mdObject = { (void *)NULL, /* etc */ NULL, /* Finalize */ @@ -239,16 +239,11 @@ nss_builtins_CreateMDObject CK_RV *pError ) { - NSSCKMDObject *rv; - - rv = nss_ZNEW(arena, NSSCKMDObject); - if( (NSSCKMDObject *)NULL == rv ) { - *pError = CKR_HOST_MEMORY; - return (NSSCKMDObject *)NULL; + if ( (void*)NULL == io->mdObject.etc) { + (void) nsslibc_memcpy(&io->mdObject,&builtins_prototype_mdObject, + sizeof(builtins_prototype_mdObject)); + io->mdObject.etc = (void *)io; } - *rv = builtins_prototype_mdObject; - rv->etc = (void *)io; - - return rv; + return &io->mdObject; } diff --git a/security/nss/lib/ckfw/builtins/session.c b/security/nss/lib/ckfw/builtins/bsession.c index e8d7f7522..e8d7f7522 100644 --- a/security/nss/lib/ckfw/builtins/session.c +++ b/security/nss/lib/ckfw/builtins/bsession.c diff --git a/security/nss/lib/ckfw/builtins/slot.c b/security/nss/lib/ckfw/builtins/bslot.c index 1a2df9e70..1a2df9e70 100644 --- a/security/nss/lib/ckfw/builtins/slot.c +++ b/security/nss/lib/ckfw/builtins/bslot.c diff --git a/security/nss/lib/ckfw/builtins/token.c b/security/nss/lib/ckfw/builtins/btoken.c index ddf068e8e..ddf068e8e 100644 --- a/security/nss/lib/ckfw/builtins/token.c +++ b/security/nss/lib/ckfw/builtins/btoken.c diff --git a/security/nss/lib/ckfw/builtins/builtins.h b/security/nss/lib/ckfw/builtins/builtins.h index 287db360d..e53826fed 100644 --- a/security/nss/lib/ckfw/builtins/builtins.h +++ b/security/nss/lib/ckfw/builtins/builtins.h @@ -57,10 +57,11 @@ struct builtinsInternalObjectStr { CK_ULONG n; const CK_ATTRIBUTE_TYPE *types; const NSSItem *items; + NSSCKMDObject mdObject; }; typedef struct builtinsInternalObjectStr builtinsInternalObject; -NSS_EXTERN_DATA const builtinsInternalObject nss_builtins_data[]; +NSS_EXTERN_DATA builtinsInternalObject nss_builtins_data[]; NSS_EXTERN_DATA const PRUint32 nss_builtins_nObjects; NSS_EXTERN_DATA const CK_VERSION nss_builtins_CryptokiVersion; diff --git a/security/nss/lib/ckfw/builtins/certdata.c b/security/nss/lib/ckfw/builtins/certdata.c index 565a34395..a6abc5fa4 100644 --- a/security/nss/lib/ckfw/builtins/certdata.c +++ b/security/nss/lib/ckfw/builtins/certdata.c @@ -11225,192 +11225,192 @@ static const NSSItem nss_builtins_items_181 [] = { { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) } }; -PR_IMPLEMENT_DATA(const builtinsInternalObject) +PR_IMPLEMENT_DATA(builtinsInternalObject) nss_builtins_data[] = { #ifdef DEBUG - { 7, nss_builtins_types_0, nss_builtins_items_0 }, + { 7, nss_builtins_types_0, nss_builtins_items_0, {NULL} }, #endif /* DEBUG */ - { 5, nss_builtins_types_1, nss_builtins_items_1 }, - { 11, nss_builtins_types_2, nss_builtins_items_2 }, - { 12, nss_builtins_types_3, nss_builtins_items_3 }, - { 11, nss_builtins_types_4, nss_builtins_items_4 }, - { 12, nss_builtins_types_5, nss_builtins_items_5 }, - { 11, nss_builtins_types_6, nss_builtins_items_6 }, - { 12, nss_builtins_types_7, nss_builtins_items_7 }, - { 11, nss_builtins_types_8, nss_builtins_items_8 }, - { 12, nss_builtins_types_9, nss_builtins_items_9 }, - { 11, nss_builtins_types_10, nss_builtins_items_10 }, - { 12, nss_builtins_types_11, nss_builtins_items_11 }, - { 11, nss_builtins_types_12, nss_builtins_items_12 }, - { 12, nss_builtins_types_13, nss_builtins_items_13 }, - { 11, nss_builtins_types_14, nss_builtins_items_14 }, - { 12, nss_builtins_types_15, nss_builtins_items_15 }, - { 11, nss_builtins_types_16, nss_builtins_items_16 }, - { 12, nss_builtins_types_17, nss_builtins_items_17 }, - { 11, nss_builtins_types_18, nss_builtins_items_18 }, - { 12, nss_builtins_types_19, nss_builtins_items_19 }, - { 11, nss_builtins_types_20, nss_builtins_items_20 }, - { 12, nss_builtins_types_21, nss_builtins_items_21 }, - { 11, nss_builtins_types_22, nss_builtins_items_22 }, - { 12, nss_builtins_types_23, nss_builtins_items_23 }, - { 11, nss_builtins_types_24, nss_builtins_items_24 }, - { 12, nss_builtins_types_25, nss_builtins_items_25 }, - { 11, nss_builtins_types_26, nss_builtins_items_26 }, - { 12, nss_builtins_types_27, nss_builtins_items_27 }, - { 11, nss_builtins_types_28, nss_builtins_items_28 }, - { 12, nss_builtins_types_29, nss_builtins_items_29 }, - { 11, nss_builtins_types_30, nss_builtins_items_30 }, - { 12, nss_builtins_types_31, nss_builtins_items_31 }, - { 11, nss_builtins_types_32, nss_builtins_items_32 }, - { 12, nss_builtins_types_33, nss_builtins_items_33 }, - { 11, nss_builtins_types_34, nss_builtins_items_34 }, - { 12, nss_builtins_types_35, nss_builtins_items_35 }, - { 11, nss_builtins_types_36, nss_builtins_items_36 }, - { 12, nss_builtins_types_37, nss_builtins_items_37 }, - { 11, nss_builtins_types_38, nss_builtins_items_38 }, - { 12, nss_builtins_types_39, nss_builtins_items_39 }, - { 11, nss_builtins_types_40, nss_builtins_items_40 }, - { 12, nss_builtins_types_41, nss_builtins_items_41 }, - { 11, nss_builtins_types_42, nss_builtins_items_42 }, - { 12, nss_builtins_types_43, nss_builtins_items_43 }, - { 11, nss_builtins_types_44, nss_builtins_items_44 }, - { 12, nss_builtins_types_45, nss_builtins_items_45 }, - { 11, nss_builtins_types_46, nss_builtins_items_46 }, - { 12, nss_builtins_types_47, nss_builtins_items_47 }, - { 11, nss_builtins_types_48, nss_builtins_items_48 }, - { 12, nss_builtins_types_49, nss_builtins_items_49 }, - { 11, nss_builtins_types_50, nss_builtins_items_50 }, - { 12, nss_builtins_types_51, nss_builtins_items_51 }, - { 11, nss_builtins_types_52, nss_builtins_items_52 }, - { 12, nss_builtins_types_53, nss_builtins_items_53 }, - { 11, nss_builtins_types_54, nss_builtins_items_54 }, - { 12, nss_builtins_types_55, nss_builtins_items_55 }, - { 11, nss_builtins_types_56, nss_builtins_items_56 }, - { 12, nss_builtins_types_57, nss_builtins_items_57 }, - { 11, nss_builtins_types_58, nss_builtins_items_58 }, - { 12, nss_builtins_types_59, nss_builtins_items_59 }, - { 11, nss_builtins_types_60, nss_builtins_items_60 }, - { 12, nss_builtins_types_61, nss_builtins_items_61 }, - { 11, nss_builtins_types_62, nss_builtins_items_62 }, - { 12, nss_builtins_types_63, nss_builtins_items_63 }, - { 11, nss_builtins_types_64, nss_builtins_items_64 }, - { 12, nss_builtins_types_65, nss_builtins_items_65 }, - { 11, nss_builtins_types_66, nss_builtins_items_66 }, - { 12, nss_builtins_types_67, nss_builtins_items_67 }, - { 11, nss_builtins_types_68, nss_builtins_items_68 }, - { 12, nss_builtins_types_69, nss_builtins_items_69 }, - { 11, nss_builtins_types_70, nss_builtins_items_70 }, - { 12, nss_builtins_types_71, nss_builtins_items_71 }, - { 11, nss_builtins_types_72, nss_builtins_items_72 }, - { 12, nss_builtins_types_73, nss_builtins_items_73 }, - { 11, nss_builtins_types_74, nss_builtins_items_74 }, - { 12, nss_builtins_types_75, nss_builtins_items_75 }, - { 11, nss_builtins_types_76, nss_builtins_items_76 }, - { 12, nss_builtins_types_77, nss_builtins_items_77 }, - { 11, nss_builtins_types_78, nss_builtins_items_78 }, - { 12, nss_builtins_types_79, nss_builtins_items_79 }, - { 11, nss_builtins_types_80, nss_builtins_items_80 }, - { 12, nss_builtins_types_81, nss_builtins_items_81 }, - { 11, nss_builtins_types_82, nss_builtins_items_82 }, - { 12, nss_builtins_types_83, nss_builtins_items_83 }, - { 11, nss_builtins_types_84, nss_builtins_items_84 }, - { 12, nss_builtins_types_85, nss_builtins_items_85 }, - { 11, nss_builtins_types_86, nss_builtins_items_86 }, - { 12, nss_builtins_types_87, nss_builtins_items_87 }, - { 11, nss_builtins_types_88, nss_builtins_items_88 }, - { 12, nss_builtins_types_89, nss_builtins_items_89 }, - { 11, nss_builtins_types_90, nss_builtins_items_90 }, - { 12, nss_builtins_types_91, nss_builtins_items_91 }, - { 11, nss_builtins_types_92, nss_builtins_items_92 }, - { 12, nss_builtins_types_93, nss_builtins_items_93 }, - { 11, nss_builtins_types_94, nss_builtins_items_94 }, - { 12, nss_builtins_types_95, nss_builtins_items_95 }, - { 11, nss_builtins_types_96, nss_builtins_items_96 }, - { 12, nss_builtins_types_97, nss_builtins_items_97 }, - { 11, nss_builtins_types_98, nss_builtins_items_98 }, - { 12, nss_builtins_types_99, nss_builtins_items_99 }, - { 11, nss_builtins_types_100, nss_builtins_items_100 }, - { 12, nss_builtins_types_101, nss_builtins_items_101 }, - { 11, nss_builtins_types_102, nss_builtins_items_102 }, - { 12, nss_builtins_types_103, nss_builtins_items_103 }, - { 11, nss_builtins_types_104, nss_builtins_items_104 }, - { 12, nss_builtins_types_105, nss_builtins_items_105 }, - { 11, nss_builtins_types_106, nss_builtins_items_106 }, - { 12, nss_builtins_types_107, nss_builtins_items_107 }, - { 11, nss_builtins_types_108, nss_builtins_items_108 }, - { 12, nss_builtins_types_109, nss_builtins_items_109 }, - { 11, nss_builtins_types_110, nss_builtins_items_110 }, - { 12, nss_builtins_types_111, nss_builtins_items_111 }, - { 11, nss_builtins_types_112, nss_builtins_items_112 }, - { 12, nss_builtins_types_113, nss_builtins_items_113 }, - { 11, nss_builtins_types_114, nss_builtins_items_114 }, - { 12, nss_builtins_types_115, nss_builtins_items_115 }, - { 11, nss_builtins_types_116, nss_builtins_items_116 }, - { 12, nss_builtins_types_117, nss_builtins_items_117 }, - { 11, nss_builtins_types_118, nss_builtins_items_118 }, - { 12, nss_builtins_types_119, nss_builtins_items_119 }, - { 11, nss_builtins_types_120, nss_builtins_items_120 }, - { 12, nss_builtins_types_121, nss_builtins_items_121 }, - { 11, nss_builtins_types_122, nss_builtins_items_122 }, - { 12, nss_builtins_types_123, nss_builtins_items_123 }, - { 11, nss_builtins_types_124, nss_builtins_items_124 }, - { 12, nss_builtins_types_125, nss_builtins_items_125 }, - { 11, nss_builtins_types_126, nss_builtins_items_126 }, - { 12, nss_builtins_types_127, nss_builtins_items_127 }, - { 11, nss_builtins_types_128, nss_builtins_items_128 }, - { 12, nss_builtins_types_129, nss_builtins_items_129 }, - { 11, nss_builtins_types_130, nss_builtins_items_130 }, - { 12, nss_builtins_types_131, nss_builtins_items_131 }, - { 11, nss_builtins_types_132, nss_builtins_items_132 }, - { 12, nss_builtins_types_133, nss_builtins_items_133 }, - { 11, nss_builtins_types_134, nss_builtins_items_134 }, - { 12, nss_builtins_types_135, nss_builtins_items_135 }, - { 11, nss_builtins_types_136, nss_builtins_items_136 }, - { 12, nss_builtins_types_137, nss_builtins_items_137 }, - { 11, nss_builtins_types_138, nss_builtins_items_138 }, - { 12, nss_builtins_types_139, nss_builtins_items_139 }, - { 11, nss_builtins_types_140, nss_builtins_items_140 }, - { 12, nss_builtins_types_141, nss_builtins_items_141 }, - { 11, nss_builtins_types_142, nss_builtins_items_142 }, - { 12, nss_builtins_types_143, nss_builtins_items_143 }, - { 11, nss_builtins_types_144, nss_builtins_items_144 }, - { 12, nss_builtins_types_145, nss_builtins_items_145 }, - { 11, nss_builtins_types_146, nss_builtins_items_146 }, - { 12, nss_builtins_types_147, nss_builtins_items_147 }, - { 11, nss_builtins_types_148, nss_builtins_items_148 }, - { 12, nss_builtins_types_149, nss_builtins_items_149 }, - { 11, nss_builtins_types_150, nss_builtins_items_150 }, - { 12, nss_builtins_types_151, nss_builtins_items_151 }, - { 11, nss_builtins_types_152, nss_builtins_items_152 }, - { 12, nss_builtins_types_153, nss_builtins_items_153 }, - { 11, nss_builtins_types_154, nss_builtins_items_154 }, - { 12, nss_builtins_types_155, nss_builtins_items_155 }, - { 11, nss_builtins_types_156, nss_builtins_items_156 }, - { 12, nss_builtins_types_157, nss_builtins_items_157 }, - { 11, nss_builtins_types_158, nss_builtins_items_158 }, - { 12, nss_builtins_types_159, nss_builtins_items_159 }, - { 11, nss_builtins_types_160, nss_builtins_items_160 }, - { 12, nss_builtins_types_161, nss_builtins_items_161 }, - { 11, nss_builtins_types_162, nss_builtins_items_162 }, - { 12, nss_builtins_types_163, nss_builtins_items_163 }, - { 11, nss_builtins_types_164, nss_builtins_items_164 }, - { 12, nss_builtins_types_165, nss_builtins_items_165 }, - { 11, nss_builtins_types_166, nss_builtins_items_166 }, - { 12, nss_builtins_types_167, nss_builtins_items_167 }, - { 11, nss_builtins_types_168, nss_builtins_items_168 }, - { 12, nss_builtins_types_169, nss_builtins_items_169 }, - { 11, nss_builtins_types_170, nss_builtins_items_170 }, - { 12, nss_builtins_types_171, nss_builtins_items_171 }, - { 11, nss_builtins_types_172, nss_builtins_items_172 }, - { 12, nss_builtins_types_173, nss_builtins_items_173 }, - { 11, nss_builtins_types_174, nss_builtins_items_174 }, - { 12, nss_builtins_types_175, nss_builtins_items_175 }, - { 11, nss_builtins_types_176, nss_builtins_items_176 }, - { 12, nss_builtins_types_177, nss_builtins_items_177 }, - { 11, nss_builtins_types_178, nss_builtins_items_178 }, - { 12, nss_builtins_types_179, nss_builtins_items_179 }, - { 11, nss_builtins_types_180, nss_builtins_items_180 }, - { 12, nss_builtins_types_181, nss_builtins_items_181 } + { 5, nss_builtins_types_1, nss_builtins_items_1, {NULL} }, + { 11, nss_builtins_types_2, nss_builtins_items_2, {NULL} }, + { 12, nss_builtins_types_3, nss_builtins_items_3, {NULL} }, + { 11, nss_builtins_types_4, nss_builtins_items_4, {NULL} }, + { 12, nss_builtins_types_5, nss_builtins_items_5, {NULL} }, + { 11, nss_builtins_types_6, nss_builtins_items_6, {NULL} }, + { 12, nss_builtins_types_7, nss_builtins_items_7, {NULL} }, + { 11, nss_builtins_types_8, nss_builtins_items_8, {NULL} }, + { 12, nss_builtins_types_9, nss_builtins_items_9, {NULL} }, + { 11, nss_builtins_types_10, nss_builtins_items_10, {NULL} }, + { 12, nss_builtins_types_11, nss_builtins_items_11, {NULL} }, + { 11, nss_builtins_types_12, nss_builtins_items_12, {NULL} }, + { 12, nss_builtins_types_13, nss_builtins_items_13, {NULL} }, + { 11, nss_builtins_types_14, nss_builtins_items_14, {NULL} }, + { 12, nss_builtins_types_15, nss_builtins_items_15, {NULL} }, + { 11, nss_builtins_types_16, nss_builtins_items_16, {NULL} }, + { 12, nss_builtins_types_17, nss_builtins_items_17, {NULL} }, + { 11, nss_builtins_types_18, nss_builtins_items_18, {NULL} }, + { 12, nss_builtins_types_19, nss_builtins_items_19, {NULL} }, + { 11, nss_builtins_types_20, nss_builtins_items_20, {NULL} }, + { 12, nss_builtins_types_21, nss_builtins_items_21, {NULL} }, + { 11, nss_builtins_types_22, nss_builtins_items_22, {NULL} }, + { 12, nss_builtins_types_23, nss_builtins_items_23, {NULL} }, + { 11, nss_builtins_types_24, nss_builtins_items_24, {NULL} }, + { 12, nss_builtins_types_25, nss_builtins_items_25, {NULL} }, + { 11, nss_builtins_types_26, nss_builtins_items_26, {NULL} }, + { 12, nss_builtins_types_27, nss_builtins_items_27, {NULL} }, + { 11, nss_builtins_types_28, nss_builtins_items_28, {NULL} }, + { 12, nss_builtins_types_29, nss_builtins_items_29, {NULL} }, + { 11, nss_builtins_types_30, nss_builtins_items_30, {NULL} }, + { 12, nss_builtins_types_31, nss_builtins_items_31, {NULL} }, + { 11, nss_builtins_types_32, nss_builtins_items_32, {NULL} }, + { 12, nss_builtins_types_33, nss_builtins_items_33, {NULL} }, + { 11, nss_builtins_types_34, nss_builtins_items_34, {NULL} }, + { 12, nss_builtins_types_35, nss_builtins_items_35, {NULL} }, + { 11, nss_builtins_types_36, nss_builtins_items_36, {NULL} }, + { 12, nss_builtins_types_37, nss_builtins_items_37, {NULL} }, + { 11, nss_builtins_types_38, nss_builtins_items_38, {NULL} }, + { 12, nss_builtins_types_39, nss_builtins_items_39, {NULL} }, + { 11, nss_builtins_types_40, nss_builtins_items_40, {NULL} }, + { 12, nss_builtins_types_41, nss_builtins_items_41, {NULL} }, + { 11, nss_builtins_types_42, nss_builtins_items_42, {NULL} }, + { 12, nss_builtins_types_43, nss_builtins_items_43, {NULL} }, + { 11, nss_builtins_types_44, nss_builtins_items_44, {NULL} }, + { 12, nss_builtins_types_45, nss_builtins_items_45, {NULL} }, + { 11, nss_builtins_types_46, nss_builtins_items_46, {NULL} }, + { 12, nss_builtins_types_47, nss_builtins_items_47, {NULL} }, + { 11, nss_builtins_types_48, nss_builtins_items_48, {NULL} }, + { 12, nss_builtins_types_49, nss_builtins_items_49, {NULL} }, + { 11, nss_builtins_types_50, nss_builtins_items_50, {NULL} }, + { 12, nss_builtins_types_51, nss_builtins_items_51, {NULL} }, + { 11, nss_builtins_types_52, nss_builtins_items_52, {NULL} }, + { 12, nss_builtins_types_53, nss_builtins_items_53, {NULL} }, + { 11, nss_builtins_types_54, nss_builtins_items_54, {NULL} }, + { 12, nss_builtins_types_55, nss_builtins_items_55, {NULL} }, + { 11, nss_builtins_types_56, nss_builtins_items_56, {NULL} }, + { 12, nss_builtins_types_57, nss_builtins_items_57, {NULL} }, + { 11, nss_builtins_types_58, nss_builtins_items_58, {NULL} }, + { 12, nss_builtins_types_59, nss_builtins_items_59, {NULL} }, + { 11, nss_builtins_types_60, nss_builtins_items_60, {NULL} }, + { 12, nss_builtins_types_61, nss_builtins_items_61, {NULL} }, + { 11, nss_builtins_types_62, nss_builtins_items_62, {NULL} }, + { 12, nss_builtins_types_63, nss_builtins_items_63, {NULL} }, + { 11, nss_builtins_types_64, nss_builtins_items_64, {NULL} }, + { 12, nss_builtins_types_65, nss_builtins_items_65, {NULL} }, + { 11, nss_builtins_types_66, nss_builtins_items_66, {NULL} }, + { 12, nss_builtins_types_67, nss_builtins_items_67, {NULL} }, + { 11, nss_builtins_types_68, nss_builtins_items_68, {NULL} }, + { 12, nss_builtins_types_69, nss_builtins_items_69, {NULL} }, + { 11, nss_builtins_types_70, nss_builtins_items_70, {NULL} }, + { 12, nss_builtins_types_71, nss_builtins_items_71, {NULL} }, + { 11, nss_builtins_types_72, nss_builtins_items_72, {NULL} }, + { 12, nss_builtins_types_73, nss_builtins_items_73, {NULL} }, + { 11, nss_builtins_types_74, nss_builtins_items_74, {NULL} }, + { 12, nss_builtins_types_75, nss_builtins_items_75, {NULL} }, + { 11, nss_builtins_types_76, nss_builtins_items_76, {NULL} }, + { 12, nss_builtins_types_77, nss_builtins_items_77, {NULL} }, + { 11, nss_builtins_types_78, nss_builtins_items_78, {NULL} }, + { 12, nss_builtins_types_79, nss_builtins_items_79, {NULL} }, + { 11, nss_builtins_types_80, nss_builtins_items_80, {NULL} }, + { 12, nss_builtins_types_81, nss_builtins_items_81, {NULL} }, + { 11, nss_builtins_types_82, nss_builtins_items_82, {NULL} }, + { 12, nss_builtins_types_83, nss_builtins_items_83, {NULL} }, + { 11, nss_builtins_types_84, nss_builtins_items_84, {NULL} }, + { 12, nss_builtins_types_85, nss_builtins_items_85, {NULL} }, + { 11, nss_builtins_types_86, nss_builtins_items_86, {NULL} }, + { 12, nss_builtins_types_87, nss_builtins_items_87, {NULL} }, + { 11, nss_builtins_types_88, nss_builtins_items_88, {NULL} }, + { 12, nss_builtins_types_89, nss_builtins_items_89, {NULL} }, + { 11, nss_builtins_types_90, nss_builtins_items_90, {NULL} }, + { 12, nss_builtins_types_91, nss_builtins_items_91, {NULL} }, + { 11, nss_builtins_types_92, nss_builtins_items_92, {NULL} }, + { 12, nss_builtins_types_93, nss_builtins_items_93, {NULL} }, + { 11, nss_builtins_types_94, nss_builtins_items_94, {NULL} }, + { 12, nss_builtins_types_95, nss_builtins_items_95, {NULL} }, + { 11, nss_builtins_types_96, nss_builtins_items_96, {NULL} }, + { 12, nss_builtins_types_97, nss_builtins_items_97, {NULL} }, + { 11, nss_builtins_types_98, nss_builtins_items_98, {NULL} }, + { 12, nss_builtins_types_99, nss_builtins_items_99, {NULL} }, + { 11, nss_builtins_types_100, nss_builtins_items_100, {NULL} }, + { 12, nss_builtins_types_101, nss_builtins_items_101, {NULL} }, + { 11, nss_builtins_types_102, nss_builtins_items_102, {NULL} }, + { 12, nss_builtins_types_103, nss_builtins_items_103, {NULL} }, + { 11, nss_builtins_types_104, nss_builtins_items_104, {NULL} }, + { 12, nss_builtins_types_105, nss_builtins_items_105, {NULL} }, + { 11, nss_builtins_types_106, nss_builtins_items_106, {NULL} }, + { 12, nss_builtins_types_107, nss_builtins_items_107, {NULL} }, + { 11, nss_builtins_types_108, nss_builtins_items_108, {NULL} }, + { 12, nss_builtins_types_109, nss_builtins_items_109, {NULL} }, + { 11, nss_builtins_types_110, nss_builtins_items_110, {NULL} }, + { 12, nss_builtins_types_111, nss_builtins_items_111, {NULL} }, + { 11, nss_builtins_types_112, nss_builtins_items_112, {NULL} }, + { 12, nss_builtins_types_113, nss_builtins_items_113, {NULL} }, + { 11, nss_builtins_types_114, nss_builtins_items_114, {NULL} }, + { 12, nss_builtins_types_115, nss_builtins_items_115, {NULL} }, + { 11, nss_builtins_types_116, nss_builtins_items_116, {NULL} }, + { 12, nss_builtins_types_117, nss_builtins_items_117, {NULL} }, + { 11, nss_builtins_types_118, nss_builtins_items_118, {NULL} }, + { 12, nss_builtins_types_119, nss_builtins_items_119, {NULL} }, + { 11, nss_builtins_types_120, nss_builtins_items_120, {NULL} }, + { 12, nss_builtins_types_121, nss_builtins_items_121, {NULL} }, + { 11, nss_builtins_types_122, nss_builtins_items_122, {NULL} }, + { 12, nss_builtins_types_123, nss_builtins_items_123, {NULL} }, + { 11, nss_builtins_types_124, nss_builtins_items_124, {NULL} }, + { 12, nss_builtins_types_125, nss_builtins_items_125, {NULL} }, + { 11, nss_builtins_types_126, nss_builtins_items_126, {NULL} }, + { 12, nss_builtins_types_127, nss_builtins_items_127, {NULL} }, + { 11, nss_builtins_types_128, nss_builtins_items_128, {NULL} }, + { 12, nss_builtins_types_129, nss_builtins_items_129, {NULL} }, + { 11, nss_builtins_types_130, nss_builtins_items_130, {NULL} }, + { 12, nss_builtins_types_131, nss_builtins_items_131, {NULL} }, + { 11, nss_builtins_types_132, nss_builtins_items_132, {NULL} }, + { 12, nss_builtins_types_133, nss_builtins_items_133, {NULL} }, + { 11, nss_builtins_types_134, nss_builtins_items_134, {NULL} }, + { 12, nss_builtins_types_135, nss_builtins_items_135, {NULL} }, + { 11, nss_builtins_types_136, nss_builtins_items_136, {NULL} }, + { 12, nss_builtins_types_137, nss_builtins_items_137, {NULL} }, + { 11, nss_builtins_types_138, nss_builtins_items_138, {NULL} }, + { 12, nss_builtins_types_139, nss_builtins_items_139, {NULL} }, + { 11, nss_builtins_types_140, nss_builtins_items_140, {NULL} }, + { 12, nss_builtins_types_141, nss_builtins_items_141, {NULL} }, + { 11, nss_builtins_types_142, nss_builtins_items_142, {NULL} }, + { 12, nss_builtins_types_143, nss_builtins_items_143, {NULL} }, + { 11, nss_builtins_types_144, nss_builtins_items_144, {NULL} }, + { 12, nss_builtins_types_145, nss_builtins_items_145, {NULL} }, + { 11, nss_builtins_types_146, nss_builtins_items_146, {NULL} }, + { 12, nss_builtins_types_147, nss_builtins_items_147, {NULL} }, + { 11, nss_builtins_types_148, nss_builtins_items_148, {NULL} }, + { 12, nss_builtins_types_149, nss_builtins_items_149, {NULL} }, + { 11, nss_builtins_types_150, nss_builtins_items_150, {NULL} }, + { 12, nss_builtins_types_151, nss_builtins_items_151, {NULL} }, + { 11, nss_builtins_types_152, nss_builtins_items_152, {NULL} }, + { 12, nss_builtins_types_153, nss_builtins_items_153, {NULL} }, + { 11, nss_builtins_types_154, nss_builtins_items_154, {NULL} }, + { 12, nss_builtins_types_155, nss_builtins_items_155, {NULL} }, + { 11, nss_builtins_types_156, nss_builtins_items_156, {NULL} }, + { 12, nss_builtins_types_157, nss_builtins_items_157, {NULL} }, + { 11, nss_builtins_types_158, nss_builtins_items_158, {NULL} }, + { 12, nss_builtins_types_159, nss_builtins_items_159, {NULL} }, + { 11, nss_builtins_types_160, nss_builtins_items_160, {NULL} }, + { 12, nss_builtins_types_161, nss_builtins_items_161, {NULL} }, + { 11, nss_builtins_types_162, nss_builtins_items_162, {NULL} }, + { 12, nss_builtins_types_163, nss_builtins_items_163, {NULL} }, + { 11, nss_builtins_types_164, nss_builtins_items_164, {NULL} }, + { 12, nss_builtins_types_165, nss_builtins_items_165, {NULL} }, + { 11, nss_builtins_types_166, nss_builtins_items_166, {NULL} }, + { 12, nss_builtins_types_167, nss_builtins_items_167, {NULL} }, + { 11, nss_builtins_types_168, nss_builtins_items_168, {NULL} }, + { 12, nss_builtins_types_169, nss_builtins_items_169, {NULL} }, + { 11, nss_builtins_types_170, nss_builtins_items_170, {NULL} }, + { 12, nss_builtins_types_171, nss_builtins_items_171, {NULL} }, + { 11, nss_builtins_types_172, nss_builtins_items_172, {NULL} }, + { 12, nss_builtins_types_173, nss_builtins_items_173, {NULL} }, + { 11, nss_builtins_types_174, nss_builtins_items_174, {NULL} }, + { 12, nss_builtins_types_175, nss_builtins_items_175, {NULL} }, + { 11, nss_builtins_types_176, nss_builtins_items_176, {NULL} }, + { 12, nss_builtins_types_177, nss_builtins_items_177, {NULL} }, + { 11, nss_builtins_types_178, nss_builtins_items_178, {NULL} }, + { 12, nss_builtins_types_179, nss_builtins_items_179, {NULL} }, + { 11, nss_builtins_types_180, nss_builtins_items_180, {NULL} }, + { 12, nss_builtins_types_181, nss_builtins_items_181, {NULL} } }; PR_IMPLEMENT_DATA(const PRUint32) #ifdef DEBUG diff --git a/security/nss/lib/ckfw/builtins/certdata.perl b/security/nss/lib/ckfw/builtins/certdata.perl index 3d070e9bd..81ab8273b 100644 --- a/security/nss/lib/ckfw/builtins/certdata.perl +++ b/security/nss/lib/ckfw/builtins/certdata.perl @@ -259,7 +259,7 @@ for( $i = 0; $i <= $count; $i++ ) { } } -print CFILE "\nPR_IMPLEMENT_DATA(const builtinsInternalObject)\n"; +print CFILE "\nPR_IMPLEMENT_DATA(builtinsInternalObject)\n"; print CFILE "nss_builtins_data[] = {\n"; for( $i = 0; $i <= $count; $i++ ) { @@ -268,7 +268,7 @@ for( $i = 0; $i <= $count; $i++ ) { print CFILE "#ifdef DEBUG\n"; } - print CFILE " { $objsize[$i], nss_builtins_types_$i, nss_builtins_items_$i }"; + print CFILE " { $objsize[$i], nss_builtins_types_$i, nss_builtins_items_$i, {NULL} }"; if( $i == $count ) { print CFILE "\n"; diff --git a/security/nss/lib/ckfw/builtins/manifest.mn b/security/nss/lib/ckfw/builtins/manifest.mn index 43375f873..cc71a7194 100644 --- a/security/nss/lib/ckfw/builtins/manifest.mn +++ b/security/nss/lib/ckfw/builtins/manifest.mn @@ -39,12 +39,12 @@ MODULE = security CSRCS = \ anchor.c \ constants.c \ - find.c \ - instance.c \ - object.c \ - session.c \ - slot.c \ - token.c \ + bfind.c \ + binst.c \ + bobject.c \ + bsession.c \ + bslot.c \ + btoken.c \ certdata.c \ $(NULL) diff --git a/security/nss/lib/ckfw/find.c b/security/nss/lib/ckfw/find.c index c87b717f3..2569fa100 100644 --- a/security/nss/lib/ckfw/find.c +++ b/security/nss/lib/ckfw/find.c @@ -144,12 +144,14 @@ nssCKFWFindObjects_Create mdToken = nssCKFWToken_GetMDToken(fwToken); mdInstance = nssCKFWInstance_GetMDInstance(fwInstance); +#ifdef notdef arena = nssCKFWSession_GetArena(fwSession, pError); if( (NSSArena *)NULL == arena ) { goto loser; } +#endif - fwFindObjects = nss_ZNEW(arena, NSSCKFWFindObjects); + fwFindObjects = nss_ZNEW(NULL, NSSCKFWFindObjects); if( (NSSCKFWFindObjects *)NULL == fwFindObjects ) { *pError = CKR_HOST_MEMORY; goto loser; @@ -164,7 +166,7 @@ nssCKFWFindObjects_Create fwFindObjects->fwInstance = fwInstance; fwFindObjects->mdInstance = mdInstance; - fwFindObjects->mutex = nssCKFWInstance_CreateMutex(fwInstance, arena, pError); + fwFindObjects->mutex = nssCKFWInstance_CreateMutex(fwInstance, NULL, pError); if( (NSSCKFWMutex *)NULL == fwFindObjects->mutex ) { goto loser; } diff --git a/security/nss/lib/ckfw/sessobj.c b/security/nss/lib/ckfw/sessobj.c index 6851c1b6e..11de006ba 100644 --- a/security/nss/lib/ckfw/sessobj.c +++ b/security/nss/lib/ckfw/sessobj.c @@ -1011,7 +1011,7 @@ nssCKMDFindSessionObjects_Create rv->Next = nss_ckmdFindSessionObjects_Next; #ifdef DEBUG - if( *pError != nss_ckmdFindSessionObjects_add_pointer(rv) ) { + if( (*pError = nss_ckmdFindSessionObjects_add_pointer(rv)) != CKR_OK ) { NSSArena_Destroy(arena); return (NSSCKMDFindObjects *)NULL; } diff --git a/security/nss/lib/ckfw/wrap.c b/security/nss/lib/ckfw/wrap.c index beb98e14d..073df399c 100644 --- a/security/nss/lib/ckfw/wrap.c +++ b/security/nss/lib/ckfw/wrap.c @@ -2513,10 +2513,12 @@ NSSCKFWC_FindObjects goto loser; } +#ifdef notdef arena = nssCKFWSession_GetArena(fwSession, &error); if( (NSSArena *)NULL == arena ) { goto loser; } +#endif if( (CK_OBJECT_HANDLE_PTR)CK_NULL_PTR == phObject ) { error = CKR_ARGUMENTS_BAD; @@ -2536,7 +2538,7 @@ NSSCKFWC_FindObjects for( i = 0; i < ulMaxObjectCount; i++ ) { NSSCKFWObject *fwObject = nssCKFWFindObjects_Next(fwFindObjects, - arena, &error); + NULL, &error); if( (NSSCKFWObject *)NULL == fwObject ) { break; } diff --git a/security/nss/lib/dev/dev.h b/security/nss/lib/dev/dev.h index e25d5bb28..3102817eb 100644 --- a/security/nss/lib/dev/dev.h +++ b/security/nss/lib/dev/dev.h @@ -158,6 +158,12 @@ nssSlot_Destroy NSSSlot *slot ); +NSS_EXTERN PRBool +nssSlot_IsPermanent +( + NSSSlot *slot +); + NSS_EXTERN PRStatus nssSlot_Refresh ( diff --git a/security/nss/lib/dev/devobject.c b/security/nss/lib/dev/devobject.c index 04e0b3b6f..074879e65 100644 --- a/security/nss/lib/dev/devobject.c +++ b/security/nss/lib/dev/devobject.c @@ -258,6 +258,7 @@ traverse_objects_by_template } } nssListIterator_Finish(objects); + nssListIterator_Destroy(objects); count = OBJECT_STACK_SIZE; } for (i=0; i<count; i++) { diff --git a/security/nss/lib/dev/devtoken.c b/security/nss/lib/dev/devtoken.c index 13444ca8e..caddae84c 100644 --- a/security/nss/lib/dev/devtoken.c +++ b/security/nss/lib/dev/devtoken.c @@ -208,6 +208,10 @@ nssToken_IsPresent CK_SLOT_INFO slotInfo; NSSSlot *slot = token->slot; session = token->defaultSession; + /* permanent slots are always present */ + if (nssSlot_IsPermanent(slot) && session != CK_INVALID_SESSION) { + return PR_TRUE; + } nssSession_EnterMonitor(session); /* First obtain the slot info */ ckrv = CKAPI(slot)->C_GetSlotInfo(slot->slotID, &slotInfo); diff --git a/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile b/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile index 495e70ae3..8af29d6b5 100644 --- a/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile +++ b/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile @@ -37,12 +37,11 @@ include $(CORE_DEPTH)/coreconf/config.mk include config.mk -#SWCILIB = ../$(OBJDIR)/$(LIB_PREFIX)swfci.$(LIB_SUFFIX) +CRYPTO_LIB = $(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) + # can't do this in manifest.mn because OS_ARCH isn't defined there. ifeq ($(OS_ARCH), WINNT) -CRYPTO_LIB = $(DIST)/lib/freebl.lib - ifdef MOZILLA_SECURITY_BUILD CRYPTO_LIB = $(DIST)/lib/crypto.lib endif @@ -51,8 +50,6 @@ CRYPTO_LIB += $(DIST)/lib/bsafe$(BSAFEVER).lib CRYPTO_LIB += $(DIST)/lib/freebl.lib endif -# $(DIST)/lib/dbm.lib -# $(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib EXTRA_LIBS = \ $(DIST)/lib/swfci.lib \ $(DIST)/lib/softokn.lib \ @@ -66,44 +63,25 @@ EXTRA_LIBS = \ else -# $(DIST)/lib/libdbm.a -# $(DIST)/lib/libnspr3.a -# -CRYPTO_LIB = $(DIST)/lib/libfreebl.$(LIB_SUFFIX) - ifdef MOZILLA_SECURITY_BUILD -CRYPTO_LIB = $(DIST)/lib/libcrypto.$(LIB_SUFFIX) +CRYPTO_LIB = $(DIST)/lib/$(LIB_PREFIX)crypto.$(LIB_SUFFIX) endif ifdef MOZILLA_BSAFE_BUILD -CRYPTO_LIB += $(DIST)/lib/libbsafe.$(LIB_SUFFIX) -CRYPTO_LIB += $(DIST)/lib/libfreebl.$(LIB_SUFFIX) -endif - -ifeq ($(OS_ARCH), OS2) -PLC_STATIC_LIB = $(DIST)/lib/plc4.$(LIB_SUFFIX) -PLDS_STATIC_LIB = $(DIST)/lib/plds4.$(LIB_SUFFIX) -else -PLC_STATIC_LIB = $(DIST)/lib/libplc4.$(LIB_SUFFIX) -PLDS_STATIC_LIB = $(DIST)/lib/libplds4.$(LIB_SUFFIX) +CRYPTO_LIB += $(DIST)/lib/$(LIB_PREFIX)bsafe.$(LIB_SUFFIX) +CRYPTO_LIB += $(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) endif EXTRA_LIBS += \ - $(DIST)/lib/libswfci.$(LIB_SUFFIX) \ - $(DIST)/lib/libsoftokn.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)swfci.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \ $(CRYPTO_LIB) \ - $(DIST)/lib/libsecutil.$(LIB_SUFFIX) \ - $(PLC_STATIC_LIB) \ - $(PLDS_STATIC_LIB) \ + $(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \ $(NULL) endif -#ifeq ($(OS_TARGET), WIN16) -#W16LIBS += $(SWCILIB) -#else -#OBJS += $(SWCILIB) -#endif - INST_JS = inst.js LIBCI_JAR = $(OBJDIR)/lib$(LIBRARY_NAME).jar LIBCI_JAR_SRC = $(INST_JS) pk11inst $(SHARED_LIBRARY) diff --git a/security/nss/lib/freebl/mpi/montmulf.s b/security/nss/lib/freebl/mpi/montmulf.s index 6ed2d7593..cdb5d376e 100644 --- a/security/nss/lib/freebl/mpi/montmulf.s +++ b/security/nss/lib/freebl/mpi/montmulf.s @@ -1965,12 +1965,3 @@ TwoToMinus32: /* frequency 1.0 confidence 0.0 */ /* 0x0b1c 0 ( 0 0) */ .type mont_mulf_noconv,2 /* 0x0b1c ( 0 0) */ .size mont_mulf_noconv,(.-mont_mulf_noconv) -! Begin Disassembling Stabs - .xstabs ".stab.index","Xa ; O ; V=3.1 ; R=WorkShop Compilers 5.0 99/02/25 C 5.0 patch 107289-01",60,0,0,0 ! (/tmp/acompAAALcayz5:1) - .xstabs ".stab.index","/home/ferenc; /usr/dist/pkgs/devpro,v5.0/5.x-sparc/SC5.0/bin/cc -DMONOLITH -I../include -DNO_ASM -DSIXTY_FOUR_BIT -fast -xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC -Wc,-Qrm-Qd -Wc,-Qrm-Qf -Wc,-assembly -V -c montmulf.il -o montmulf.o montmulf.c -W0,-xp",52,0,0,0 ! (/tmp/acompAAALcayz5:2) -! End Disassembling Stabs - -! Begin Disassembling Ident - .ident "cg: WorkShop Compilers 5.0 99/04/15 Compiler Common 5.0 Patch 107357-02" ! (NO SOURCE LINE) - .ident "acomp: WorkShop Compilers 5.0 99/02/25 C 5.0 patch 107289-01" ! (/tmp/acompAAALcayz5:31) -! End Disassembling Ident diff --git a/security/nss/lib/freebl/mpi/montmulfv8.s b/security/nss/lib/freebl/mpi/montmulfv8.s index f6b90dfd8..ac74a530d 100644 --- a/security/nss/lib/freebl/mpi/montmulfv8.s +++ b/security/nss/lib/freebl/mpi/montmulfv8.s @@ -1845,12 +1845,3 @@ TwoToMinus32: /* 0x0b4c 0 */ .type mont_mulf_noconv,2 /* 0x0b4c */ .size mont_mulf_noconv,(.-mont_mulf_noconv) -! Begin Disassembling Stabs - .xstabs ".stab.index","Xa ; O ; P ; V=3.1 ; R=WorkShop Compilers 5.0 98/12/15 C 5.0",60,0,0,0 ! (/usr/tmp/acompAAA7YaaOM:1) - .xstabs ".stab.index","/h/interzone/d3/nelsonb/nss_tip/mozilla/security/nss/lib/freebl/mpi32; /tools/ns/workshop-5.0/bin/../SC5.0/bin/cc -fast -xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -Wc,-Qrm-Qd -Wc,-Qrm-Qf -Wc,-assembly -V -W0,-xp -KPIC -mt -o montmulf.o -c montmulf.il montmulf.c -W0,-xp",52,0,0,0 ! (/usr/tmp/acompAAA7YaaOM:2) -! End Disassembling Stabs - -! Begin Disassembling Ident - .ident "cg: WorkShop Compilers 5.0 99/08/12 Compiler Common 5.0 Patch 107357-05" ! (NO SOURCE LINE) - .ident "acomp: WorkShop Compilers 5.0 98/12/15 C 5.0" ! (/usr/tmp/acompAAA7YaaOM:36) -! End Disassembling Ident diff --git a/security/nss/lib/freebl/mpi/montmulfv9.s b/security/nss/lib/freebl/mpi/montmulfv9.s index 3a0a17f7e..30fc4f645 100644 --- a/security/nss/lib/freebl/mpi/montmulfv9.s +++ b/security/nss/lib/freebl/mpi/montmulfv9.s @@ -2375,12 +2375,3 @@ TwoToMinus32: /* 0x0dc4 0 */ .type mont_mulf_noconv,2 /* 0x0dc4 */ .size mont_mulf_noconv,(.-mont_mulf_noconv) -! Begin Disassembling Stabs - .xstabs ".stab.index","Xa ; O ; P ; V=3.1 ; R=WorkShop Compilers 5.0 98/12/15 C 5.0",60,0,0,0 ! (/usr/tmp/acompAAAl9a4BP:1) - .xstabs ".stab.index","/h/interzone/d3/nelsonb/nss_tip/mozilla/security/nss/lib/freebl/mpi32; /tools/ns/workshop-5.0/bin/../SC5.0/bin/cc -fast -xO5 -xrestrict=%%all -xdepend -xchip=ultra -xarch=v9a -KPIC -mt -S montmulf64.il -W0,-xp montmulf.c -W0,-xp",52,0,0,0 ! (/usr/tmp/acompAAAl9a4BP:2) -! End Disassembling Stabs - -! Begin Disassembling Ident - .ident "cg: WorkShop Compilers 5.0 99/08/12 Compiler Common 5.0 Patch 107357-05" ! (NO SOURCE LINE) - .ident "acomp: WorkShop Compilers 5.0 98/12/15 C 5.0" ! (/usr/tmp/acompAAAl9a4BP:36) -! End Disassembling Ident diff --git a/security/nss/lib/freebl/mpi/mpv_sparcv8.s b/security/nss/lib/freebl/mpi/mpv_sparcv8.s index 458068980..81fdd1b93 100644 --- a/security/nss/lib/freebl/mpi/mpv_sparcv8.s +++ b/security/nss/lib/freebl/mpi/mpv_sparcv8.s @@ -1639,13 +1639,3 @@ /* 0x11e0 10 ( 0 0) */ .type mask_cnst,#object /* 0x11e0 11 ( 0 0) */ .size mask_cnst,8 -! Begin Disassembling Stabs - .xstabs ".stab.index","Xa ; O ; P ; V=3.1 ; R=WorkShop Compilers 5.0 99/02/25 C 5.0 patch 107289-01",60,0,0,0 ! (mpv_sparc.s:1476) - .xstabs ".stab.index","/home/ferenc/ssl/vis-code; /usr/dist/pkgs/devpro,v5.0/5.x-sparc/bin/../SC5.0/bin/cc -fast -xO4 -xrestrict -xarch=v8plusa -xchip=ultra3 -xdepend -KPIC -mt -S vis_32.il mpv_sparc.c -W0,-xp",52,0,0,0 ! (mpv_sparc.s:1477) -! End Disassembling Stabs - -! Begin Disassembling Ident - .ident "cg: WorkShop Compilers 5.0 99/04/15 Compiler Common 5.0 Patch 107357-02" ! (mpv_sparc.s:1481) - .ident "@(#)vis_proto.h 1.3 97/03/30 SMI" ! (mpv_sparc.s:1482) - .ident "acomp: WorkShop Compilers 5.0 99/02/25 C 5.0 patch 107289-01" ! (mpv_sparc.s:1483) -! End Disassembling Ident diff --git a/security/nss/lib/freebl/mpi/mpv_sparcv9.s b/security/nss/lib/freebl/mpi/mpv_sparcv9.s index 071bdda3f..1a7997e4a 100644 --- a/security/nss/lib/freebl/mpi/mpv_sparcv9.s +++ b/security/nss/lib/freebl/mpi/mpv_sparcv9.s @@ -1671,13 +1671,3 @@ /* 0x1280 9 ( 0 0) */ .type mask_cnst,#object /* 0x1280 10 ( 0 0) */ .size mask_cnst,8 -! Begin Disassembling Stabs - .xstabs ".stab.index","Xa ; O ; P ; V=3.1 ; R=WorkShop Compilers 5.0 99/02/25 C 5.0 patch 107289-01",60,0,0,0 ! (mpv_sparc.s:1513) - .xstabs ".stab.index","/home/ferenc/ssl/vis-code; /usr/dist/pkgs/devpro,v5.0/5.x-sparc/bin/../SC5.0/bin/cc -fast -xO5 -xrestrict -xarch=v9a -xchip=ultra -xdepend -KPIC -mt -S vis_64.il mpv_sparc.c -W0,-xp",52,0,0,0 ! (mpv_sparc.s:1514) -! End Disassembling Stabs - -! Begin Disassembling Ident - .ident "cg: WorkShop Compilers 5.0 99/04/15 Compiler Common 5.0 Patch 107357-02" ! (mpv_sparc.s:1518) - .ident "@(#)vis_proto.h 1.3 97/03/30 SMI" ! (mpv_sparc.s:1519) - .ident "acomp: WorkShop Compilers 5.0 99/02/25 C 5.0 patch 107289-01" ! (mpv_sparc.s:1520) -! End Disassembling Ident diff --git a/security/nss/lib/freebl/rsa.c b/security/nss/lib/freebl/rsa.c index 2b1a0769a..3151ebb87 100644 --- a/security/nss/lib/freebl/rsa.c +++ b/security/nss/lib/freebl/rsa.c @@ -663,7 +663,7 @@ rsa_PrivateKeyOp(RSAPrivateKey *key, { unsigned int modLen; unsigned int offset; - SECStatus rv; + SECStatus rv = SECSuccess; mp_err err; mp_int n, c, m; mp_int f, g; diff --git a/security/nss/lib/nss/config.mk b/security/nss/lib/nss/config.mk index dec348831..78e041dae 100644 --- a/security/nss/lib/nss/config.mk +++ b/security/nss/lib/nss/config.mk @@ -36,11 +36,6 @@ # are specifed as dependencies within rules.mk. # -#TARGETS = $(LIBRARY) -#SHARED_LIBRARY = -#IMPORT_LIBRARY = -#PROGRAM = - # can't do this in manifest.mn because OS_ARCH isn't defined there. ifeq ($(OS_ARCH), WINNT) @@ -51,53 +46,44 @@ IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib RES = $(OBJDIR)/$(LIBRARY_NAME).res RESNAME = $(LIBRARY_NAME).rc -# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) -SHARED_LIBRARY_LIBS = \ - $(DIST)/lib/certhi.lib \ - $(DIST)/lib/cryptohi.lib \ - $(DIST)/lib/pk11wrap.lib \ - $(DIST)/lib/certdb.lib \ - $(DIST)/lib/secutil.lib \ - $(DIST)/lib/nsspki.lib \ - $(DIST)/lib/nssdev.lib \ - $(DIST)/lib/nssb.lib \ - $(NULL) - -SHARED_LIBRARY_DIRS = \ - ../certhigh \ - ../cryptohi \ - ../pk11wrap \ - ../certdb \ - ../util \ - ../pki \ - ../dev \ - ../base \ - $(NULL) - EXTRA_SHARED_LIBS += \ $(DIST)/lib/softokn3.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \ $(NULL) + else +# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) +# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. +EXTRA_SHARED_LIBS += \ + -L$(DIST)/lib/ \ + -lsoftokn3 \ + -lplc4 \ + -lplds4 \ + -lnspr4 \ + $(NULL) + +endif + + # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) SHARED_LIBRARY_LIBS = \ - $(DIST)/lib/libcerthi.$(LIB_SUFFIX) \ - $(DIST)/lib/libpk11wrap.$(LIB_SUFFIX) \ - $(DIST)/lib/libcryptohi.$(LIB_SUFFIX) \ - $(DIST)/lib/libcertdb.$(LIB_SUFFIX) \ - $(DIST)/lib/libsecutil.$(LIB_SUFFIX) \ - $(DIST)/lib/libnsspki.$(LIB_SUFFIX) \ - $(DIST)/lib/libnssdev.$(LIB_SUFFIX) \ - $(DIST)/lib/libnssb.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ $(NULL) SHARED_LIBRARY_DIRS = \ ../certhigh \ - ../pk11wrap \ ../cryptohi \ + ../pk11wrap \ ../certdb \ ../util \ ../pki \ @@ -105,14 +91,3 @@ SHARED_LIBRARY_DIRS = \ ../base \ $(NULL) -# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) -# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. -EXTRA_SHARED_LIBS += \ - -L$(DIST)/lib/ \ - -lsoftokn3 \ - -lplc4 \ - -lplds4 \ - -lnspr4 \ - $(NULL) -endif - diff --git a/security/nss/lib/nss/nss.def b/security/nss/lib/nss/nss.def index e29a8c827..38d727cb5 100644 --- a/security/nss/lib/nss/nss.def +++ b/security/nss/lib/nss/nss.def @@ -477,7 +477,6 @@ CERT_ImportCAChainTrusted; CERT_ImportCRL; CERT_IsCACert; CERT_IsCADERCert; -CERT_KeyFromDERCrl; CERT_SetOCSPDefaultResponder; PBE_CreateContext; PBE_DestroyContext; @@ -585,6 +584,7 @@ CERT_FindUserCertByUsage; CERT_FindUserCertsByUsage; CERT_GetCertChainFromCert; CERT_GetOCSPAuthorityInfoAccessLocation; +CERT_KeyFromDERCrl; CERT_NicknameStringsFromCertList; CERT_MakeCANickname; CERT_VerifySignedData; @@ -639,13 +639,16 @@ PK11_ListFixedKeysInSlot; PK11_DeleteTokenPrivateKey; PK11_DeleteTokenPublicKey; PK11_DeleteTokenSymKey; -PK11_GetSymKeyNickname; +PK11_GetNextSymKey; +PK11_GetPQGParamsFromPrivateKey; PK11_GetPublicKeyNickname; PK11_GetPrivateKeyNickname; +PK11_GetSymKeyNickname; PK11_SetSymKeyNickname; PK11_SetPublicKeyNickname; PK11_SetPrivateKeyNickname; SECKEY_DecodeDERSubjectPublicKeyInfo; +SECKEY_DestroyPublicKeyList; ;+# for debugging nss_DumpCertificateCacheInfo; ;+ local: diff --git a/security/nss/lib/pk11wrap/dev3hack.c b/security/nss/lib/pk11wrap/dev3hack.c index bc2ad6b61..742335c9d 100644 --- a/security/nss/lib/pk11wrap/dev3hack.c +++ b/security/nss/lib/pk11wrap/dev3hack.c @@ -154,6 +154,15 @@ nssToken_CreateFromPK11SlotInfo(NSSTrustDomain *td, PK11SlotInfo *nss3slot) return rvToken; } +NSS_IMPLEMENT PRBool +nssSlot_IsPermanent +( + NSSSlot *slot +) +{ + return slot->pk11slot->isPerm; +} + NSS_IMPLEMENT PRStatus nssSlot_Refresh ( diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c index 5fe17e5b8..c00a92f2f 100644 --- a/security/nss/lib/pk11wrap/pk11cert.c +++ b/security/nss/lib/pk11wrap/pk11cert.c @@ -94,14 +94,35 @@ static PRStatus convert_and_cache_cert(NSSCertificate *c, void *arg) PRStatus nssrv; NSSTrustDomain *td = STAN_GetDefaultTrustDomain(); struct nss3_cert_cbstr *nss3cb = (struct nss3_cert_cbstr *)arg; - nssrv = convert_cert(c, arg); - if (nssrv == PR_SUCCESS) { - nssTrustDomain_AddCertsToCache(td, &c, 1); - if (!nssList_Get(nss3cb->cached, c)) { - nssCertificate_AddRef(c); - nssList_Add(nss3cb->cached, c); - } + NSSCertificate *cp = nssCertificate_AddRef(c); + /* The cert coming in has been retrieved from a token. It was not in + * the cache when the search was begun. But it may be in the cache now, + * and if it isn't, it will be, because it is going to be cracked into + * a CERTCertificate and fed into the callback. + */ + nssrv = nssTrustDomain_AddCertsToCache(td, &c, 1); + if (!nssList_Get(nss3cb->cached, c)) { + nssCertificate_AddRef(c); + nssList_Add(nss3cb->cached, c); + } + /* This is why the hack of copying the cert was done above. The pointer + * c passed to this function is provided by retrieve_cert. That function + * will destroy the pointer once this function returns. Since c is a local + * copy, there is no way to notify retrieve_cert if it has changed. That + * would happen if the above call to add it to the cache found the cert + * already there. In that case, the pointer c passed to the callback + * below will be the cached cert, and the pointer c that retrieve_cert + * has will be the same as the copy made above. Thus, retrieve_cert will + * destroy the reference to the copy, the callback will use the reference + * to the cached entry, and everyone should be happy. + */ + if (cp == c) { + /* However, if the call to add c to the cache was successful, cp is + * now an extra copy within this function and needs to be destroyed. + */ + NSSCertificate_Destroy(cp); } + nssrv = convert_cert(c, arg); return nssrv; } diff --git a/security/nss/lib/pk11wrap/pk11func.h b/security/nss/lib/pk11wrap/pk11func.h index e0b2cb886..3ca29cc65 100644 --- a/security/nss/lib/pk11wrap/pk11func.h +++ b/security/nss/lib/pk11wrap/pk11func.h @@ -248,6 +248,7 @@ PK11SymKey *PK11_KeyGen(PK11SlotInfo *slot,CK_MECHANISM_TYPE type, SECItem *param, int keySize,void *wincx); PK11SymKey * PK11_ListFixedKeysInSlot(PK11SlotInfo *slot, char *nickname, void *wincx); +PK11SymKey *PK11_GetNextSymKey(PK11SymKey *symKey); /* Key Generation specialized for SDR (fixed DES3 key) */ PK11SymKey *PK11_GenDES3TokenKey(PK11SlotInfo *slot, SECItem *keyid, void *cx); @@ -374,6 +375,7 @@ SECKEYPrivateKeyList* PK11_ListPrivKeysInSlot(PK11SlotInfo *slot, char *nickname, void *wincx); SECKEYPublicKeyList* PK11_ListPublicKeysInSlot(PK11SlotInfo *slot, char *nickname); +SECKEYPQGParams *PK11_GetPQGParamsFromPrivateKey(SECKEYPrivateKey *privKey); /* depricated */ SECKEYPrivateKeyList* PK11_ListPrivateKeysInSlot(PK11SlotInfo *slot); diff --git a/security/nss/lib/pk11wrap/pk11skey.c b/security/nss/lib/pk11wrap/pk11skey.c index 96772f82e..b77b718fb 100644 --- a/security/nss/lib/pk11wrap/pk11skey.c +++ b/security/nss/lib/pk11wrap/pk11skey.c @@ -3007,6 +3007,8 @@ PK11_VerifyRecover(SECKEYPublicKey *key, return SECFailure; } id = PK11_ImportPublicKey(slot,key,PR_FALSE); + } else { + PK11_ReferenceSlot(slot); } session = pk11_GetNewSession(slot,&owner); @@ -3016,6 +3018,7 @@ PK11_VerifyRecover(SECKEYPublicKey *key, if (!owner || !(slot->isThreadSafe)) PK11_ExitSlotMonitor(slot); pk11_CloseSession(slot,session,owner); PORT_SetError( PK11_MapError(crv) ); + PK11_FreeSlot(slot); return SECFailure; } len = dsig->len; @@ -3026,8 +3029,10 @@ PK11_VerifyRecover(SECKEYPublicKey *key, dsig->len = len; if (crv != CKR_OK) { PORT_SetError( PK11_MapError(crv) ); + PK11_FreeSlot(slot); return SECFailure; } + PK11_FreeSlot(slot); return SECSuccess; } @@ -4893,3 +4898,56 @@ PK11_SetPublicKeyNickname(SECKEYPublicKey *pubKey, const char *nickname) return PK11_SetObjectNickname(pubKey->pkcs11Slot, pubKey->pkcs11ID,nickname); } + +SECKEYPQGParams * +PK11_GetPQGParamsFromPrivateKey(SECKEYPrivateKey *privKey) +{ + CK_ATTRIBUTE pTemplate[] = { + { CKA_PRIME, NULL, 0 }, + { CKA_SUBPRIME, NULL, 0 }, + { CKA_BASE, NULL, 0 }, + }; + int pTemplateLen = sizeof(pTemplate)/sizeof(pTemplate[0]); + PRArenaPool *arena = NULL; + SECKEYPQGParams *params; + CK_RV crv; + + + arena = PORT_NewArena(2048); + if (arena == NULL) { + goto loser; + } + params=(SECKEYPQGParams *)PORT_ArenaZAlloc(arena,sizeof(SECKEYPQGParams)); + if (params == NULL) { + goto loser; + } + + crv = PK11_GetAttributes(arena, privKey->pkcs11Slot, privKey->pkcs11ID, + pTemplate, pTemplateLen); + if (crv != CKR_OK) { + PORT_SetError( PK11_MapError(crv) ); + goto loser; + } + + params->arena = arena; + params->prime.data = pTemplate[0].pValue; + params->prime.len = pTemplate[0].ulValueLen; + params->subPrime.data = pTemplate[1].pValue; + params->subPrime.len = pTemplate[1].ulValueLen; + params->base.data = pTemplate[2].pValue; + params->base.len = pTemplate[2].ulValueLen; + + return params; + +loser: + if (arena != NULL) { + PORT_FreeArena(arena,PR_FALSE); + } + return NULL; +} + +PK11SymKey * +PK11_GetNextSymKey(PK11SymKey *symKey) +{ + return symKey ? symKey->next : NULL; +} diff --git a/security/nss/lib/pk11wrap/pk11slot.c b/security/nss/lib/pk11wrap/pk11slot.c index 82a48c68d..76b63971c 100644 --- a/security/nss/lib/pk11wrap/pk11slot.c +++ b/security/nss/lib/pk11wrap/pk11slot.c @@ -3632,10 +3632,10 @@ PK11_GenerateRandom(unsigned char *data,int len) { slot = PK11_GetBestSlot(CKM_FAKE_RANDOM,NULL); if (slot == NULL) return SECFailure; - PK11_EnterSlotMonitor(slot); + if (!slot->isInternal) PK11_EnterSlotMonitor(slot); crv = PK11_GETTAB(slot)->C_GenerateRandom(slot->session,data, (CK_ULONG)len); - PK11_ExitSlotMonitor(slot); + if (!slot->isInternal) PK11_ExitSlotMonitor(slot); PK11_FreeSlot(slot); return (crv != CKR_OK) ? SECFailure : SECSuccess; } diff --git a/security/nss/lib/pki/certdecode.c b/security/nss/lib/pki/certdecode.c index 45bdc1762..fbf0c1d67 100644 --- a/security/nss/lib/pki/certdecode.c +++ b/security/nss/lib/pki/certdecode.c @@ -196,10 +196,6 @@ nssDecodedCert_Destroy /* Of course none of this belongs here */ -struct NSSTimeStr { - PRTime prTime; -}; - /* how bad would it be to have a static now sitting around, updated whenever * this was called? would avoid repeated allocs... */ diff --git a/security/nss/lib/pki/certificate.c b/security/nss/lib/pki/certificate.c index 868c08eaa..93db6807f 100644 --- a/security/nss/lib/pki/certificate.c +++ b/security/nss/lib/pki/certificate.c @@ -716,7 +716,12 @@ nssBestCertificate_SetArgs NSSPolicies *policies ) { - best->time = (timeOpt) ? timeOpt : NSSTime_Now(NULL); + if (timeOpt) { + best->time = timeOpt; + } else { + NSSTime_Now(&best->sTime); + best->time = &best->sTime; + } best->usage = usage; best->policies = policies; best->cert = NULL; @@ -842,3 +847,18 @@ nssCertificateList_DoCallback return PR_SUCCESS; } +static PRStatus add_ref_callback(NSSCertificate *c, void *a) +{ + nssCertificate_AddRef(c); + return PR_SUCCESS; +} + +NSS_IMPLEMENT void +nssCertificateList_AddReferences +( + nssList *certList +) +{ + (void)nssCertificateList_DoCallback(certList, add_ref_callback, NULL); +} + diff --git a/security/nss/lib/pki/cryptocontext.c b/security/nss/lib/pki/cryptocontext.c index 6e8c3a017..f713bcb10 100644 --- a/security/nss/lib/pki/cryptocontext.c +++ b/security/nss/lib/pki/cryptocontext.c @@ -68,6 +68,9 @@ NSSCryptoContext_Destroy NSSCryptoContext *cc ) { + if (cc->certStore) { + nssCertificateStore_Destroy(cc->certStore); + } nssArena_Destroy(cc->arena); return PR_SUCCESS; } diff --git a/security/nss/lib/pki/pki3hack.c b/security/nss/lib/pki/pki3hack.c index 09d103119..189d7f076 100644 --- a/security/nss/lib/pki/pki3hack.c +++ b/security/nss/lib/pki/pki3hack.c @@ -516,6 +516,8 @@ nssDecodedPKIXCertificate_Destroy ) { CERTCertificate *cert = (CERTCertificate *)dc->data; + PRBool freeSlot = cert->ownSlot; + PK11SlotInfo *slot = cert->slot; PRArenaPool *arena = cert->arena; /* zero cert before freeing. Any stale references to this cert * after this point will probably cause an exception. */ @@ -523,6 +525,9 @@ nssDecodedPKIXCertificate_Destroy /* free the arena that contains the cert. */ PORT_FreeArena(arena, PR_FALSE); nss_ZFreeIf(dc); + if (slot && freeSlot) { + PK11_FreeSlot(slot); + } return PR_SUCCESS; } @@ -685,8 +690,6 @@ fill_CERTCertificateFields(NSSCertificate *c, CERTCertificate *cc) if (nssTrust) { cc->trust = cert_trust_from_stan_trust(nssTrust, cc->arena); nssPKIObject_Destroy(&nssTrust->object); - } else { - cc->trust = nssTrust_GetCERTCertTrustForCert(c, cc); } } else if (instance) { /* slot */ @@ -723,7 +726,11 @@ STAN_GetCERTCertificate(NSSCertificate *c) if (cc) { if (!cc->nssCertificate) { fill_CERTCertificateFields(c, cc); - } else if (!cc->trust) { + } else if (!cc->trust && !c->object.cryptoContext) { + /* if it's a perm cert, it might have been stored before the + * trust, so look for the trust again. But a temp cert can be + * ignored. + */ cc->trust = nssTrust_GetCERTCertTrustForCert(c, cc); } } diff --git a/security/nss/lib/pki/pkim.h b/security/nss/lib/pki/pkim.h index 5473c5a1a..566381055 100644 --- a/security/nss/lib/pki/pkim.h +++ b/security/nss/lib/pki/pkim.h @@ -289,6 +289,12 @@ nssCertificateList_DoCallback void *arg ); +NSS_EXTERN void +nssCertificateList_AddReferences +( + nssList *certList +); + NSS_EXTERN PRStatus nssPKIObject_Initialize ( diff --git a/security/nss/lib/pki/pkistore.c b/security/nss/lib/pki/pkistore.c index c2664f15d..38b17ddad 100644 --- a/security/nss/lib/pki/pkistore.c +++ b/security/nss/lib/pki/pkistore.c @@ -55,6 +55,10 @@ static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$"; #include "pkistore.h" #endif /* PKISTORE_H */ +#ifdef NSS_3_4_CODE +#include "cert.h" +#endif + /* * Certificate Store * @@ -182,7 +186,7 @@ add_certificate_entry { PRStatus nssrv; certificate_hash_entry *entry; - entry = nss_ZNEW(store->arena, certificate_hash_entry); + entry = nss_ZNEW(cert->object.arena, certificate_hash_entry); if (!entry) { return PR_FAILURE; } @@ -209,7 +213,7 @@ add_subject_entry nssrv = nssList_AddUnique(subjectList, cert); } else { /* Create a new subject list for the subject */ - subjectList = nssList_Create(store->arena, PR_FALSE); + subjectList = nssList_Create(NULL, PR_FALSE); if (!subjectList) { return PR_FAILURE; } @@ -242,6 +246,10 @@ nssCertificateStore_Add { PRStatus nssrv; PZ_Lock(store->lock); + if (nssHash_Exists(store->issuer_and_serial, cert)) { + PZ_Unlock(store->lock); + return PR_SUCCESS; + } nssrv = add_certificate_entry(store, cert); if (nssrv == PR_SUCCESS) { nssrv = add_subject_entry(store, cert); @@ -290,9 +298,17 @@ remove_subject_entry if (subjectList) { /* Remove the cert from the subject hash */ nssList_Remove(subjectList, cert); + nssHash_Remove(store->subject, &cert->subject); if (nssList_Count(subjectList) == 0) { - nssHash_Remove(store->subject, &cert->subject); nssList_Destroy(subjectList); + } else { + /* The cert being released may have keyed the subject entry. + * Since there are still subject certs around, get another and + * rekey the entry just in case. + */ + NSSCertificate *subjectCert; + (void)nssList_GetArray(subjectList, (void **)&subjectCert, 1); + nssHash_Add(store->subject, &subjectCert->subject, subjectList); } } } @@ -304,8 +320,11 @@ nssCertificateStore_Remove NSSCertificate *cert ) { + certificate_hash_entry *entry; PZ_Lock(store->lock); - if (nssHash_Exists(store->issuer_and_serial, cert)) { + entry = (certificate_hash_entry *) + nssHash_Lookup(store->issuer_and_serial, cert); + if (entry && entry->cert == cert) { remove_certificate_entry(store, cert); remove_subject_entry(store, cert); NSSCertificate_Destroy(cert); /* release the store's reference */ @@ -323,11 +342,15 @@ nssCertificateStore_FindCertificatesBySubject NSSArena *arenaOpt ) { - PRUint32 i, count; + PRUint32 count; NSSCertificate **rvArray = NULL; nssList *subjectList; PZ_Lock(store->lock); subjectList = (nssList *)nssHash_Lookup(store->subject, subject); + if (subjectList) { + /* get references before leaving the store's lock protection */ + nssCertificateList_AddReferences(subjectList); + } PZ_Unlock(store->lock); if (subjectList) { count = nssList_Count(subjectList); @@ -336,14 +359,12 @@ nssCertificateStore_FindCertificatesBySubject } if (rvOpt) { nssList_GetArray(subjectList, (void **)rvOpt, count); - for (i=0; i<count; i++) nssCertificate_AddRef(rvOpt[i]); } else { rvArray = nss_ZNEWARRAY(arenaOpt, NSSCertificate *, count + 1); if (!rvArray) { return (NSSCertificate **)NULL; } nssList_GetArray(subjectList, (void **)rvArray, count); - for (i=0; i<count; i++) nssCertificate_AddRef(rvArray[i]); } } return rvArray; @@ -393,13 +414,17 @@ nssCertificateStore_FindCertificatesByNickname NSSArena *arenaOpt ) { - PRUint32 i, count; + PRUint32 count; NSSCertificate **rvArray = NULL; struct nickname_template_str nt; nt.nickname = nickname; nt.subjectList = NULL; PZ_Lock(store->lock); nssHash_Iterate(store->subject, match_nickname, &nt); + if (nt.subjectList) { + /* get references before leaving the store's lock protection */ + nssCertificateList_AddReferences(nt.subjectList); + } PZ_Unlock(store->lock); if (nt.subjectList) { count = nssList_Count(nt.subjectList); @@ -408,14 +433,12 @@ nssCertificateStore_FindCertificatesByNickname } if (rvOpt) { nssList_GetArray(nt.subjectList, (void **)rvOpt, count); - for (i=0; i<count; i++) nssCertificate_AddRef(rvOpt[i]); } else { rvArray = nss_ZNEWARRAY(arenaOpt, NSSCertificate *, count + 1); if (!rvArray) { return (NSSCertificate **)NULL; } nssList_GetArray(nt.subjectList, (void **)rvArray, count); - for (i=0; i<count; i++) nssCertificate_AddRef(rvArray[i]); } } return rvArray; @@ -464,16 +487,20 @@ nssCertificateStore_FindCertificatesByEmail NSSArena *arenaOpt ) { - PRUint32 i, count; + PRUint32 count; NSSCertificate **rvArray = NULL; struct email_template_str et; et.email = email; - et.emailList = nssList_Create(store->arena, PR_FALSE); + et.emailList = nssList_Create(NULL, PR_FALSE); if (!et.emailList) { return NULL; } PZ_Lock(store->lock); nssHash_Iterate(store->subject, match_email, &et); + if (et.emailList) { + /* get references before leaving the store's lock protection */ + nssCertificateList_AddReferences(et.emailList); + } PZ_Unlock(store->lock); if (et.emailList) { count = nssList_Count(et.emailList); @@ -482,15 +509,13 @@ nssCertificateStore_FindCertificatesByEmail } if (rvOpt) { nssList_GetArray(et.emailList, (void **)rvOpt, count); - for (i=0; i<count; i++) nssCertificate_AddRef(rvOpt[i]); } else { rvArray = nss_ZNEWARRAY(arenaOpt, NSSCertificate *, count + 1); - if (!rvArray) { - return (NSSCertificate **)NULL; + if (rvArray) { + nssList_GetArray(et.emailList, (void **)rvArray, count); } - nssList_GetArray(et.emailList, (void **)rvArray, count); - for (i=0; i<count; i++) nssCertificate_AddRef(rvArray[i]); } + nssList_Destroy(et.emailList); } return rvArray; } @@ -505,46 +530,48 @@ nssCertificateStore_FindCertificateByIssuerAndSerialNumber { certificate_hash_entry *entry; NSSCertificate index; + NSSCertificate *rvCert = NULL; index.issuer = *issuer; index.serial = *serial; PZ_Lock(store->lock); entry = (certificate_hash_entry *) nssHash_Lookup(store->issuer_and_serial, &index); - PZ_Unlock(store->lock); if (entry) { - return nssCertificate_AddRef(entry->cert); + rvCert = nssCertificate_AddRef(entry->cert); } - return NULL; + PZ_Unlock(store->lock); + return rvCert; } -/* XXX Get this to use issuer/serial! */ - -struct der_template_str -{ - NSSDER *encoding; - NSSCertificate *cert; -}; - -static void match_encoding(const void *k, void *v, void *a) +#ifdef NSS_3_4_CODE +static PRStatus +issuer_and_serial_from_encoding +( + NSSBER *encoding, + NSSDER *issuer, + NSSDER *serial +) { - PRStatus nssrv; - NSSCertificate *c; - nssList *subjectList = (nssList *)v; - struct der_template_str *der = (struct der_template_str *)a; - nssListIterator *iter = nssList_CreateIterator(subjectList); - if (iter) { - for (c = (NSSCertificate *)nssListIterator_Start(iter); - c != (NSSCertificate *)NULL; - c = (NSSCertificate *)nssListIterator_Next(iter)) - { - if (nssItem_Equal(&c->encoding, der->encoding, &nssrv)) { - der->cert = c; - } - } - nssListIterator_Finish(iter); - nssListIterator_Destroy(iter); + SECItem derCert, derIssuer, derSerial; + SECStatus secrv; + derCert.data = (unsigned char *)encoding->data; + derCert.len = encoding->size; + secrv = CERT_IssuerNameFromDERCert(&derCert, &derIssuer); + if (secrv != SECSuccess) { + return PR_FAILURE; + } + secrv = CERT_SerialNumberFromDERCert(&derCert, &derSerial); + if (secrv != SECSuccess) { + PORT_Free(derIssuer.data); + return PR_FAILURE; } + issuer->data = derIssuer.data; + issuer->size = derIssuer.len; + serial->data = derSerial.data; + serial->size = derSerial.len; + return PR_SUCCESS; } +#endif NSS_IMPLEMENT NSSCertificate * nssCertificateStore_FindCertificateByEncodedCertificate @@ -553,13 +580,23 @@ nssCertificateStore_FindCertificateByEncodedCertificate NSSDER *encoding ) { - struct der_template_str der; - der.encoding = encoding; - der.cert = NULL; - PZ_Lock(store->lock); - nssHash_Iterate(store->subject, match_encoding, &der); - PZ_Unlock(store->lock); - return nssCertificate_AddRef(der.cert); + PRStatus nssrv = PR_FAILURE; + NSSDER issuer, serial; + NSSCertificate *rvCert = NULL; +#ifdef NSS_3_4_CODE + nssrv = issuer_and_serial_from_encoding(encoding, &issuer, &serial); +#endif + if (nssrv != PR_SUCCESS) { + return NULL; + } + rvCert = nssCertificateStore_FindCertificateByIssuerAndSerialNumber(store, + &issuer, + &serial); +#ifdef NSS_3_4_CODE + PORT_Free(issuer.data); + PORT_Free(serial.data); +#endif + return rvCert; } NSS_EXTERN PRStatus diff --git a/security/nss/lib/pki/pkit.h b/security/nss/lib/pki/pkit.h index d3e2089d2..1806b5ef6 100644 --- a/security/nss/lib/pki/pkit.h +++ b/security/nss/lib/pki/pkit.h @@ -175,7 +175,9 @@ struct NSSCryptoContextStr nssCertificateStore *certStore; }; -struct NSSTimeStr; +struct NSSTimeStr { + PRTime prTime; +}; struct NSSPoliciesStr; diff --git a/security/nss/lib/pki/pkitm.h b/security/nss/lib/pki/pkitm.h index 5f0a323f8..a943fd834 100644 --- a/security/nss/lib/pki/pkitm.h +++ b/security/nss/lib/pki/pkitm.h @@ -99,6 +99,7 @@ typedef struct nssBestCertificateCBStr nssBestCertificateCB; struct nssBestCertificateCBStr { NSSCertificate *cert; NSSTime *time; + NSSTime sTime; /* to avoid allocating when unnecessary */ NSSUsage *usage; NSSPolicies *policies; }; diff --git a/security/nss/lib/pki/tdcache.c b/security/nss/lib/pki/tdcache.c index 5077af584..4d80e8b76 100644 --- a/security/nss/lib/pki/tdcache.c +++ b/security/nss/lib/pki/tdcache.c @@ -123,18 +123,22 @@ struct cache_entry_str } entry; PRUint32 hits; PRTime lastHit; + NSSArena *arena; }; typedef struct cache_entry_str cache_entry; static cache_entry * -new_cache_entry(NSSArena *arena, void *value) +new_cache_entry(NSSArena *arena, void *value, PRBool ownArena) { cache_entry *ce = nss_ZNEW(arena, cache_entry); if (ce) { ce->entry.value = value; ce->hits = 1; ce->lastHit = PR_Now(); + if (ownArena) { + ce->arena = arena; + } } return ce; } @@ -220,6 +224,13 @@ loser: return PR_FAILURE; } +/* The entries of the hashtable are currently dependent on the certificate(s) + * that produced them. That is, the entries will be freed when the cert is + * released from the cache. If there are certs in the cache at any time, + * including shutdown, the hash table entries will hold memory. In order for + * clean shutdown, it is necessary for there to be no certs in the cache. + */ + NSS_IMPLEMENT PRStatus nssTrustDomain_DestroyCache ( @@ -262,18 +273,21 @@ remove_subject_entry ( nssTDCertificateCache *cache, NSSCertificate *cert, - nssList **subjectList + nssList **subjectList, + NSSArena **arena ) { PRStatus nssrv; cache_entry *ce; *subjectList = NULL; + *arena = NULL; /* Get the subject list for the cert's subject */ ce = (cache_entry *)nssHash_Lookup(cache->subject, &cert->subject); if (ce) { /* Remove the cert from the subject hash */ nssList_Remove(ce->entry.list, cert); *subjectList = ce->entry.list; + *arena = ce->arena; nssrv = PR_SUCCESS; #ifdef DEBUG_CACHE log_cert_ref("removed cert", cert); @@ -333,6 +347,10 @@ remove_email_entry */ (void)nssList_Destroy(subjects); nssHash_Remove(cache->email, cert->email); + /* there are no entries left for this address, free space + * used for email entries + */ + nssArena_Destroy(ce->arena); #ifdef DEBUG_CACHE PR_LOG(s_log, PR_LOG_DEBUG, ("removed email %s", cert->email)); #endif @@ -353,6 +371,7 @@ nssTrustDomain_RemoveCertFromCache nssList *subjectList; PRStatus nssrv; cache_entry *ce; + NSSArena *arena; #ifdef DEBUG_CACHE log_cert_ref("attempt to remove cert", cert); #endif @@ -372,7 +391,7 @@ nssTrustDomain_RemoveCertFromCache if (nssrv != PR_SUCCESS) { goto loser; } - nssrv = remove_subject_entry(td->cache, cert, &subjectList); + nssrv = remove_subject_entry(td->cache, cert, &subjectList, &arena); if (nssrv != PR_SUCCESS) { goto loser; } @@ -388,6 +407,12 @@ nssTrustDomain_RemoveCertFromCache #endif (void)nssList_Destroy(subjectList); nssHash_Remove(td->cache->subject, &cert->subject); + /* there are no entries left for this subject, free the space used + * for both the nickname and subject entries + */ + if (arena) { + nssArena_Destroy(arena); + } } PZ_Unlock(td->cache->lock); NSSCertificate_Destroy(cert); /* release the reference */ @@ -463,7 +488,7 @@ add_issuer_and_serial_entry ) { cache_entry *ce; - ce = new_cache_entry(arena, (void *)cert); + ce = new_cache_entry(arena, (void *)cert, PR_FALSE); #ifdef DEBUG_CACHE log_cert_ref("added to issuer/sn", cert); #endif @@ -499,7 +524,7 @@ add_subject_entry if (!list) { return PR_FAILURE; } - ce = new_cache_entry(arena, (void *)list); + ce = new_cache_entry(arena, (void *)list, PR_TRUE); if (!ce) { return PR_FAILURE; } @@ -546,7 +571,7 @@ add_nickname_entry return PR_FAILURE; } else { NSSUTF8 *nickname; - ce = new_cache_entry(arena, subjectList); + ce = new_cache_entry(arena, subjectList, PR_FALSE); if (!ce) { return PR_FAILURE; } @@ -565,7 +590,6 @@ add_nickname_entry static PRStatus add_email_entry ( - NSSArena *arena, nssTDCertificateCache *cache, NSSCertificate *cert, nssList *subjectList @@ -586,27 +610,37 @@ add_email_entry #endif } else { NSSASCII7 *email; + NSSArena *arena; + arena = nssArena_Create(); + if (!arena) { + return PR_FAILURE; + } /* Create a new list of subject lists, add this subject */ subjects = nssList_Create(arena, PR_TRUE); if (!subjects) { + nssArena_Destroy(arena); return PR_FAILURE; } /* Add the new subject to the list */ nssrv = nssList_AddUnique(subjects, subjectList); if (nssrv != PR_SUCCESS) { + nssArena_Destroy(arena); return nssrv; } /* Add the new entry to the cache */ - ce = new_cache_entry(arena, (void *)subjects); + ce = new_cache_entry(arena, (void *)subjects, PR_TRUE); if (!ce) { + nssArena_Destroy(arena); return PR_FAILURE; } email = nssUTF8_Duplicate(cert->email, arena); if (!email) { + nssArena_Destroy(arena); return PR_FAILURE; } nssrv = nssHash_Add(cache->email, email, ce); if (nssrv != PR_SUCCESS) { + nssArena_Destroy(arena); return nssrv; } #ifdef DEBUG_CACHE @@ -625,11 +659,10 @@ add_cert_to_cache NSSCertificate *cert ) { - NSSArena *arena; + NSSArena *arena = NULL; nssList *subjectList; PRStatus nssrv; PRUint32 added = 0; - arena = td->cache->arena; PZ_Lock(td->cache->lock); /* If it exists in the issuer/serial hash, it's already in all */ if (nssHash_Exists(td->cache->issuerAndSN, cert)) { @@ -643,12 +676,17 @@ add_cert_to_cache nss_SetError(NSS_ERROR_CERTIFICATE_IN_CACHE); return PR_FAILURE; } - /* create a new cache entry for this cert */ - nssrv = add_issuer_and_serial_entry(arena, td->cache, cert); + /* create a new cache entry for this cert within the cert's arena*/ + nssrv = add_issuer_and_serial_entry(cert->object.arena, td->cache, cert); if (nssrv != PR_SUCCESS) { goto loser; } added++; + /* create an arena for the nickname and subject entries */ + arena = nssArena_Create(); + if (!arena) { + goto loser; + } /* create a new subject list for this cert, or add to existing */ nssrv = add_subject_entry(arena, td->cache, cert, &subjectList); if (nssrv != PR_SUCCESS) { @@ -667,7 +705,7 @@ add_cert_to_cache added++; } if (cert->email) { - nssrv = add_email_entry(arena, td->cache, cert, subjectList); + nssrv = add_email_entry(td->cache, cert, subjectList); if (nssrv != PR_SUCCESS) { goto loser; } @@ -686,8 +724,8 @@ add_cert_to_cache } #endif } - PZ_Unlock(td->cache->lock); nssCertificate_AddRef(cert); + PZ_Unlock(td->cache->lock); return nssrv; loser: /* Remove any handles that have been created */ @@ -695,7 +733,7 @@ loser: (void)remove_issuer_and_serial_entry(td->cache, cert); } if (added >= 2) { - (void)remove_subject_entry(td->cache, cert, &subjectList); + (void)remove_subject_entry(td->cache, cert, &subjectList, &arena); } if (added == 3 || added == 5) { (void)remove_nickname_entry(td->cache, cert, subjectList); @@ -703,6 +741,9 @@ loser: if (added >= 4) { (void)remove_email_entry(td->cache, cert, subjectList); } + if (arena) { + nssArena_Destroy(arena); + } PZ_Unlock(td->cache->lock); return PR_FAILURE; } @@ -755,13 +796,14 @@ collect_subject_certs { NSSCertificate *c; NSSCertificate **rvArray = NULL; - PRUint32 i, count; + PRUint32 count; + nssCertificateList_AddReferences(subjectList); if (rvCertListOpt) { nssListIterator *iter = nssList_CreateIterator(subjectList); for (c = (NSSCertificate *)nssListIterator_Start(iter); c != (NSSCertificate *)NULL; c = (NSSCertificate *)nssListIterator_Next(iter)) { - nssList_Add(rvCertListOpt, nssCertificate_AddRef(c)); + nssList_Add(rvCertListOpt, c); } nssListIterator_Finish(iter); nssListIterator_Destroy(iter); @@ -772,7 +814,6 @@ collect_subject_certs return (NSSCertificate **)NULL; } nssList_GetArray(subjectList, (void **)rvArray, count); - for (i=0; i<count; i++) nssCertificate_AddRef(rvArray[i]); } return rvArray; } @@ -801,11 +842,9 @@ nssTrustDomain_GetCertsForSubjectFromCache #ifdef DEBUG_CACHE PR_LOG(s_log, PR_LOG_DEBUG, ("... found, %d hits", ce->hits)); #endif - } - PZ_Unlock(td->cache->lock); - if (ce) { rvArray = collect_subject_certs(ce->entry.list, certListOpt); } + PZ_Unlock(td->cache->lock); return rvArray; } @@ -833,11 +872,9 @@ nssTrustDomain_GetCertsForNicknameFromCache #ifdef DEBUG_CACHE PR_LOG(s_log, PR_LOG_DEBUG, ("... found, %d hits", ce->hits)); #endif - } - PZ_Unlock(td->cache->lock); - if (ce) { rvArray = collect_subject_certs(ce->entry.list, certListOpt); } + PZ_Unlock(td->cache->lock); return rvArray; } @@ -855,6 +892,8 @@ nssTrustDomain_GetCertsForEmailAddressFromCache NSSCertificate **rvArray = NULL; cache_entry *ce; nssList *collectList = NULL; + nssListIterator *iter = NULL; + nssList *subjectList; #ifdef DEBUG_CACHE PR_LOG(s_log, PR_LOG_DEBUG, ("looking for cert by email %s", email)); #endif @@ -866,17 +905,24 @@ nssTrustDomain_GetCertsForEmailAddressFromCache #ifdef DEBUG_CACHE PR_LOG(s_log, PR_LOG_DEBUG, ("... found, %d hits", ce->hits)); #endif - } - PZ_Unlock(td->cache->lock); - if (ce) { - nssListIterator *iter; - nssList *subjectList; + /* loop over subject lists and get refs for certs */ if (certListOpt) { collectList = certListOpt; } else { collectList = nssList_Create(NULL, PR_FALSE); + if (!collectList) { + PZ_Unlock(td->cache->lock); + return NULL; + } } iter = nssList_CreateIterator(ce->entry.list); + if (!iter) { + PZ_Unlock(td->cache->lock); + if (!certListOpt) { + nssList_Destroy(collectList); + } + return NULL; + } for (subjectList = (nssList *)nssListIterator_Start(iter); subjectList != (nssList *)NULL; subjectList = (nssList *)nssListIterator_Next(iter)) { @@ -885,6 +931,7 @@ nssTrustDomain_GetCertsForEmailAddressFromCache nssListIterator_Finish(iter); nssListIterator_Destroy(iter); } + PZ_Unlock(td->cache->lock); if (!certListOpt && collectList) { PRUint32 count = nssList_Count(collectList); rvArray = nss_ZNEWARRAY(NULL, NSSCertificate *, count); @@ -923,13 +970,13 @@ nssTrustDomain_GetCertForIssuerAndSNFromCache if (ce) { ce->hits++; ce->lastHit = PR_Now(); - rvCert = ce->entry.cert; + rvCert = nssCertificate_AddRef(ce->entry.cert); #ifdef DEBUG_CACHE PR_LOG(s_log, PR_LOG_DEBUG, ("... found, %d hits", ce->hits)); #endif } PZ_Unlock(td->cache->lock); - return nssCertificate_AddRef(rvCert); + return rvCert; } #ifdef NSS_3_4_CODE @@ -989,7 +1036,7 @@ nssTrustDomain_GetCertByDERFromCache PORT_Free(issuer.data); PORT_Free(serial.data); #endif - return nssCertificate_AddRef(rvCert); + return rvCert; } static void cert_iter(const void *k, void *v, void *a) diff --git a/security/nss/lib/pki/trustdomain.c b/security/nss/lib/pki/trustdomain.c index a4047063e..a84e8c4f4 100644 --- a/security/nss/lib/pki/trustdomain.c +++ b/security/nss/lib/pki/trustdomain.c @@ -903,15 +903,37 @@ static PRStatus traverse_callback(NSSCertificate *c, void *arg) { PRStatus nssrv; struct traverse_arg *ta = (struct traverse_arg *)arg; - nssrv = (*ta->callback)(c, ta->arg); - if (nssrv == PR_SUCCESS) { - NSSTrustDomain *td = NSSCertificate_GetTrustDomain(c); - nssTrustDomain_AddCertsToCache(td, &c, 1); - if (!nssList_Get(ta->cached, c)) { - nssCertificate_AddRef(c); - nssList_Add(ta->cached, c); - } + NSSCertificate *cp = nssCertificate_AddRef(c); + NSSTrustDomain *td = NSSCertificate_GetTrustDomain(c); + /* The cert coming in has been retrieved from a token. It was not in + * the cache when the search was begun. But it may be in the cache now, + * and if it isn't, it will be, because it is going to be cracked into + * a CERTCertificate and fed into the callback. + */ + nssrv = nssTrustDomain_AddCertsToCache(td, &c, 1); + if (!nssList_Get(ta->cached, c)) { + /* add it to the cached list for this search */ + nssCertificate_AddRef(c); + nssList_Add(ta->cached, c); + } + /* This is why the hack of copying the cert was done above. The pointer + * c passed to this function is provided by retrieve_cert. That function + * will destroy the pointer once this function returns. Since c is a local + * copy, there is no way to notify retrieve_cert if it has changed. That + * would happen if the above call to add it to the cache found the cert + * already there. In that case, the pointer c passed to the callback + * below will be the cached cert, and the pointer c that retrieve_cert + * has will be the same as the copy made above. Thus, retrieve_cert will + * destroy the reference to the copy, the callback will use the reference + * to the cached entry, and everyone should be happy. + */ + if (cp == c) { + /* However, if the call to add c to the cache was successful, cp is + * now an extra copy within this function and needs to be destroyed. + */ + NSSCertificate_Destroy(cp); } + nssrv = (*ta->callback)(c, ta->arg); return nssrv; } @@ -940,6 +962,7 @@ NSSTrustDomain_TraverseCertificates nssList *certList; nssTokenCertSearch search; struct traverse_arg ta; + nssListIterator *tokens; certList = nssList_Create(NULL, PR_FALSE); if (!certList) return NULL; (void *)nssTrustDomain_GetCertsFromCache(td, certList); @@ -954,16 +977,25 @@ NSSTrustDomain_TraverseCertificates search.searchType = nssTokenSearchType_TokenOnly; nssCertificateList_DoCallback(certList, traverse_callback, &ta); + /* Must create a local copy of the token list, because the callback + * above may want to traverse the tokens as well. + */ + tokens = nssList_CreateIterator(td->tokenList); + if (!tokens) { + goto cleanup; + } /* traverse the tokens */ - for (token = (NSSToken *)nssListIterator_Start(td->tokens); + for (token = (NSSToken *)nssListIterator_Start(tokens); token != (NSSToken *)NULL; - token = (NSSToken *)nssListIterator_Next(td->tokens)) + token = (NSSToken *)nssListIterator_Next(tokens)) { if (nssToken_SearchCerts(token)) { nssrv = nssToken_TraverseCertificates(token, NULL, &search); } } - nssListIterator_Finish(td->tokens); + nssListIterator_Finish(tokens); + nssListIterator_Destroy(tokens); +cleanup: #ifdef NSS_3_4_CODE nssList_Clear(certList, cert_destructor_with_cache); #else diff --git a/security/nss/lib/smime/config.mk b/security/nss/lib/smime/config.mk index b700ed6a2..ed1e8e596 100644 --- a/security/nss/lib/smime/config.mk +++ b/security/nss/lib/smime/config.mk @@ -52,30 +52,29 @@ IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib RES = $(OBJDIR)/smime.res RESNAME = smime.rc -SHARED_LIBRARY_LIBS = \ - $(DIST)/lib/pkcs12.lib \ - $(DIST)/lib/pkcs7.lib \ - $(NULL) - -SHARED_LIBRARY_DIRS = \ - ../pkcs12 \ - ../pkcs7 \ - $(NULL) - EXTRA_SHARED_LIBS += \ $(DIST)/lib/nss3.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \ $(NULL) + else +EXTRA_SHARED_LIBS += \ + -L$(DIST)/lib/ \ + -lnss3 \ + -lplc4 \ + -lplds4 \ + -lnspr4 \ + $(NULL) + +endif + -# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) -# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. SHARED_LIBRARY_LIBS = \ - $(DIST)/lib/libpkcs12.${LIB_SUFFIX} \ - $(DIST)/lib/libpkcs7.${LIB_SUFFIX} \ + $(DIST)/lib/$(LIB_PREFIX)pkcs12.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)pkcs7.$(LIB_SUFFIX) \ $(NULL) SHARED_LIBRARY_DIRS = \ @@ -83,11 +82,4 @@ SHARED_LIBRARY_DIRS = \ ../pkcs7 \ $(NULL) -EXTRA_SHARED_LIBS += \ - -L$(DIST)/lib/ \ - -lnss3 \ - -lplc4 \ - -lplds4 \ - -lnspr4 \ - $(NULL) -endif + diff --git a/security/nss/lib/softoken/config.mk b/security/nss/lib/softoken/config.mk index f59687af5..df7e328fc 100644 --- a/security/nss/lib/softoken/config.mk +++ b/security/nss/lib/softoken/config.mk @@ -46,30 +46,30 @@ ifdef MOZILLA_CLIENT DEFINES += -DMOZ_CLIENT endif -# can't do this in manifest.mn because OS_ARCH isn't defined there. -ifeq ($(OS_ARCH), WINNT) - -# don't want the 32 in the shared library name -SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll -IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib - -RES = $(OBJDIR)/$(LIBRARY_NAME).res -RESNAME = $(LIBRARY_NAME).rc - # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) -CRYPTOLIB=$(DIST)/lib/freebl.lib +CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) CRYPTODIR=../freebl ifdef MOZILLA_SECURITY_BUILD - CRYPTOLIB=$(DIST)/lib/crypto.lib + CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)crypto.$(LIB_SUFFIX) CRYPTODIR=../crypto endif EXTRA_LIBS += \ $(CRYPTOLIB) \ - $(DIST)/lib/secutil.lib \ - $(DIST)/lib/dbm.lib \ + $(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \ $(NULL) +# can't do this in manifest.mn because OS_ARCH isn't defined there. +ifeq ($(OS_ARCH), WINNT) + +# don't want the 32 in the shared library name +SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll +IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib + +RES = $(OBJDIR)/$(LIBRARY_NAME).res +RESNAME = $(LIBRARY_NAME).rc + ifdef MOZILLA_BSAFE_BUILD EXTRA_LIBS+=$(DIST)/lib/bsafe$(BSAFEVER).lib endif @@ -79,22 +79,11 @@ EXTRA_SHARED_LIBS += \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \ $(NULL) + else -# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) -CRYPTOLIB=$(DIST)/lib/libfreebl.$(LIB_SUFFIX) -CRYPTODIR=../freebl -ifdef MOZILLA_SECURITY_BUILD - CRYPTOLIB=$(DIST)/lib/libcrypto.$(LIB_SUFFIX) - CRYPTODIR=../crypto -endif -EXTRA_LIBS += \ - $(CRYPTOLIB) \ - $(DIST)/lib/libsecutil.$(LIB_SUFFIX) \ - $(DIST)/lib/libdbm.$(LIB_SUFFIX) \ - $(NULL) ifdef MOZILLA_BSAFE_BUILD - EXTRA_LIBS+=$(DIST)/lib/libbsafe.$(LIB_SUFFIX) + EXTRA_LIBS+=$(DIST)/lib/$(LIB_PREFIX)bsafe.$(LIB_SUFFIX) endif # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) diff --git a/security/nss/lib/softoken/pkcs11.c b/security/nss/lib/softoken/pkcs11.c index 10585e447..ca989449a 100644 --- a/security/nss/lib/softoken/pkcs11.c +++ b/security/nss/lib/softoken/pkcs11.c @@ -1983,12 +1983,19 @@ PK11_SlotInit(char *configdir,pk11_token_parameters *params) } #ifdef PKCS11_USE_THREADS - slot->sessionLock = PZ_NewLock(nssILockSession); - if (slot->sessionLock == NULL) return CKR_HOST_MEMORY; + slot->slotLock = PZ_NewLock(nssILockSession); + if (slot->slotLock == NULL) return CKR_HOST_MEMORY; + for (i=0; i < NUMBER_OF_SESSION_LOCKS; i++) { + slot->sessionLock[i] = PZ_NewLock(nssILockSession); + if (slot->sessionLock[i] == NULL) return CKR_HOST_MEMORY; + } slot->objectLock = PZ_NewLock(nssILockObject); if (slot->objectLock == NULL) return CKR_HOST_MEMORY; #else - slot->sessionLock = NULL; + slot->slotLock = NULL; + for (i=0; i < NUMBER_OF_SESSION_LOCKS; i++) { + slot->sessionLock[i] = NULL; + } slot->objectLock = NULL; #endif for(i=0; i < SESSION_HASH_SIZE; i++) { @@ -2067,9 +2074,15 @@ pk11_DestroySlotData(PK11Slot *slot) int i; #ifdef PKCS11_USE_THREADS - if (slot->sessionLock) { - PZ_DestroyLock(slot->sessionLock); - slot->sessionLock = NULL; + if (slot->slotLock) { + PZ_DestroyLock(slot->slotLock); + slot->slotLock = NULL; + } + for (i=0; i < NUMBER_OF_SESSION_LOCKS; i++) { + if (slot->sessionLock[i]) { + PZ_DestroyLock(slot->sessionLock[i]); + slot->sessionLock[i] = NULL; + } } if (slot->objectLock) { PZ_DestroyLock(slot->objectLock); @@ -2665,21 +2678,23 @@ CK_RV NSC_OpenSession(CK_SLOT_ID slotID, CK_FLAGS flags, flags | CKF_SERIAL_SESSION); if (session == NULL) return CKR_HOST_MEMORY; - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(slot->slotLock);) sessionID = slot->sessionIDCount++ | (slot->index << 24); if (slot->readOnly && (flags & CKF_RW_SESSION)) { /* NETSCAPE_SLOT_ID is Read ONLY */ session->info.flags &= ~CKF_RW_SESSION; } - - session->handle = sessionID; - pk11_update_state(slot, session); - pk11queue_add(session, sessionID, slot->head, SESSION_HASH_SIZE); slot->sessionCount++; if (session->info.flags & CKF_RW_SESSION) { slot->rwSessionCount++; } - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(slot->slotLock);) + + PK11_USE_THREADS(PZ_Lock(PK11_SESSION_LOCK(slot,sessionID));) + session->handle = sessionID; + pk11_update_state(slot, session); + pk11queue_add(session, sessionID, slot->head, SESSION_HASH_SIZE); + PK11_USE_THREADS(PZ_Unlock(PK11_SESSION_LOCK(slot,sessionID));) *phSession = sessionID; return CKR_OK; @@ -2692,16 +2707,25 @@ CK_RV NSC_CloseSession(CK_SESSION_HANDLE hSession) PK11Slot *slot; PK11Session *session; SECItem *pw = NULL; + PRBool sessionFound; session = pk11_SessionFromHandle(hSession); if (session == NULL) return CKR_SESSION_HANDLE_INVALID; slot = pk11_SlotFromSession(session); + sessionFound = PR_FALSE; /* lock */ - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(PK11_SESSION_LOCK(slot,hSession));) if (pk11queue_is_queued(session,hSession,slot->head,SESSION_HASH_SIZE)) { + sessionFound = PR_TRUE; pk11queue_delete(session,hSession,slot->head,SESSION_HASH_SIZE); session->refCount--; /* can't go to zero while we hold the reference */ + PORT_Assert(session->refCount > 0); + } + PK11_USE_THREADS(PZ_Unlock(PK11_SESSION_LOCK(slot,hSession));) + + PK11_USE_THREADS(PZ_Lock(slot->slotLock);) + if (sessionFound) { slot->sessionCount--; if (session->info.flags & CKF_RW_SESSION) { slot->rwSessionCount--; @@ -2712,7 +2736,7 @@ CK_RV NSC_CloseSession(CK_SESSION_HANDLE hSession) slot->isLoggedIn = PR_FALSE; slot->password = NULL; } - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(slot->slotLock);) pk11_FreeSession(session); if (pw) SECITEM_ZfreeItem(pw, PR_TRUE); @@ -2732,11 +2756,11 @@ CK_RV NSC_CloseAllSessions (CK_SLOT_ID slotID) if (slot == NULL) return CKR_SLOT_ID_INVALID; /* first log out the card */ - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(slot->slotLock);) pw = slot->password; slot->isLoggedIn = PR_FALSE; slot->password = NULL; - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(slot->slotLock);) if (pw) SECITEM_ZfreeItem(pw, PR_TRUE); /* now close all the current sessions */ @@ -2746,7 +2770,7 @@ CK_RV NSC_CloseAllSessions (CK_SLOT_ID slotID) * will guarrenteed be close, and no session will be partially closed */ for (i=0; i < SESSION_HASH_SIZE; i++) { do { - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(PK11_SESSION_LOCK(slot,i));) session = slot->head[i]; /* hand deque */ /* this duplicates function of NSC_close session functions, but @@ -2756,12 +2780,16 @@ CK_RV NSC_CloseAllSessions (CK_SLOT_ID slotID) slot->head[i] = session->next; if (session->next) session->next->prev = NULL; session->next = session->prev = NULL; + PK11_USE_THREADS(PZ_Unlock(PK11_SESSION_LOCK(slot,i));) + PK11_USE_THREADS(PZ_Lock(slot->slotLock);) slot->sessionCount--; if (session->info.flags & CKF_RW_SESSION) { slot->rwSessionCount--; } + PK11_USE_THREADS(PZ_Unlock(slot->slotLock);) + } else { + PK11_USE_THREADS(PZ_Unlock(PK11_SESSION_LOCK(slot,i));) } - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) if (session) pk11_FreeSession(session); } while (session != NULL); } @@ -2836,12 +2864,12 @@ CK_RV NSC_Login(CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, /* should this be a fixed password? */ if (ulPinLen == 0) { SECItem *pw; - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(slot->slotLock);) pw = slot->password; slot->password = NULL; slot->isLoggedIn = PR_TRUE; slot->ssoLoggedIn = (PRBool)(userType == CKU_SO); - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(slot->slotLock);) pk11_update_all_states(slot); SECITEM_ZfreeItem(pw,PR_TRUE); return CKR_OK; @@ -2861,11 +2889,11 @@ CK_RV NSC_Login(CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, if (nsslowkey_CheckKeyDBPassword(handle,pin) == SECSuccess) { SECItem *tmp; - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(slot->slotLock);) tmp = slot->password; slot->isLoggedIn = PR_TRUE; slot->password = pin; - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(slot->slotLock);) if (tmp) SECITEM_ZfreeItem(tmp, PR_TRUE); /* update all sessions */ @@ -2891,12 +2919,12 @@ CK_RV NSC_Logout(CK_SESSION_HANDLE hSession) if (!slot->isLoggedIn) return CKR_USER_NOT_LOGGED_IN; - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(slot->slotLock);) pw = slot->password; slot->isLoggedIn = PR_FALSE; slot->ssoLoggedIn = PR_FALSE; slot->password = NULL; - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(slot->slotLock);) if (pw) SECITEM_ZfreeItem(pw, PR_TRUE); pk11_update_all_states(slot); diff --git a/security/nss/lib/softoken/pkcs11i.h b/security/nss/lib/softoken/pkcs11i.h index 0efc99068..a42a41794 100644 --- a/security/nss/lib/softoken/pkcs11i.h +++ b/security/nss/lib/softoken/pkcs11i.h @@ -107,13 +107,35 @@ #define ATTRIBUTE_HASH_SIZE 32 #define SESSION_OBJECT_HASH_SIZE 32 #define TOKEN_OBJECT_HASH_SIZE 1024 -#define SESSION_HASH_SIZE 512 +#define SESSION_HASH_SIZE 1024 #define MAX_OBJECT_LIST_SIZE 800 /* how many objects to keep on the free list * before we start freeing them */ #endif #define MAX_KEY_LEN 256 - +/* + * LOG2_BUCKETS_PER_SESSION_LOCK must be a prime number. + * With SESSION_HASH_SIZE=1024, LOG2 can be 9, 5, 1, or 0. + * With SESSION_HASH_SIZE=4096, LOG2 can be 11, 9, 5, 1, or 0. + * + * HASH_SIZE LOG2_BUCKETS_PER BUCKETS_PER_LOCK NUMBER_OF_BUCKETS + * 1024 9 512 2 + * 1024 5 32 32 + * 1024 1 2 512 + * 1024 0 1 1024 + * 4096 11 2048 2 + * 4096 9 512 8 + * 4096 5 32 128 + * 4096 1 2 2048 + * 4096 0 1 4096 + */ +#define LOG2_BUCKETS_PER_SESSION_LOCK 1 +#define BUCKETS_PER_SESSION_LOCK (1 << (LOG2_BUCKETS_PER_SESSION_LOCK)) +#define NUMBER_OF_SESSION_LOCKS (SESSION_HASH_SIZE/BUCKETS_PER_SESSION_LOCK) +/* NOSPREAD sessionID to hash table index macro has been slower. */ +#if 0 +#define NOSPREAD +#endif #ifdef PKCS11_USE_THREADS #define PK11_USE_THREADS(x) x @@ -304,7 +326,6 @@ struct PK11SessionStr { PK11Session *prev; CK_SESSION_HANDLE handle; int refCount; - PZLock *refLock; PZLock *objectLock; int objectIDCount; CK_SESSION_INFO info; @@ -323,7 +344,8 @@ struct PK11SessionStr { */ struct PK11SlotStr { CK_SLOT_ID slotID; - PZLock *sessionLock; + PZLock *slotLock; + PZLock *sessionLock[NUMBER_OF_SESSION_LOCKS]; PZLock *objectLock; SECItem *password; PRBool hasTokens; @@ -428,6 +450,18 @@ struct PK11SSLMACInfoStr { (element)->next = NULL; \ (element)->prev = NULL; \ +/* sessionID (handle) is used to determine session lock bucket */ +#ifdef NOSPREAD +/* NOSPREAD: (ID>>L2LPB) & (perbucket-1) */ +#define PK11_SESSION_LOCK(slot,handle) \ + ((slot)->sessionLock[((handle) >> LOG2_BUCKETS_PER_SESSION_LOCK) \ + & (NUMBER_OF_SESSION_LOCKS-1)]) +#else +/* SPREAD: ID & (perbucket-1) */ +#define PK11_SESSION_LOCK(slot,handle) \ + ((slot)->sessionLock[(handle) & (NUMBER_OF_SESSION_LOCKS-1)]) +#endif + /* expand an attribute & secitem structures out */ #define pk11_attr_expand(ap) (ap)->type,(ap)->pValue,(ap)->ulValueLen #define pk11_item_expand(ip) (ip)->data,(ip)->len diff --git a/security/nss/lib/softoken/pkcs11u.c b/security/nss/lib/softoken/pkcs11u.c index 043225634..423f82b6a 100644 --- a/security/nss/lib/softoken/pkcs11u.c +++ b/security/nss/lib/softoken/pkcs11u.c @@ -2320,11 +2320,11 @@ pk11_update_all_states(PK11Slot *slot) PK11Session *session; for (i=0; i < SESSION_HASH_SIZE; i++) { - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(PK11_SESSION_LOCK(slot,i));) for (session = slot->head[i]; session; session = session->next) { pk11_update_state(slot,session); } - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(PK11_SESSION_LOCK(slot,i));) } } @@ -2371,19 +2371,12 @@ pk11_NewSession(CK_SLOT_ID slotID, CK_NOTIFY notify, CK_VOID_PTR pApplication, session->search = NULL; session->objectIDCount = 1; #ifdef PKCS11_USE_THREADS - session->refLock = PZ_NewLock(nssILockRefLock); - if (session->refLock == NULL) { - PORT_Free(session); - return NULL; - } session->objectLock = PZ_NewLock(nssILockObject); if (session->objectLock == NULL) { - PK11_USE_THREADS(PZ_DestroyLock(session->refLock);) PORT_Free(session); return NULL; } #else - session->refLock = NULL; session->objectLock = NULL; #endif session->objects[0] = NULL; @@ -2415,7 +2408,6 @@ pk11_DestroySession(PK11Session *session) pk11_DeleteObject(session,op->parent); } PK11_USE_THREADS(PZ_DestroyLock(session->objectLock);) - PK11_USE_THREADS(PZ_DestroyLock(session->refLock);) if (session->enc_context) { pk11_FreeContext(session->enc_context); } @@ -2442,10 +2434,10 @@ pk11_SessionFromHandle(CK_SESSION_HANDLE handle) PK11Slot *slot = pk11_SlotFromSessionHandle(handle); PK11Session *session; - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(PK11_SESSION_LOCK(slot,handle));) pk11queue_find(session,handle,slot->head,SESSION_HASH_SIZE); if (session) session->refCount++; - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(PK11_SESSION_LOCK(slot,handle));) return (session); } @@ -2459,10 +2451,10 @@ pk11_FreeSession(PK11Session *session) PRBool destroy = PR_FALSE; PK11_USE_THREADS(PK11Slot *slot = pk11_SlotFromSession(session);) - PK11_USE_THREADS(PZ_Lock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Lock(PK11_SESSION_LOCK(slot,session->handle));) if (session->refCount == 1) destroy = PR_TRUE; session->refCount--; - PK11_USE_THREADS(PZ_Unlock(slot->sessionLock);) + PK11_USE_THREADS(PZ_Unlock(PK11_SESSION_LOCK(slot,session->handle));) if (destroy) pk11_DestroySession(session); } diff --git a/security/nss/lib/ssl/ssl3con.c b/security/nss/lib/ssl/ssl3con.c index ac5ec789c..f080cb134 100644 --- a/security/nss/lib/ssl/ssl3con.c +++ b/security/nss/lib/ssl/ssl3con.c @@ -4463,6 +4463,13 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) errCode = SSL_ERROR_RX_UNEXPECTED_CERT_REQUEST; goto alert_loser; } + + /* clean up anything left from previous handshake. */ + if (ssl3->clientCertChain != NULL) { + CERT_DestroyCertificateList(ssl3->clientCertChain); + ssl3->clientCertChain = NULL; + } + isTLS = (PRBool)(ssl3->prSpec->version > SSL_LIBRARY_VERSION_3_0); rv = ssl3_ConsumeHandshakeVariable(ss, &cert_types, 1, &b, &length); if (rv != SECSuccess) @@ -7947,6 +7954,11 @@ ssl3_DestroySSL3Info(ssl3State *ssl3) if (ssl3->peerCertArena != NULL) ssl3_CleanupPeerCerts(ssl3); + if (ssl3->clientCertChain != NULL) { + CERT_DestroyCertificateList(ssl3->clientCertChain); + ssl3->clientCertChain = NULL; + } + /* clean up handshake */ if (ssl3->hs.md5) { PK11_DestroyContext(ssl3->hs.md5,PR_TRUE); diff --git a/security/nss/lib/util/secport.c b/security/nss/lib/util/secport.c index 94c0937c9..f512e38e3 100644 --- a/security/nss/lib/util/secport.c +++ b/security/nss/lib/util/secport.c @@ -50,6 +50,7 @@ #include "nsslocks.h" #include "secport.h" #include "prvrsion.h" +#include "prenv.h" #ifdef DEBUG #define THREADMARK @@ -265,7 +266,7 @@ PORT_FreeArena(PLArenaPool *arena, PRBool zero) size_t len = sizeof *arena; extern const PRVersionDescription * libVersionPoint(void); static const PRVersionDescription * pvd; - static PRBool doFreeArenaPool; + static PRBool doFreeArenaPool = PR_FALSE; if (ARENAPOOL_MAGIC == pool->magic ) { len = sizeof *pool; @@ -278,7 +279,8 @@ PORT_FreeArena(PLArenaPool *arena, PRBool zero) if ((pvd->vMajor > 4) || (pvd->vMajor == 4 && pvd->vMinor > 1) || (pvd->vMajor == 4 && pvd->vMinor == 1 && pvd->vPatch >= 1)) { - doFreeArenaPool = PR_TRUE; + const char *ev = PR_GetEnv("NSS_DISABLE_ARENA_FREE_LIST"); + if (!ev) doFreeArenaPool = PR_TRUE; } } if (doFreeArenaPool) { diff --git a/security/nss/tests/clean_tbx b/security/nss/tests/clean_tbx new file mode 100755 index 000000000..74d83de4f --- /dev/null +++ b/security/nss/tests/clean_tbx @@ -0,0 +1,174 @@ +#! /bin/perl + +####################################################################### +# +# /u/sonmi/bin/clean_tbx.pl +# +# this script is supposed to remove tinderbox QA if: +# QA has passed, there are 2+ newer QA dirs of the same machine and +# platform (32/64) and it is older than 2 hours +# QA has failed, there are 2+ newer QA dirsof the same machine and +# platform (32/64) with _identical failures and it is older than +# 2 hours +# directory is older than 48 hours +# +####################################################################### + +use Time::Local; + +$ANY_TBX_KEEP_HOURS=48; +$NOT_FAILED_TBX_KEEP_HOURS=24; +$PASSED_TBX_KEEP_HOURS=2; +$IF_TBX_KEEP_HOURS=2; +$PASSED_NEWER_DIRS=2; +$IF_NEWER_DIRS=2; +$verbose = 0; + +$TBX_TESTDIR="/share/builds/mccrel/nss/nsstip/tinderbox/tests_results/security"; +$FTP_STAGE="/u/sonmi/tmp/ftp_stage/tinderbox"; + +@tbx_dirs = (); + +$eANY_TBX_KEEP=$ANY_TBX_KEEP_HOURS*60*60; +$ePASSED_TBX_KEEP=$PASSED_TBX_KEEP_HOURS*60*60; +$eIF_TBX_KEEP=$IF_TBX_KEEP_HOURS*60*60; +$eNOT_FAILED_TBX_KEEP=$NOT_FAILED_TBX_KEEP_HOURS*60*60; + +$days, $hours, $minutes, $seconds; +$efulldate=0; + +$fulldate=0; + +$no_bits=""; +$last_no_bits=""; + +$host=""; +$last_host=""; + +@tbx_dirs = `ls -r $TBX_TESTDIR`; #sort first by host, + #then 64, + #then newest - oldest +debug ("found $#tbx_dirs directories "); + +($seconds, $minutes, $hours, $days, $month, $year) = localtime; + +debug ("$seconds, $minutes, $hours, $days, $month, $year"); + +$enow = timelocal(localtime); + + + +sub debug; +sub warning; +sub error; +sub msg; +sub init; +sub check_tbx_dirs; + + +sub check_tbx_dirs +{ + my $platform_idx=0; # counts directories per platform, newest + # to oldest (ignores incomplete) + my $passed_idx=0; # counts passed directories newest to oldest + my $QAstatus="unknown"; + foreach $tbx_dir (@tbx_dirs) { + $tbx_dir =~ s/\n//g; + $fulldate = $tbx_dir; + $fulldate =~ s/^.*-(20.*-..\...$)/$1/; + $day = $month = $year = $hour = $min = $fulldate; + $host = $tbx_dir; + $host =~ s/-20.*//; + $no_bits = $host; + $host =~ s/64$//; + $no_bits =~ s/.*64$/64/; + $no_bits =~ s/^[^6].*/other/; + $year =~ s/(....).*/$1/; + $month =~ s/....(..).*/$1/; + $day =~ s/......(..).*/$1/; + $hour =~ s/........-(..).*/$1/; + $min =~ s/.*\.(..)$/$1/; + + + if ( -f "$TBX_TESTDIR/$tbx_dir/QAstatus" ) { + $QAstatus=`cat $TBX_TESTDIR/$tbx_dir/QAstatus 2>/dev/null`; + $QAstatus =~ s/\n$//g; + } else { + $QAstatus="unknown"; + } + + $efulldate = timelocal( 0, $min, $hour, $day, $month-1, $year-1900); + if ( "$host" !~ "$last_host" || "$no_bits" !~ "$last_no_bits" ) { + if ( $QAstatus !~ "QA running" ) { + $platform_idx = 0; + } else { + $platform_idx = -1; + } + $passed_idx = 0; + + $last_host = $host; + $last_no_bits = $no_bits; + } else { + $platform_idx ++; + $passed_idx++ if ( $QAstatus =~ "QA passed" ) ; + } + + debug ("$tbx_dir host $host date $fulldate bits $no_bits $year/$month/$day $hour:$min QAstatus $QAstatus pli $platform_idx pai $passed_idx"); + + if ( $passed_idx > $PASSED_NEWER_DIRS && $QAstatus =~ "QA passed" ) { + $ekeeptime=$efulldate + $ePASSED_TBX_KEEP; + #($s, $m, $h, $d, $mo, $y) = localtime($ekeeptime); + #debug ("$passed_idx > $PASSED_NEWER_DIRS ekeeptime ($s, $m, $h, $d, $mo, $y) == $ekeeptime"); + rm_tbx ("Passed $PASSED_TBX_KEEP_HOURS + hours old") if ( $ekeeptime <= $enow ); + } elsif ( $QAstatus !~ "QA failed" ) { + $ekeeptime=$efulldate + $eNOT_FAILED_TBX_KEEP; + rm_tbx ("Not failed $NOT_FAILED_TBX_KEEP_HOURS + hours old") if ( $ekeeptime <= $enow ); + } else { + $ekeeptime=$efulldate + $eANY_TBX_KEEP; + rm_tbx ("Passed 2+ hours old") if ( $ekeeptime <= $enow ); + } + if ( $QAstatus =~ "QA failed" ) { + $ekeeptime=$efulldate + $eIF_TBX_KEEP; + #FIXME - compare to the previous failure by filtering and + #FIXME diffing the results.html files (first grep failed) + } + } + +} + +sub rm_tbx() +{ + +debug ("DELETING $tbx_dir... (@_[0]) "); +system("rm -rf $TBX_TESTDIR/$tbx_dir"); + +} + +sub msg +{ + my $i; + for ($i = 0; $i <= $#_ ; $i++ ) { + print "@_[$i] "; + } + print "\n"; + +} +sub error +{ + msg ("ERROR: " ,@_ ); +} + +sub warning +{ + msg ("WARNING:" ,@_ ); +} +sub debug +{ + if ( $verbose == 1 ) { + msg ("DEBUG: " ,@_ ); + } elsif ( $verbose == 2 ) { + msg (@_ ); + } +} + +check_tbx_dirs; diff --git a/security/nss/tests/header b/security/nss/tests/header index e086eab74..a0b2cc13f 100644 --- a/security/nss/tests/header +++ b/security/nss/tests/header @@ -501,6 +501,8 @@ tbx_dirs() mkdir -p $TESTDIR fi fi + Debug "Making QAstatus file" + echo "QA running" >${TESTDIR}/QAstatus export TESTDIR Debug "RESULTDIR $RESULTDIR TESTDIR $TESTDIR" @@ -1321,7 +1323,18 @@ Exit() fi #chmod a+rw ${RESULTDIR} ${RESULTDIR}/* ${RESULTDIR}/*/* & if [ -n "$O_TBX" -a "$O_TBX" = "ON" ] ; then + rm ${TESTDIR}/QAstatus + + if [ "$1" = "killed... cleaning up..." ] ; then + echo "QA killed" >${TESTDIR}/QAstatus + elif [ "$TBX_EXIT" = 0 ] ; then + echo "QA passed" >${TESTDIR}/QAstatus + else + echo "QA failed" >${TESTDIR}/QAstatus + fi + exit $TBX_EXIT + else exit fi diff --git a/security/nss/tests/smime/smime.sh b/security/nss/tests/smime/smime.sh index 203af47c0..79588c75e 100755 --- a/security/nss/tests/smime/smime.sh +++ b/security/nss/tests/smime/smime.sh @@ -125,10 +125,18 @@ smime_main() ret=$? html_msg $ret 0 "Create Multiple Recipients Enveloped Data Alice" "." if [ $ret != 0 ] ; then - echo "certutil -L -d ${R_ALICEDIR}" - certutil -L -d -d ${R_ALICEDIR} - echo "certutil -L -d ${R_ALICEDIR} -n dave@bogus.com" - certutil -L -d ${R_ALICEDIR} -n dave@bogus.com + i=0 + echo "cp -r ${R_ALICEDIR} ${R_ALICEDIR}.trouble" + cp -r ${R_ALICEDIR} ${R_ALICEDIR}.trouble + while [ $i -lt 100 ] ; do + echo "will attempt to list the certs in the db `expr 100 - $i` more times" + echo "certutil -L -d ${R_ALICEDIR}" + certutil -L -d ${R_ALICEDIR} + echo "certutil -L -d ${R_ALICEDIR} -n dave@bogus.com" + certutil -L -d ${R_ALICEDIR} -n dave@bogus.com + sleep 30 + i=`expr $i + 1` + done fi echo "cmsutil -D -i alicecc.env -d ${R_BOBDIR} -p nss -o alice.data2" diff --git a/security/nss/tests/ssl/ssl.sh b/security/nss/tests/ssl/ssl.sh index 06b672fdf..b7963d505 100755 --- a/security/nss/tests/ssl/ssl.sh +++ b/security/nss/tests/ssl/ssl.sh @@ -114,8 +114,12 @@ is_selfserv_alive() fi fi PID=`cat ${SERVERPID}` - $PS -e | grep $PID >/dev/null || \ - Exit 10 "Fatal - selfserv process not detectable" + #if [ "${OS_ARCH}" = "Linux" ]; then + kill -0 $PID >/dev/null 2>/dev/null || Exit 10 "Fatal - selfserv process not detectable" + #else + #$PS -e | grep $PID >/dev/null || \ + #Exit 10 "Fatal - selfserv process not detectable" + #fi } ########################### wait_for_selfserv ########################## diff --git a/security/nss/tests/ssl/ssl_dist_stress.sh b/security/nss/tests/ssl/ssl_dist_stress.sh index f640b584d..03e5208da 100755 --- a/security/nss/tests/ssl/ssl_dist_stress.sh +++ b/security/nss/tests/ssl/ssl_dist_stress.sh @@ -1,343 +1,344 @@ -#! /bin/sh -# -# 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 Netscape security libraries. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1994-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. -# -# -######################################################################## -# -# mozilla/security/nss/tests/ssl/ssl_dist_stress.sh -# -# Script to test NSS SSL - distributed stresstest - this script needs to -# source the regular ssl.sh (for shellfunctions, certs and variables -# initialisation) -# create certs -# start server -# start itself via rsh on different systems to connect back to the server -# -# -# needs to work on all Unix and Windows platforms -# -# special strings -# --------------- -# FIXME ... known problems, search for this string -# NOTE .... unexpected behavior -# -# FIXME _ don't know yet how long to wait until the server needs to be killed -# especially on NT -# -######################################################################## - -############################## ssl_ds_init ############################# -# local shell function to initialize this script -######################################################################## -ssl_ds_init() -{ - if [ -z "$GLOB_MIN_CERT" ] ; then - GLOB_MIN_CERT=0 - fi - if [ -z "$GLOB_MAX_CERT" ] ; then - GLOB_MAX_CERT=200 - fi - IP_PARAM="" - CD_QADIR_SSL="" - - - if [ -n "$1" ] ; then - ssl_ds_eval_opts $* - fi - SCRIPTNAME=ssl_dist_stress.sh # sourced - $0 would point to all.sh - - if [ -z "${CLEANUP}" ] ; then # if nobody else is responsible for - CLEANUP="${SCRIPTNAME}" # cleaning this script will do it - fi - - ssl_init # let some other script do the hard work (initialize, generate certs, ... - - SCRIPTNAME=ssl_dist_stress.sh - echo "$SCRIPTNAME: SSL distributed stress tests ===============================" - -} - -######################### ssl_ds_usage ################################# -# local shell function to explain the usage -######################################################################## -ssl_ds_usage() -{ - echo "Usage: `basename $1`" - echo " -host hostname " - echo " ...host who runs the server, for distributed stress test" - echo " -stress " - echo " ...runs the server sider of the distributed stress test" - echo " -dir unixdirectory " - echo " ...lets the server side of the distributed stress test" - echo " know where to find the scritp to start on the remote side" - echo " -certnum start-end" - echo " ... provides the range of certs for distributed stress test" - echo " for example -certnum 10-20 will connect 10 times" - echo " no blanks in the range string (not 10 - 20)" - echo " valid range ${GLOB_MIN_CERT}-${GLOB_MAX_CERT}" - echo " -? ...prints this text" - exit 1 #does not need to be Exit, very early in script -} - -######################### ssl_ds_eval_opts ############################# -# local shell function to deal with options and parameters -######################################################################## -ssl_ds_eval_opts() -{ - #use $0 not $SCRIPTNAM<E, too early, SCRIPTNAME not yet set - - while [ -n "$1" ] - do - case $1 in - -host) - BUILD_OPT=1 - export BUILD_OPT - DO_REM_ST="TRUE" - shift - SERVERHOST=$1 - HOST=$1 - if [ -z $SERVERHOST ] ; then - echo "$0 `uname -n`: -host requires hostname" - ssl_ds_usage - fi - echo "$0 `uname -n`: host $HOST ($1)" - ;; - -certn*) - shift - rangeOK=`echo $1 | sed -e 's/[0-9][0-9]*-[0-9][0-9]*/OK/'` - MIN_CERT=`echo $1 | sed -e 's/-[0-9][0-9]*//' -e 's/^00*//'` - MAX_CERT=`echo $1 | sed -e 's/[0-9][0-9]*-//' -e 's/^00*//'` - if [ -z "$rangeOK" -o "$rangeOK" != "OK" -o \ - -z "$MIN_CERT" -o -z "$MAX_CERT" -o \ - "$MIN_CERT" -gt "$MAX_CERT" -o \ - "$MIN_CERT" -lt "$GLOB_MIN_CERT" -o \ - "$MAX_CERT" -gt "$GLOB_MAX_CERT" ] ; then - echo "$0 `uname -n`: -certn range not valid" - ssl_ds_usage - fi - echo "$0 `uname -n`: will use certs from $MIN_CERT to $MAX_CERT" - ;; - -server|-stress|-dist*st*) - BUILD_OPT=1 - export BUILD_OPT - DO_DIST_ST="TRUE" - ;; - -dir|-unixdir|-uxdir|-qadir) - shift - UX_DIR=$1 - #FIXME - we need a default unixdir - if [ -z "$UX_DIR" ] ; then # -o ! -d "$UX_DIR" ] ; then can't do, Win doesn't know... - echo "$0 `uname -n`: -dir requires directoryname " - ssl_ds_usage - fi - CD_QADIR_SSL="cd $UX_DIR" - ;; - -ip*) - shift - IP_ADDRESS=$1 - if [ -z "$IP_ADDRESS" ] ; then - echo "$0 `uname -n`: -ip requires ip-address " - ssl_ds_usage - fi - USE_IP=TRUE - IP_PARAM="-ip $IP_ADDRESS" - ;; - -h|-help|"-?"|*) - ssl_ds_usage - ;; - esac - shift - done -} - -############################## ssl_ds_rem_stress ####################### -# local shell function to perform the client part of the SSL stress test -######################################################################## - -ssl_ds_rem_stress() -{ - testname="SSL remote part of Stress test (`uname -n`)" - echo "$SCRIPTNAME `uname -n`: $testname" - - #cp -r "${CLIENTDIR}" /tmp/ssl_ds.$$ #FIXME - #cd /tmp/ssl_ds.$$ - #verbose="-v" - - cd ${CLIENTDIR} - - CONTINUE=$MAX_CERT - while [ $CONTINUE -ge $MIN_CERT ] - do - echo "strsclnt -D -p ${PORT} -d . -w nss -c 1 $verbose " - echo " -n TestUser$CONTINUE ${HOSTADDR} #`uname -n`" - strsclnt -D -p ${PORT} -d . -w nss -c 1 $verbose \ - -n "TestUser$CONTINUE" ${HOSTADDR} & - #${HOSTADDR} & - CONTINUE=`expr $CONTINUE - 1 ` - #sleep 4 #give process time to start up - done - - html_msg 0 0 "${testname}" #FIXME -} - -######################### ssl_ds_dist_stress ########################### -# local shell function to perform the server part of the new, distributed -# SSL stress test -######################################################################## - -ssl_ds_dist_stress() -{ - max_clientlist=" - box-200 - washer-200 - dryer-200 - hornet-50 - shabadoo-50 - y2sun2-10 - galileo-10 - shame-10 - axilla-10 - columbus-10 - smarch-10 - nugget-10 - charm-10 - hp64-10 - biggayal-10 - orville-10 - kwyjibo-10 - hbombaix-10 - raven-10 - jordan-10 - phaedrus-10 - louie-10 - trex-10 - compaqtor-10" - - #clientlist=" huey-2 dewey-2 hornet-2 shabadoo-2" #FIXME ADJUST - clientlist=" box-200 washer-200 huey-200 dewey-200 hornet-200 shabadoo-200 " - #clientlist="washer-200 huey-200 dewey-200 hornet-200 " - - html_head "SSL Distributed Stress Test" - - testname="SSL distributed Stress test" - - echo cd "${CLIENTDIR}" - cd "${CLIENTDIR}" - if [ -z "CD_QADIR_SSL" ] ; then - CD_QADIR_SSL="cd $QADIR/ssl" - else - cp -r $HOSTDIR $HOSTDIR/../../../../../booboo_Solaris8/mozilla/tests_results/security - fi - - #sparam=" -t 128 -D -r " - sparam=" -t 16 -D -r -r " - start_selfserv - - for c in $clientlist - do - client=`echo $c | sed -e "s/-.*//"` - number=`echo $c | sed -e "s/.*-//"` - CLIENT_OK="TRUE" - echo $client - ping $client >/dev/null || CLIENT_OK="FALSE" - if [ "$CLIENT_OK" = "FALSE" ] ; then - echo "$SCRIPTNAME `uname -n`: $client can't be reached - skipping" - else - get_certrange $number - echo "$SCRIPTNAME `uname -n`: $RSH $client -l svbld \\ " - echo " \" $CD_QADIR_SSL ;ssl_dist_stress.sh \\" - echo " -host $HOST -certnum $CERTRANGE $IP_PARAM \" " - $RSH $client -l svbld \ - " $CD_QADIR_SSL;ssl_dist_stress.sh -host $HOST -certnum $CERTRANGE $IP_PARAM " & - fi - done - - echo cd "${CLIENTDIR}" - cd "${CLIENTDIR}" - - sleep 600 # give the clients time to finish #FIXME ADJUST - - echo "GET /stop HTTP/1.0\n\n" > stdin.txt #check to make sure it has /r/n - echo "tstclnt -h $HOSTADDR -p 8443 -d ${CLIENTDIR} -n TestUser0 " - echo " -w nss -f < stdin.txt" - tstclnt -h $HOSTADDR -p 8443 -d ${CLIENTDIR} -n TestUser0 \ - -w nss -f < stdin.txt - - html_msg 0 0 "${testname}" - html "</TABLE><BR>" -} - -############################ get_certrange ############################# -# local shell function to find the range of certs that the next remote -# client is supposed to use (only for server side of the dist stress test -######################################################################## -get_certrange() -{ - rangeOK=`echo $1 | sed -e 's/[0-9][0-9]*/OK/'` - if [ -z "$rangeOK" -o "$rangeOK" != "OK" -o $1 = "OK" ] ; then - range=10 - echo "$SCRIPTNAME `uname -n`: $1 is not a valid number of certs " - echo " defaulting to 10 for $client" - else - range=$1 - if [ $range -gt $GLOB_MAX_CERT ] ; then - range=$GLOB_MAX_CERT - fi - fi - if [ -z "$FROM_CERT" ] ; then # start new on top of the cert stack - FROM_CERT=$GLOB_MAX_CERT - elif [ `expr $FROM_CERT - $range + 1 ` -lt 0 ] ; then - FROM_CERT=$GLOB_MAX_CERT # dont let it fall below 0 on the TO_CERT - - fi - TO_CERT=`expr $FROM_CERT - $range + 1 ` - if [ $TO_CERT -lt 0 ] ; then # it's not that I'm bad in math, I just - TO_CERT=0 # don't trust expr... - fi - CERTRANGE="${TO_CERT}-${FROM_CERT}" - FROM_CERT=`expr ${TO_CERT} - 1 ` #start the next client one below -} - - -################## main ################################################# - -DO_DIST_ST="TRUE" -. ssl.sh -ssl_ds_init $* -if [ -n "$DO_REM_ST" -a "$DO_REM_ST" = "TRUE" ] ; then - ssl_ds_rem_stress - exit 0 #no cleanup on purpose -elif [ -n "$DO_DIST_ST" -a "$DO_DIST_ST" = "TRUE" ] ; then - ssl_ds_dist_stress -fi -ssl_cleanup +#! /bin/sh
+#
+# 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 Netscape security libraries.
+#
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1994-2000 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the
+# terms of the GNU General Public License Version 2 or later (the
+# "GPL"), in which case the provisions of the GPL are applicable
+# instead of those above. If you wish to allow use of your
+# version of this file only under the terms of the GPL and not to
+# allow others to use your version of this file under the MPL,
+# indicate your decision by deleting the provisions above and
+# replace them with the notice and other provisions required by
+# the GPL. If you do not delete the provisions above, a recipient
+# may use your version of this file under either the MPL or the
+# GPL.
+#
+#
+########################################################################
+#
+# mozilla/security/nss/tests/ssl/ssl_dist_stress.sh
+#
+# Script to test NSS SSL - distributed stresstest - this script needs to
+# source the regular ssl.sh (for shellfunctions, certs and variables
+# initialisation)
+# create certs
+# start server
+# start itself via rsh on different systems to connect back to the server
+#
+#
+# needs to work on all Unix and Windows platforms
+#
+# special strings
+# ---------------
+# FIXME ... known problems, search for this string
+# NOTE .... unexpected behavior
+#
+# FIXME _ don't know yet how long to wait until the server needs to be killed
+# especially on NT
+#
+########################################################################
+
+############################## ssl_ds_init #############################
+# local shell function to initialize this script
+########################################################################
+ssl_ds_init()
+{
+ if [ -z "$GLOB_MIN_CERT" ] ; then
+ GLOB_MIN_CERT=0
+ fi
+ if [ -z "$GLOB_MAX_CERT" ] ; then
+ GLOB_MAX_CERT=200
+ fi
+ IP_PARAM=""
+ CD_QADIR_SSL=""
+
+
+ if [ -n "$1" ] ; then
+ ssl_ds_eval_opts $*
+ fi
+ SCRIPTNAME=ssl_dist_stress.sh # sourced - $0 would point to all.sh
+
+ if [ -z "${CLEANUP}" ] ; then # if nobody else is responsible for
+ CLEANUP="${SCRIPTNAME}" # cleaning this script will do it
+ fi
+
+ ssl_init # let some other script do the hard work (initialize, generate certs, ...
+
+ SCRIPTNAME=ssl_dist_stress.sh
+ echo "$SCRIPTNAME: SSL distributed stress tests ==============================="
+
+}
+
+######################### ssl_ds_usage #################################
+# local shell function to explain the usage
+########################################################################
+ssl_ds_usage()
+{
+ echo "Usage: `basename $1`"
+ echo " -host hostname "
+ echo " ...host who runs the server, for distributed stress test"
+ echo " -stress "
+ echo " ...runs the server sider of the distributed stress test"
+ echo " -dir unixdirectory "
+ echo " ...lets the server side of the distributed stress test"
+ echo " know where to find the scritp to start on the remote side"
+ echo " -certnum start-end"
+ echo " ... provides the range of certs for distributed stress test"
+ echo " for example -certnum 10-20 will connect 10 times"
+ echo " no blanks in the range string (not 10 - 20)"
+ echo " valid range ${GLOB_MIN_CERT}-${GLOB_MAX_CERT}"
+ echo " -? ...prints this text"
+ exit 1 #does not need to be Exit, very early in script
+}
+
+######################### ssl_ds_eval_opts #############################
+# local shell function to deal with options and parameters
+########################################################################
+ssl_ds_eval_opts()
+{
+ #use $0 not $SCRIPTNAM<E, too early, SCRIPTNAME not yet set
+
+ while [ -n "$1" ]
+ do
+ case $1 in
+ -host)
+ BUILD_OPT=1
+ export BUILD_OPT
+ DO_REM_ST="TRUE"
+ shift
+ SERVERHOST=$1
+ HOST=$1
+ if [ -z $SERVERHOST ] ; then
+ echo "$0 `uname -n`: -host requires hostname"
+ ssl_ds_usage
+ fi
+ echo "$0 `uname -n`: host $HOST ($1)"
+ ;;
+ -certn*)
+ shift
+ rangeOK=`echo $1 | sed -e 's/[0-9][0-9]*-[0-9][0-9]*/OK/'`
+ MIN_CERT=`echo $1 | sed -e 's/-[0-9][0-9]*//' -e 's/^00*//'`
+ MAX_CERT=`echo $1 | sed -e 's/[0-9][0-9]*-//' -e 's/^00*//'`
+ if [ -z "$rangeOK" -o "$rangeOK" != "OK" -o \
+ -z "$MIN_CERT" -o -z "$MAX_CERT" -o \
+ "$MIN_CERT" -gt "$MAX_CERT" -o \
+ "$MIN_CERT" -lt "$GLOB_MIN_CERT" -o \
+ "$MAX_CERT" -gt "$GLOB_MAX_CERT" ] ; then
+ echo "$0 `uname -n`: -certn range not valid"
+ ssl_ds_usage
+ fi
+ echo "$0 `uname -n`: will use certs from $MIN_CERT to $MAX_CERT"
+ ;;
+ -server|-stress|-dist*st*)
+ BUILD_OPT=1
+ export BUILD_OPT
+ DO_DIST_ST="TRUE"
+ ;;
+ -dir|-unixdir|-uxdir|-qadir)
+ shift
+ UX_DIR=$1
+ #FIXME - we need a default unixdir
+ if [ -z "$UX_DIR" ] ; then # -o ! -d "$UX_DIR" ] ; then can't do, Win doesn't know...
+ echo "$0 `uname -n`: -dir requires directoryname "
+ ssl_ds_usage
+ fi
+ CD_QADIR_SSL="cd $UX_DIR"
+ ;;
+ -ip*)
+ shift
+ IP_ADDRESS=$1
+ if [ -z "$IP_ADDRESS" ] ; then
+ echo "$0 `uname -n`: -ip requires ip-address "
+ ssl_ds_usage
+ fi
+ USE_IP=TRUE
+ IP_PARAM="-ip $IP_ADDRESS"
+ ;;
+ -h|-help|"-?"|*)
+ ssl_ds_usage
+ ;;
+ esac
+ shift
+ done
+}
+
+############################## ssl_ds_rem_stress #######################
+# local shell function to perform the client part of the SSL stress test
+########################################################################
+
+ssl_ds_rem_stress()
+{
+ testname="SSL remote part of Stress test (`uname -n`)"
+ echo "$SCRIPTNAME `uname -n`: $testname"
+
+ #cp -r "${CLIENTDIR}" /tmp/ssl_ds.$$ #FIXME
+ #cd /tmp/ssl_ds.$$
+ #verbose="-v"
+
+ cd ${CLIENTDIR}
+
+ CONTINUE=$MAX_CERT
+ while [ $CONTINUE -ge $MIN_CERT ]
+ do
+ echo "strsclnt -D -p ${PORT} -d . -w nss -c 1 $verbose "
+ echo " -n TestUser$CONTINUE ${HOSTADDR} #`uname -n`"
+ strsclnt -D -p ${PORT} -d . -w nss -c 1 $verbose \
+ -n "TestUser$CONTINUE" ${HOSTADDR} &
+ #${HOSTADDR} &
+ CONTINUE=`expr $CONTINUE - 1 `
+ #sleep 4 #give process time to start up
+ done
+
+ html_msg 0 0 "${testname}" #FIXME
+}
+
+######################### ssl_ds_dist_stress ###########################
+# local shell function to perform the server part of the new, distributed
+# SSL stress test
+########################################################################
+
+ssl_ds_dist_stress()
+{
+ max_clientlist="
+ box-200
+ washer-200
+ dryer-200
+ hornet-50
+ shabadoo-50
+ y2sun2-10
+ galileo-10
+ shame-10
+ axilla-10
+ columbus-10
+ smarch-10
+ nugget-10
+ charm-10
+ hp64-10
+ biggayal-10
+ orville-10
+ kwyjibo-10
+ hbombaix-10
+ raven-10
+ jordan-10
+ phaedrus-10
+ louie-10
+ trex-10
+ compaqtor-10"
+
+ #clientlist=" huey-2 dewey-2 hornet-2 shabadoo-2" #FIXME ADJUST
+ clientlist=" box-200 washer-200 huey-200 dewey-200 hornet-200 shabadoo-200 louie-200"
+ #clientlist=" box-2 huey-2 "
+ #clientlist="washer-200 huey-200 dewey-200 hornet-200 "
+
+ html_head "SSL Distributed Stress Test"
+
+ testname="SSL distributed Stress test"
+
+ echo cd "${CLIENTDIR}"
+ cd "${CLIENTDIR}"
+ if [ -z "CD_QADIR_SSL" ] ; then
+ CD_QADIR_SSL="cd $QADIR/ssl"
+ else
+ cp -r $HOSTDIR $HOSTDIR/../../../../../booboo_Solaris8/mozilla/tests_results/security
+ fi
+
+ #sparam=" -t 128 -D -r "
+ sparam=" -t 16 -D -r -r -y "
+ start_selfserv
+
+ for c in $clientlist
+ do
+ client=`echo $c | sed -e "s/-.*//"`
+ number=`echo $c | sed -e "s/.*-//"`
+ CLIENT_OK="TRUE"
+ echo $client
+ ping $client >/dev/null || CLIENT_OK="FALSE"
+ if [ "$CLIENT_OK" = "FALSE" ] ; then
+ echo "$SCRIPTNAME `uname -n`: $client can't be reached - skipping"
+ else
+ get_certrange $number
+ echo "$SCRIPTNAME `uname -n`: $RSH $client -l svbld \\ "
+ echo " \" $CD_QADIR_SSL ;ssl_dist_stress.sh \\"
+ echo " -host $HOST -certnum $CERTRANGE $IP_PARAM \" "
+ $RSH $client -l svbld \
+ " $CD_QADIR_SSL;ssl_dist_stress.sh -host $HOST -certnum $CERTRANGE $IP_PARAM " &
+ fi
+ done
+
+ echo cd "${CLIENTDIR}"
+ cd "${CLIENTDIR}"
+
+ sleep 500 # give the clients time to finish #FIXME ADJUST
+
+ echo "GET /stop HTTP/1.0\n\n" > stdin.txt #check to make sure it has /r/n
+ echo "tstclnt -h $HOSTADDR -p 8443 -d ${CLIENTDIR} -n TestUser0 "
+ echo " -w nss -f < stdin.txt"
+ tstclnt -h $HOSTADDR -p 8443 -d ${CLIENTDIR} -n TestUser0 \
+ -w nss -f < stdin.txt
+
+ html_msg 0 0 "${testname}"
+ html "</TABLE><BR>"
+}
+
+############################ get_certrange #############################
+# local shell function to find the range of certs that the next remote
+# client is supposed to use (only for server side of the dist stress test
+########################################################################
+get_certrange()
+{
+ rangeOK=`echo $1 | sed -e 's/[0-9][0-9]*/OK/'`
+ if [ -z "$rangeOK" -o "$rangeOK" != "OK" -o $1 = "OK" ] ; then
+ range=10
+ echo "$SCRIPTNAME `uname -n`: $1 is not a valid number of certs "
+ echo " defaulting to 10 for $client"
+ else
+ range=$1
+ if [ $range -gt $GLOB_MAX_CERT ] ; then
+ range=$GLOB_MAX_CERT
+ fi
+ fi
+ if [ -z "$FROM_CERT" ] ; then # start new on top of the cert stack
+ FROM_CERT=$GLOB_MAX_CERT
+ elif [ `expr $FROM_CERT - $range + 1 ` -lt 0 ] ; then
+ FROM_CERT=$GLOB_MAX_CERT # dont let it fall below 0 on the TO_CERT
+
+ fi
+ TO_CERT=`expr $FROM_CERT - $range + 1 `
+ if [ $TO_CERT -lt 0 ] ; then # it's not that I'm bad in math, I just
+ TO_CERT=0 # don't trust expr...
+ fi
+ CERTRANGE="${TO_CERT}-${FROM_CERT}"
+ FROM_CERT=`expr ${TO_CERT} - 1 ` #start the next client one below
+}
+
+
+################## main #################################################
+
+DO_DIST_ST="TRUE"
+. ssl.sh
+ssl_ds_init $*
+if [ -n "$DO_REM_ST" -a "$DO_REM_ST" = "TRUE" ] ; then
+ ssl_ds_rem_stress
+ exit 0 #no cleanup on purpose
+elif [ -n "$DO_DIST_ST" -a "$DO_DIST_ST" = "TRUE" ] ; then
+ ssl_ds_dist_stress
+fi
+ssl_cleanup
|