+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+include(CheckTypeSize)
+include(CTest)
+
+check_include_files(dlfcn.h HAVE_DLFCN_H)
+check_include_files(inttypes.h HAVE_INTTYPES_H)
+check_include_files(memory.h HAVE_MEMORY_H)
+check_include_files(stdint.h HAVE_STDINT_H)
+check_include_files(stdlib.h HAVE_STDLIB_H)
+check_include_files(strings.h HAVE_STRINGS_H)
+check_include_files(string.h HAVE_STRING_H)
+check_include_files(sys/stat.h HAVE_SYS_STAT_H)
+check_include_files(sys/types.h HAVE_SYS_TYPES_H)
+check_include_files(unistd.h HAVE_UNISTD_H)
+
+check_function_exists(bcopy HAVE_BCOPY)
+check_function_exists(memmove HAVE_MEMMOVE)
+check_function_exists(mmap HAVE_MMAP)
+
+set(CMAKE_EXTRA_INCLUDE_FILES)
+check_type_size(long SIZEOF_LONG)
+check_type_size("long long" LONG_LONG)
+
+configure_file(config-metakit.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-metakit.h)
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
+2015-06-18 ############################################ MK 2.4.9.8
+
+ Consolidate all the changes since the move to GitHub.
+
+2011-08-18 Move code to public repository on GitHub
+
+ The Subversion repository at svn://svn.equi4.com/metakit is now
+ obsolete. GitHub has the new official repository for Metakit.
+
+2009-02-10 Create Python install dir if not yet present
+
+ As with C++ and Tcl, the installation directory is created if
+ it did not exist (patch provided by A. Sampson).
+
+2007-06-25 Various Tcl tweaks (recovered from SVN log)
+
+ Cleanup/overhaul, adding CONST86, stubs, and Tcl_GetErrorLine
+ compatibility to allow compiling Mk4tcl for Tcl 8.6*.
+
+2007-06-24 Tcl TEA3 overhaul
+
+ Replace configure.in/Makefile.in with new versions, adapted from
+ Tcl's sampleextension. Now generates config.h and pkgIndex.tcl
+ from corresponding *.in files.
+
+ Comnvert all tcl/test/ entries to new ones in tcl/tests/ to use
+ the standard tcltest framework. Just 40 tests in all so far.
+
+ Update to tcl.m4 3.6, with a patch to fix "make test" on macosx.
+
+2007-06-24 Cleanup obsolete code
+
+ Remove Lua binding in lua/ - it was never actually completed.
+ Remove win/{catfish,kitviewer,msevc3,msvc152} - now unsupported.
+ Remove mac/, pre-macosx builds are no longer supported.
+ Removed the MKSQL logic and tcl/mksql.tcl, since it is not used.
+
+2007-06-24 Patch for cygwin
+
+ There's a submitted patch (F152) which tries to fix a problem
+ when compilng MK on cygwin with CXXFLAGS=-mno-cygwin, but it may
+ not be the best way to fix things. Instead, this change adds the
+ $(LDFLAGS) parameter in a few places in the Makefile. It was not
+ used before, and $(SHLIB_FLAGS) still isn't being used - weird.
+
+2007-06-18 Fix threading problems in Mk4tcl
+
+ A change is needed to make the thread fix work with mk::loop,
+ because the _ws pointer could be null in FreeCursorInternalRep.
+ Fixed by no longer clearing _ws and changing a test for that case.
+
+2007-06-16 ############################################ MK 2.4.9.7
+
+ If you're using Tcl in threaded mode, please upgrade - see below.
+
+2007-06-16 Fix threading problems in Mk4tcl
+
+ The Mk4tcl binding had two serious bugs, causing potential crashes
+ and database corruption when used in multi-threaded mode:
+
+ 1) The Makefile did not set -DTCL_THREADS when configured with
+ the "--enable-threads" flag, only -Dq4_MULTI, which is the C++
+ level threading support of Metakit. So all builds were still
+ running the Mk4tcl wrapper in unprotected mode (!).
+
+ 2) Tcl's type conversion callbacks did not contain mutex calls to
+ prevent calls from Tcl into Mk4tcl other than mk::* commands.
+ This happens during "Tcl_ObjType mkCursorType" type conversions.
+
+ Added the proper -DTCL_THREADS flag to Makefile.in, and extra code
+ to implement recursive mutex protection on top of Tcl's primitives.
+
+ This problem does not affect the C++ core (which has been in use in
+ threaded mode for some time, on many platforms including Windows),
+ nor the Mk4py binding for Python which uses a global interp lock.
+
+2007-02-12 Continue unmapped, also in debug mode
+
+ In the WIN32 version of ResetFileMapping, there were two assertions
+ which made the code fail in debug builds, even though both cases are
+ properly handled with if's. Dropped the asserts, so that the logic
+ is the same as in release builds: when memory mapping fails, simply
+ continue without memory mapping and fall back to buffering all data.
+
2006-11-15 ############################################ MK 2.4.9.6
Please upgrade, this consolidates a year with various fixes.
-The Metakit Library 2.4.9.6 Nov 2006
+The Metakit Library 2.4.9.8 Jun 2015
==============================================================================
TCL/TK - The MK extension for Tcl is called "Mk4tcl". It is being used in a
number of commercial projects. The source is in directory "tcl/".
-LICENSE AND SUPPORT - Metakit is now distributed as open source software (the
- X/MIT-style license is at the end of this document). Commercial support
- is available through an Enterprise License, see the URL mentioned below.
+LICENSE AND SUPPORT - Metakit is distributed as open source software (see the
+ X/MIT-style license at the end of this document). Commercial support is
+ available through an Enterprise License, see the URL mentioned below.
DOCUMENTATION - All documentation uses HTML. The main page is "Metakit.html",
which leads to the rest of the documentation in the "doc/" directory.
Homepage: http://www.equi4.com/metakit.html
Python news: http://www.equi4.com/metakit/python.html
Tcl/Tk news: http://www.equi4.com/metakit/tcl.html
- License info: http://www.equi4.com/mklicense.html
- Contact info: http://www.equi4.com/contact.html
+ License info: http://www.equi4.com/metakit/license.html
+ Contact info: http://www.equi4.com/about/contact.html
ACKNOWLEDGEMENTS - Thanks to everyone who has helped shape and extend Metakit,
including Kyrill Denisenko, Mark Roseman, Gordon McMillan, Matt Newman,
the flags don't seem to create proper executables. That's ok though, the
.o files are fat, which is all setup.py needs.
-TCL - Nov 2006
+TCL - Jun 2007
- The unix/configure works better for Tcl than for Python, due to the stubs
- interface. In many cases, adding --with-tcl or --with-tcl=<dir-of-tcl.h>
- will produce a Mk4tcl.so (or a Mk4tcl.dylib on Mac OS X).
-
- Alternately, you could use the TEA3-based tcl/configure script. It needs
- a few preliminary steps to get a proper config.h file in the right spot:
- cd builds
- sh ../unix/configure
- cd ../tcl
- ln -s ../builds/config.h
- sh configure
+ The Tcl build has been converted to use the TEA3-based configure script
+ in the tcl/ directory. The way to build Mk4tcl is now as follows:
+
+ mkdir tbuild # can be anywhere, really...
+ cd tbuild
+ CC=g++ sh ../tcl/configure
make
- There are still some issues, the above generates a lot of warning errors.
- Note that this does not depend on .o files in ../builds, just config.h
+ make test
+ make install
+
+ This build configuration has not yet been tested with non-gcc compilers.
+ There are no dependencies on the C++ build process, nor the builds/ dir.
- Note: for Windows CE, the tcl.configure script has been successfully used
- using EVC3. One trick is that in tcl/configure.in, "TEA_ADD_CFLAGS([])"
- has to be changed to "TEA_ADD_CFLAGS([-Dq4_WINCE])".
+ Note: for Windows CE, an older version of the tcl.configure script was
+ successfully used with MS EVC3. One trick is that in tcl/configure.in,
+ "TEA_ADD_CFLAGS([])" has to be changed to "TEA_ADD_CFLAGS([-Dq4_WINCE])".
UNIX (ALSO MAC OS X)
efficiency on x86 hardware: "-O2 -m486 -malign-loops=2 -malign-jumps=2".
I have not yet tried this myself, but am passing on the tip.
-MACINTOSH CLASSIC
-
- The Mac version requires Metrowerks CodeWarrior 6. See the info above
- in the Windows section (MWCW is multi-platform). The projects are all
- located in the "mac/" folder, which is also where MWCW will place its own
- "... Data" folders with intermediate results. As with all other setups,
- final results are made to end up in the "builds/" directory.
-
LICENSE AND COPYRIGHT STATEMENT
===============================
-Copyright (c) 1996-2006 Jean-Claude Wippler
+Copyright (c) 1996-2007 Jean-Claude Wippler
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
==============================================================================
--- Jean-Claude Wippler <jcw@equi4.com>
+-- Jean-Claude Wippler <jc@wippler.nl>
// mk4.h --
-// $Id: mk4.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
#ifndef __MK4_H__
#define __MK4_H__
+#include <stdint.h>
+
//---------------------------------------------------------------------------
//
// TITLE
//---------------------------------------------------------------------------
/// Current release = 100 * major + 10 * minor + maintenance
-#define d4_MetakitLibraryVersion 249 // 2.4.9.6 release, Nov 15, 2006
+#define d4_MetakitLibraryVersion 249 // 2.4.9.8 release, Jun 18, 2015
#define d4_MetaKitLibraryVersion d4_MetakitLibraryVersion // compat, yuck
//---------------------------------------------------------------------------
#define d4_inline
#endif
-typedef unsigned char t4_byte; // create typedefs for t4_byte, etc.
-
-#if q4_LONG64
-typedef int t4_i32; // if longs are 64b, then int must be 32b
-#else
-typedef long t4_i32; // if longs aren't 64b, then they are 32b
-#endif
-
-#if q4_LONG64 // choose a way to represent 64b integers
-typedef long t4_i64;
-#elif defined (LONG_LONG)
-typedef LONG_LONG t4_i64;
-#elif HAVE_LONG_LONG
-typedef long long t4_i64;
-#else
-struct t4_i64 {
- long l1;
- long l2;
-};
-bool operator == (const t4_i64 a_, const t4_i64 b_);
-bool operator < (const t4_i64 a_, const t4_i64 b_);
-#endif
+typedef uint8_t t4_byte; // create typedefs for t4_byte, etc.
+typedef int32_t t4_i32; // if longs are 64b, then int must be 32b
+typedef int64_t t4_i64;
//---------------------------------------------------------------------------
// mk4.inl --
-// $Id: mk4.inl 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
d4_inline bool operator< (c4_Cursor a_, c4_Cursor b_)
{
return a_._seq < b_._seq ||
- a_._seq == b_._seq && a_._index < b_._index;
+ (a_._seq == b_._seq && a_._index < b_._index);
}
d4_inline bool operator> (c4_Cursor a_, c4_Cursor b_)
// mk4dll.h --
-// $Id: mk4dll.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
//
// Import declarations for DLLs
// mk4io.h --
-// $Id: mk4io.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// mk4str.h --
-// $Id: mk4str.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// mk4str.inl --
-// $Id: mk4str.inl 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
-Copyright (c) 1996-2004 Jean-Claude Wippler
+Copyright (c) 1996-2015 Jean-Claude Wippler
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
// borc.h --
-// $Id: borc.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// column.cpp --
-// $Id: column.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
bool c4_Column::UsesMap(const t4_byte *ptr_)const {
// the most common falsifying case is checked first
- return _persist != 0 && ptr_ >= Strategy()._mapStart && Strategy()._dataSize
- != 0 && // added 2003-05-08, thx V DeMarco
- ptr_ < Strategy()._mapStart + Strategy()._dataSize;
+ return _persist != 0 &&
+ ptr_ >= Strategy()._mapStart &&
+ Strategy()._dataSize != 0 &&
+ ptr_ < Strategy()._mapStart + Strategy()._dataSize;
}
bool c4_Column::RequiresMap()const {
// move the gap up, ie. some bytes down
MoveGapUp(pos_);
else if (_gap > pos_)
- // move the gap down, ie. some bytes up
- if (_gap - pos_ > _size - _gap + fSegRest(pos_)) {
- RemoveGap(); // it's faster to get rid of the gap instead
- _gap = pos_;
- } else
- // normal case, move some bytes up
- MoveGapDown(pos_);
+ {
+ // move the gap down, ie. some bytes up
+ if (_gap - pos_ > _size - _gap + fSegRest(pos_)) {
+ RemoveGap(); // it's faster to get rid of the gap instead
+ _gap = pos_;
+ } else
+ // normal case, move some bytes up
+ MoveGapDown(pos_);
+ }
d4_assert(_gap == pos_);
_currWidth = (1 << l2bp1) >> 1;
- if (l2bp1 > 4 && (_mustFlip || Persist() != 0 && Strategy()._bytesFlipped))
+ if (l2bp1 > 4 && (_mustFlip || (Persist() != 0 && Strategy()._bytesFlipped)))
l2bp1 += 3;
// switch to the trailing entries for byte flipping
// column.h --
-// $Id: column.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// column.inl --
-// $Id: column.inl 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// custom.cpp --
-// $Id: custom.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
int r = _base.GetAt(row_);
if (col_ >= _subPos)
- if (col_ >= _subPos + _subWidth) {
- col_ -= _subWidth - 1;
- } else {
- v = _sub(_parent[r]);
- r = _offset.GetAt(row_);
- if (r < 0)
- return false;
- // if this is a null row in an outer join
-
- col_ = v.FindProperty(_template.NthProperty(col_).GetId());
- if (col_ < 0)
- return false;
- // if subview doesn't have all properties
+ {
+ if (col_ >= _subPos + _subWidth) {
+ col_ -= _subWidth - 1;
+ } else {
+ v = _sub(_parent[r]);
+ r = _offset.GetAt(row_);
+ if (r < 0)
+ return false;
+ // if this is a null row in an outer join
+
+ col_ = v.FindProperty(_template.NthProperty(col_).GetId());
+ if (col_ < 0)
+ return false;
+ // if subview doesn't have all properties
+ }
}
return v.GetItem(r, col_, buf_);
// custom.h --
-// $Id: custom.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// derived.cpp --
-// $Id: derived.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
bool includeRow = r >= 0;
if (!pass)
- if (nf_._type == c4_Notifier::kSetAt) {
- d4_assert(nf_._cursor != 0);
- includeRow = Match(nf_._cursor->_index, *nf_._cursor->_seq);
+ {
+ if (nf_._type == c4_Notifier::kSetAt) {
+ d4_assert(nf_._cursor != 0);
+ includeRow = Match(nf_._cursor->_index, *nf_._cursor->_seq);
+ }
+ else
+ // set just one property, and it's not in a row yet
+ includeRow = MatchOne(nf_._propId, *nf_._bytes);
}
- else
- // set just one property, and it's not in a row yet
- includeRow = MatchOne(nf_._propId, *nf_._bytes);
if (r >= 0 && !includeRow)
chg->StartRemoveAt(r, 1);
bool includeRow = r >= 0;
if (!pass)
- if (nf_._type == c4_Notifier::kSetAt) {
- d4_assert(nf_._cursor != 0);
- includeRow = Match(nf_._cursor->_index, *nf_._cursor->_seq);
+ {
+ if (nf_._type == c4_Notifier::kSetAt) {
+ d4_assert(nf_._cursor != 0);
+ includeRow = Match(nf_._cursor->_index, *nf_._cursor->_seq);
+ }
+ else
+ // set just one property, and it's not in a row yet
+ includeRow = MatchOne(nf_._propId, *nf_._bytes);
}
- else
- // set just one property, and it's not in a row yet
- includeRow = MatchOne(nf_._propId, *nf_._bytes);
if (r >= 0 && !includeRow)
_rowMap.RemoveAt(r);
// derived.h --
-// $Id: derived.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// doxy.h --
-// $Id: doxy.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @mainpage Metakit API Reference
// field.cpp --
-// $Id: field.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// field.h --
-// $Id: field.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// field.inl --
-// $Id: field.inl 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// fileio.cpp --
-// $Id: fileio.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
FlushFileBuffers((HANDLE)_get_osfhandle(_fileno(_file)));
HANDLE h = ::CreateFileMapping((HANDLE)_get_osfhandle(_fileno(_file)), 0,
PAGE_READONLY, 0, len, 0);
- d4_assert(h); // check for errors, but can continue without mapping
if (h) {
_mapStart = (t4_byte*)::MapViewOfFile(h, FILE_MAP_READ, 0, 0, len);
- d4_assert(_mapStart != 0);
if (_mapStart != 0) {
_mapStart += _baseOffset;
// format.cpp --
-// $Id: format.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// as is, and so do memos which have not been modified
int rows = _memos.GetSize() + 1; // avoids divide by zero
- return length_ > 10000 || length_ > 100 && length_ > 1000000 / rows;
+ return length_ > 10000 || (length_ > 100 && length_ > 1000000 / rows);
}
int c4_FormatB::ItemLenOffCol(int index_, t4_i32 &off_, c4_Column * &col_) {
_memos.SetAt(index_, col);
if (n > 0)
- if (_data.IsDirty()) {
- c4_Bytes temp;
- _data.FetchBytes(start, n, temp, true);
- col->SetBuffer(n);
- col->StoreBytes(0, temp);
- } else
- col->SetLocation(_data.Position() + start, n);
+ {
+ if (_data.IsDirty()) {
+ c4_Bytes temp;
+ _data.FetchBytes(start, n, temp, true);
+ col->SetBuffer(n);
+ col->StoreBytes(0, temp);
+ } else
+ col->SetLocation(_data.Position() + start, n);
+ }
}
return col;
// both _sizeCol and _memoCol will be clean again when it has
// but be careful because dirty flag is only useful if size is nonzero
if (_recalc && !ar_.Serializing())
- _recalc = _sizeCol.ColSize() > 0 && _sizeCol.IsDirty() || _memoCol.ColSize()
- > 0 && _memoCol.IsDirty();
+ _recalc = (_sizeCol.ColSize() > 0 && _sizeCol.IsDirty())
+ || (_memoCol.ColSize() > 0 && _memoCol.IsDirty());
}
/////////////////////////////////////////////////////////////////////////////
// format.h --
-// $Id: format.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// gnuc.h --
-// $Id: gnuc.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// handler.cpp --
-// $Id: handler.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// handler.h --
-// $Id: handler.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// handler.inl --
-// $Id: handler.inl 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// header.h --
-// $Id: header.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
/////////////////////////////////////////////////////////////////////////////
-#include <config-akregator.h>
-
+#include <config-metakit.h>
+#include <stdint.h>
/////////////////////////////////////////////////////////////////////////////
// A number of preprocessor options are used in the source code
//
extern void f4_memmove(void *d, const void *s, int n);
#endif
-typedef unsigned char t4_byte; // create typedefs for t4_byte, etc.
-
-#if SIZEOF_LONG == 8
-typedef int t4_i32; // longs are 64b, so int must be 32b
-#else
-typedef long t4_i32; // longs aren't 64b, so they are 32b
-#endif
+typedef uint8_t t4_byte; // create typedefs for t4_byte, etc.
+typedef int32_t t4_i32; // longs are 64b, so int must be 32b
/////////////////////////////////////////////////////////////////////////////
// Include header files which contain additional os/cpu/ide/fw specifics
// mfc.h --
-// $Id: mfc.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// msvc.h --
-// $Id: msvc.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// mwcw.h --
-// $Id: mwcw.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// persist.cpp --
-// $Id: persist.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// persist.h --
-// $Id: persist.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// remap.cpp --
-// $Id: remap.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
/* We use ~hash_ instead of hash_, as degenerate hash functions, such
as for ints <sigh>, can have lots of leading zeros. It's not
really a performance risk, but better safe than sorry. */
- if (IsUnused(i) || Hash(i) == hash_ && KeySame(Row(i), cursor_))
+ if (IsUnused(i) || (Hash(i) == hash_ && KeySame(Row(i), cursor_)))
return i;
int freeslot = IsDummy(i) ? i : - 1;
while (--n >= 0) {
int v = _mapProp(_map[n]);
if (v >= pos_)
+ {
if (v < pos_ + count_)
_map.RemoveAt(n);
else
_mapProp(_map[n]) = v - count_;
+ }
}
return true;
// remap.h --
-// $Id: remap.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// std.cpp --
-// $Id: std.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// std.h --
-// $Id: std.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// store.cpp --
-// $Id: store.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// store.h --
-// $Id: store.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// store.inl --
-// $Id: store.inl 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// string.cpp --
-// $Id: string.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
}
bool operator == (const c4_String &a, const c4_String &b) {
- return a._value == b._value || a.GetLength() == b.GetLength() && memcmp
- (a.Data(), b.Data(), a.GetLength()) == 0;
+ return a._value == b._value || (a.GetLength() == b.GetLength() && memcmp
+ (a.Data(), b.Data(), a.GetLength()) == 0);
}
int c4_String::Compare(const char *str)const {
// table.cpp --
-// $Id: table.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// univ.cpp --
-// $Id: univ.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// univ.h --
-// $Id: univ.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// univ.inl --
-// $Id: univ.inl 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
// view.cpp --
-// $Id: view.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file
// viewx.cpp --
-// $Id: viewx.cpp 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, see http://www.equi4.com/metakit.html
/** @file
offset = (offset << 8) + mark[j];
const bool isSkipTail = ((mark[0] & 0xF0) == 0x90 /* 2006-11-11 */ ||
- mark[0] == 0x80 && count == 0) && offset > 0;
+ (mark[0] == 0x80 && count == 0)) && offset > 0;
const bool isCommitTail = mark[0] == 0x80 && count > 0 && offset > 0;
const bool isHeader = (mark[0] == 'J' || mark[0] == 'L') && (mark[0] ^
mark[1]) == ('J' ^ 'L') && mark[2] == 0x1A && (mark[3] & 0x40) == 0;
// win.h --
-// $Id: win.h 1258 2007-03-09 16:48:38Z jcw $
+// $Id$
// This is part of Metakit, the homepage is http://www.equi4.com/metakit.html
/** @file