Bug 1399756 - fix typos in db/ using codespell. rs=comment-only,typo-fix a=jorgk
authorJorg K <jorgk@jorgk.com>
Tue, 20 Mar 2018 00:32:05 +0100
changeset 31320 502c294f53bab26443da3a4997629f23b70669a6
parent 31317 3568dcc5e0aadf365b87f749641eaeb0106ac609
child 31321 e8f902aac0b0dc1ab894220b2280dec75d7799cc
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewerscomment-only, typo-fix, jorgk
bugs1399756
Bug 1399756 - fix typos in db/ using codespell. rs=comment-only,typo-fix a=jorgk [skip-blame]
db/mork/public/mdb.h
db/mork/src/morkAtomSpace.h
db/mork/src/morkHandle.h
db/mork/src/morkNode.cpp
db/mork/src/morkParser.h
db/mork/src/morkPool.h
db/mork/src/morkStore.cpp
db/mork/src/morkStore.h
db/mork/src/morkStream.cpp
db/mork/src/morkTable.cpp
db/mork/src/morkTable.h
db/mork/src/morkWriter.h
db/mork/src/morkZone.h
--- a/db/mork/public/mdb.h
+++ b/db/mork/public/mdb.h
@@ -299,17 +299,17 @@ typedef void (* mdbYarn_mGrow)(mdbYarn* 
 **| implies Buf contains US-ASCII iso-8859-1 Latin1 string content.
 **|
 **|| mYarn_Grow: either a mdbYarn_mGrow method, or else nil.  When
 **| a mdbYarn_mGrow method is provided, this method can be used to
 **| request a yarn buf size increase.  A caller who constructs the
 **| original mdbYarn instance decides whether a grow method is necessary
 **| or desirable, and uses only grow methods suitable for the buffering
 **| nature of a specific mdbYarn instance.  (For example, Buf might be a
-**| staticly allocated string space which switches to something heap-based
+**| statically allocated string space which switches to something heap-based
 **| when grown, and subsequent calls to grow the yarn must distinguish the
 **| original static string from heap allocated space, etc.) Note that the
 **| method stored in mYarn_Grow can change, and this might be a common way
 **| to track memory managent changes in policy for mYarn_Buf.
 |*/
 #ifndef mdbYarn_struct
 #define mdbYarn_struct 1
 struct mdbYarn { // buffer with caller space allocation semantics
@@ -1252,17 +1252,17 @@ public:
 **| rows, and cells, etc.  The most important policy to specify is which sets
 **| of changes are considered associated in a manner such that they should be
 **| applied together atomically to a given store.  We call each such group of
 **| changes a transaction.  We handle three different grades of transaction,
 **| but they differ only in semantic significance to the application, and are
 **| not intended to nest.  (If small transactions were nested inside large
 **| transactions, that would imply that a single large transaction must be
 **| atomic over all the contained small transactions; but actually we intend
-**| smalls transaction never be undone once commited due to, say, aborting a
+**| smalls transaction never be undone once committed due to, say, aborting a
 **| transaction of greater significance.)  The small, large, and session level
 **| commits have equal granularity, and differ only in risk of loss from the
 **| perspective of an application.  Small commits characterize changes that
 **| can be lost with relatively small risk, so small transactions can delay
 **| until later if they are expensive or impractical to commit.  Large commits
 **| involve changes that would probably inconvenience users if lost, so the
 **| need to pay costs of writing is rather greater than with small commits.
 **| Session commits are last ditch attempts to save outstanding changes before
@@ -1270,23 +1270,23 @@ public:
 **| in time to save changes that have been delayed due to possible high cost.
 **| If large commits are never delayed, then a session commit has about the
 **| same performance effect as another large commit; but if small and large
 **| commits are always delayed, then a session commit is likely to be rather
 **| expensive as a runtime cost compared to any earlier database usage.
 **|
 **|| aborts: the only way to abort changes to a store is by closing the store.
 **| So there is no specific method for causing any abort.  Stores must discard
-**| all changes made that are uncommited when a store is closed.  This design
+**| all changes made that are uncommitted when a store is closed.  This design
 **| choice makes the implementations of tables, rows, and cells much less
 **| complex because they need not maintain a record of undobable changes.  When
 **| a store is closed, presumably this precipitates the closure of all tables,
 **| rows, and cells in the store as well.   So an application can revert the
 **| state of a store in the user interface by quietly closing and reopening a
-**| store, because this will discard uncommited changes and show old content.
+**| store, because this will discard uncommitted changes and show old content.
 **| This implies an app that closes a store will need to send a "scramble"
 **| event notification to any views that depend on old discarded content.
 |*/
 
 #define NS_IMDBSTORE_IID_STR "74d6218d-44b0-43b5-9ebe-69a17dfb562c"
 #define NS_IMDBSTORE_IID \
 {0x74d6218d, 0x44b0, 0x43b5, \
 {0x9e, 0xbe, 0x69, 0xa1, 0x7d, 0xfb, 0x56, 0x2c}}
@@ -1336,17 +1336,17 @@ public:
   NS_IMETHOD NewRowWithOid(nsIMdbEnv* ev, // new row w/ caller assigned oid
     const mdbOid* inOid,   // caller assigned oid
     nsIMdbRow** acqRow) = 0; // create new row
 
   NS_IMETHOD NewRow(nsIMdbEnv* ev, // new row with db assigned oid
     mdb_scope inRowScope,   // row scope for row ids
     nsIMdbRow** acqRow) = 0; // create new row
   // Note this row must be added to some table or cell child before the
-  // store is closed in order to make this row persist across sesssions.
+  // store is closed in order to make this row persist across sessions.
 
   // } ----- end row methods -----
 
   // { ----- begin inport/export methods -----
   NS_IMETHOD ImportContent( // import content from port
     nsIMdbEnv* ev, // context
     mdb_scope inRowScope, // scope for rows (or zero for all?)
     nsIMdbPort* ioPort, // the port with content to add to store
@@ -1891,17 +1891,17 @@ public:
     nsIMdbEnv* ev, // context
     mdb_column inColumn, // often same as nsIMdbSorting::GetSortColumn()
     nsIMdbSorting* ioSorting) = 0; // requested sorting for some column
     // SetSearchSorting() attempts to inform the table that ioSorting
     // should be used during calls to FindRowMatches() for searching
     // the column which is actually sorted by ioSorting.  This method
     // is most useful in conjunction with nsIMdbSorting::SetCompare(),
     // because otherwise a caller would not be able to override the
-    // comparison ordering method used during searchs.  Note that some
+    // comparison ordering method used during searches.  Note that some
     // database implementations might be unable to use an arbitrarily
     // specified sort order, either due to schema or runtime interface
     // constraints, in which case ioSorting might not actually be used.
     // Presumably ioSorting is an instance that was returned from some
     // earlier call to nsIMdbTable::GetSorting().  A caller can also
     // use nsIMdbTable::SearchColumnsHint() to specify desired change
     // in which columns are sorted and searched by FindRowMatches().
     //
@@ -2398,17 +2398,17 @@ public:
   //
   // AliasYarn() is specifically intended as the first step in transferring
   // content from nsIMdbBlob to a nsString representation, without forcing extra
   // allocations and/or memory copies. (A standard nsIMdbBlob_AsString() utility
   // will use AliasYarn() as the first step in setting a nsString instance.)
   //
   // This is an alternative to the GetYarn() method, which has copy semantics
   // only; AliasYarn() relaxes a robust safety principle only for performance
-  // reasons, to accomodate the need for callers to transform text content to
+  // reasons, to accommodate the need for callers to transform text content to
   // some other canonical representation that would necessitate an additional
   // copy and transformation when such is incompatible with the mdbYarn format.
   //
   // The implementation of AliasYarn() should have extremely little overhead
   // besides the virtual dispatch to the method implementation, and the code
   // necessary to populate all the mdbYarn member slots with internal buffer
   // address and metainformation that describes the buffer content.  Note that
   // mYarn_Grow must always be set to nil to indicate no resizing is allowed.
--- a/db/mork/src/morkAtomSpace.h
+++ b/db/mork/src/morkAtomSpace.h
@@ -40,17 +40,17 @@
 
 #define morkAtomSpace_kMaxSevenBitAid 0x7F  /* low seven bit integer ID */
 
 /*| kMinOverId: the smallest ID we auto-assign to the 'over' namespace that
 **| might include very large numbers of tokens that are used infrequently,
 **| so that we care less whether the shortest hex representation is used.
 **| So we start all IDs for 'over' category tokens at a value range that
 **| needs at least four hex digits, so we can reserve three hex digits and
-**| shorter for more commonly occuring tokens in the 'under' category.
+**| shorter for more commonly occurring tokens in the 'under' category.
 |*/
 #define morkAtomSpace_kMinOverId 0x1000  /* using at least four hex bytes */
 
 #define morkDerived_kAtomSpace  /*i*/ 0x6153 /* ascii 'aS' */
 
 #define morkAtomSpace_kColumnScope ((mork_scope) 'c') /* column scope is forever */
 
 /*| morkAtomSpace:
--- a/db/mork/src/morkHandle.h
+++ b/db/mork/src/morkHandle.h
@@ -141,17 +141,17 @@ public: // typesafe refcounting inlines 
 
 #define morkHandleFrame_kPadSlotCount 4
 
 /*| morkHandleFrame: an object format used for allocating and maintaining
 **| instances of morkHandle, with leading slots used to maintain this in a
 **| linked list, and following slots to provide extra footprint that might
 **| be needed by any morkHandle subclasses that include very little extra
 **| space (by virtue of the fact that each morkHandle subclass is expected
-**| to multiply inherit from another base class that has only abstact methods
+**| to multiply inherit from another base class that has only abstract methods
 **| for space overhead related only to some vtable representation).
 |*/
 class morkHandleFrame {
 public:
   morkLink    mHandleFrame_Link;    // list storage without trampling Handle
   morkHandle  mHandleFrame_Handle;
   mork_ip     mHandleFrame_Padding[ morkHandleFrame_kPadSlotCount ];
 
--- a/db/mork/src/morkNode.cpp
+++ b/db/mork/src/morkNode.cpp
@@ -216,17 +216,17 @@ nsresult morkNode::CloseMdbObject(morkEn
     }
   }
   return outErr;
 }
 
 /*public virtual*/
 morkNode::~morkNode() // assert that CloseNode() executed earlier
 {
-  MORK_ASSERT(this->IsShutNode() || IsDeadNode()); // sometimes we call destructor explictly w/o freeing object.
+  MORK_ASSERT(this->IsShutNode() || IsDeadNode()); // sometimes we call destructor explicitly w/o freeing object.
   mNode_Access = morkAccess_kDead;
   mNode_Usage = morkUsage_kNone;
 }
 
 /*public virtual*/
 // void CloseMorkNode(morkEnv* ev) = 0; // CloseNode() only if open
   // CloseMorkNode() is the polymorphic close method called when uses==0,
   // which must do NOTHING at all when IsOpenNode() is not true.  Otherwise,
--- a/db/mork/src/morkParser.h
+++ b/db/mork/src/morkParser.h
@@ -180,17 +180,17 @@ public: // inlines
 
 #define morkParser_kMinGranularity 512 /* parse at least half 0.5K at once */
 #define morkParser_kMaxGranularity (64 * 1024) /* parse at most 64 K at once */
 
 #define morkDerived_kParser     /*i*/ 0x5073 /* ascii 'Ps' */
 #define morkParser_kTag     /*i*/ 0x70417253 /* ascii 'pArS' */
 
 // These are states for the simple parsing virtual machine.  Needless to say,
-// these must be distinct, and preferrably in a contiguous integer range.
+// these must be distinct, and preferably in a contiguous integer range.
 // Don't change these constants without looking at switch statements in code.
 #define morkParser_kCellState      0 /* cell is tightest scope */
 #define morkParser_kMetaState      1 /* meta is tightest scope */
 #define morkParser_kRowState       2 /* row is tightest scope */
 #define morkParser_kTableState     3 /* table is tightest scope */
 #define morkParser_kDictState      4 /* dict is tightest scope */
 #define morkParser_kPortState      5 /* port is tightest scope */
 
--- a/db/mork/src/morkPool.h
+++ b/db/mork/src/morkPool.h
@@ -25,17 +25,17 @@ class morkHandleFrame;
 class morkHandleFace; // just an opaque cookie type
 class morkBigBookAtom;
 class morkFarBookAtom;
 
 #define morkDerived_kPool     /*i*/ 0x706C /* ascii 'pl' */
 
 /*| morkPool: a place to manage pools of non-node objects that are memory
 **| managed out of large chunks of space, so that per-object management
-**| space overhead has no signficant cost.
+**| space overhead has no significant cost.
 |*/
 class morkPool : public morkNode {
 
 // public: // slots inherited from morkNode (meant to inform only)
   // nsIMdbHeap*       mNode_Heap;
 
   // mork_base      mNode_Base;     // must equal morkBase_kNode
   // mork_derived   mNode_Derived;  // depends on specific node subclass
--- a/db/mork/src/morkStore.cpp
+++ b/db/mork/src/morkStore.cpp
@@ -2084,17 +2084,17 @@ morkStore::NewRowWithOid(nsIMdbEnv* mev,
   return outErr;
 }
 
 NS_IMETHODIMP
 morkStore::NewRow(nsIMdbEnv* mev, // new row with db assigned oid
   mdb_scope inRowScope,   // row scope for row ids
   nsIMdbRow** acqRow) // create new row
 // Note this row must be added to some table or cell child before the
-// store is closed in order to make this row persist across sesssions.
+// store is closed in order to make this row persist across sessions.
 {
   nsresult outErr = NS_OK;
   nsIMdbRow* outRow = 0;
   morkEnv* ev = CanUseStore(mev, /*inMutable*/ morkBool_kFalse, &outErr);
   if ( ev )
   {
     morkRow* row = NewRow(ev, inRowScope);
     if ( row && ev->Good() )
--- a/db/mork/src/morkStore.h
+++ b/db/mork/src/morkStore.h
@@ -407,17 +407,17 @@ public: // other port methods
   NS_IMETHOD NewRowWithOid(nsIMdbEnv* ev, // new row w/ caller assigned oid
     const mdbOid* inOid,   // caller assigned oid
     nsIMdbRow** acqRow) override; // create new row
 
   NS_IMETHOD NewRow(nsIMdbEnv* ev, // new row with db assigned oid
     mdb_scope inRowScope,   // row scope for row ids
     nsIMdbRow** acqRow) override; // create new row
   // Note this row must be added to some table or cell child before the
-  // store is closed in order to make this row persist across sesssions.
+  // store is closed in order to make this row persist across sessions.
 
   // } ----- end row methods -----
 
   // { ----- begin inport/export methods -----
   NS_IMETHOD ImportContent( // import content from port
     nsIMdbEnv* ev, // context
     mdb_scope inRowScope, // scope for rows (or zero for all?)
     nsIMdbPort* ioPort, // the port with content to add to store
@@ -640,17 +640,17 @@ public: // dynamic type identification
   { return IsNode() && mNode_Derived == morkDerived_kStore; }
 // } ===== end morkNode methods =====
 
 public: // typing
   static void NonStoreTypeError(morkEnv* ev);
   static void NilStoreFileError(morkEnv* ev);
   static void CannotAutoAssignAtomIdentityError(morkEnv* ev);
 
-public: //  store utilties
+public: //  store utilities
 
   morkAtom* YarnToAtom(morkEnv* ev, const mdbYarn* inYarn, bool createIfMissing = true);
   morkAtom* AddAlias(morkEnv* ev, const morkMid& inMid,
     mork_cscode inForm);
 
 public: // other store methods
 
   void RenumberAllCollectableContent(morkEnv* ev);
--- a/db/mork/src/morkStream.cpp
+++ b/db/mork/src/morkStream.cpp
@@ -405,20 +405,20 @@ morkStream::Length(morkEnv* ev) const //
 
 void morkStream::NewBadCursorSlotsError(morkEnv* ev) const
 { ev->NewError("bad stream cursor slots"); }
 
 void morkStream::NewNullStreamBufferError(morkEnv* ev) const
 { ev->NewError("null stream buffer"); }
 
 void morkStream::NewCantReadSinkError(morkEnv* ev) const
-{ ev->NewError("cant read stream sink"); }
+{ ev->NewError("can't read stream sink"); }
 
 void morkStream::NewCantWriteSourceError(morkEnv* ev) const
-{ ev->NewError("cant write stream source"); }
+{ ev->NewError("can't write stream source"); }
 
 void morkStream::NewPosBeyondEofError(morkEnv* ev) const
 { ev->NewError("stream pos beyond eof"); }
 
 void morkStream::NewBadCursorOrderError(morkEnv* ev) const
 { ev->NewError("bad stream cursor order"); }
 
 NS_IMETHODIMP
--- a/db/mork/src/morkTable.cpp
+++ b/db/mork/src/morkTable.cpp
@@ -792,17 +792,17 @@ morkTable::SetSearchSorting( // use this
   nsIMdbEnv* mev, // context
   mdb_column inColumn, // often same as nsIMdbSorting::GetSortColumn()
   nsIMdbSorting* ioSorting) // requested sorting for some column
   // SetSearchSorting() attempts to inform the table that ioSorting
   // should be used during calls to FindRowMatches() for searching
   // the column which is actually sorted by ioSorting.  This method
   // is most useful in conjunction with nsIMdbSorting::SetCompare(),
   // because otherwise a caller would not be able to override the
-  // comparison ordering method used during searchs.  Note that some
+  // comparison ordering method used during searches.  Note that some
   // database implementations might be unable to use an arbitrarily
   // specified sort order, either due to schema or runtime interface
   // constraints, in which case ioSorting might not actually be used.
   // Presumably ioSorting is an instance that was returned from some
   // earlier call to nsIMdbTable::GetSorting().  A caller can also
   // use nsIMdbTable::SearchColumnsHint() to specify desired change
   // in which columns are sorted and searched by FindRowMatches().
   //
--- a/db/mork/src/morkTable.h
+++ b/db/mork/src/morkTable.h
@@ -327,17 +327,17 @@ public: // state is public because the e
     nsIMdbEnv* ev, // context
     mdb_column inColumn, // often same as nsIMdbSorting::GetSortColumn()
     nsIMdbSorting* ioSorting) override; // requested sorting for some column
     // SetSearchSorting() attempts to inform the table that ioSorting
     // should be used during calls to FindRowMatches() for searching
     // the column which is actually sorted by ioSorting.  This method
     // is most useful in conjunction with nsIMdbSorting::SetCompare(),
     // because otherwise a caller would not be able to override the
-    // comparison ordering method used during searchs.  Note that some
+    // comparison ordering method used during searches.  Note that some
     // database implementations might be unable to use an arbitrarily
     // specified sort order, either due to schema or runtime interface
     // constraints, in which case ioSorting might not actually be used.
     // Presumably ioSorting is an instance that was returned from some
     // earlier call to nsIMdbTable::GetSorting().  A caller can also
     // use nsIMdbTable::SearchColumnsHint() to specify desired change
     // in which columns are sorted and searched by FindRowMatches().
     //
--- a/db/mork/src/morkWriter.h
+++ b/db/mork/src/morkWriter.h
@@ -61,17 +61,17 @@
 #define morkWriter_kPhaseStoreRowSpacesTables 6 /*mWriter_StoreRowSpacesIter*/
 #define morkWriter_kPhaseRowSpaceTables       7 /*mWriter_RowSpaceTablesIter*/
 #define morkWriter_kPhaseTableRowArray        8 /*mWriter_TableRowArrayPos */
 
 #define morkWriter_kPhaseStoreRowSpacesRows   9 /*mWriter_StoreRowSpacesIter*/
 #define morkWriter_kPhaseRowSpaceRows        10 /*mWriter_RowSpaceRowsIter*/
 
 #define morkWriter_kPhaseContentDone         11 /* all content written */
-#define morkWriter_kPhaseWritingDone         12 /* everthing has been done */
+#define morkWriter_kPhaseWritingDone         12 /* everything has been done */
 
 #define morkWriter_kCountNumberOfPhases      13 /* part of mWrite_TotalCount */
 
 #define morkWriter_kMaxColumnNameSize        128 /* longest writable col name */
 
 #define morkWriter_kMaxIndent 66 /* default value for mWriter_MaxIndent */
 #define morkWriter_kMaxLine   78 /* default value for mWriter_MaxLine */
 
--- a/db/mork/src/morkZone.h
+++ b/db/mork/src/morkZone.h
@@ -163,17 +163,17 @@ public: // typing & errors
 |*/
 #define morkZone_kNewHunkSize ((mork_size) (64 * 1024)) /* 64K per hunk */
 
 /*| kMaxFreeVolume: some number of bytes of free space in the free hunk list
 **| over which we no longer want to add more free hunks to the list, for fear
 **| of accumulating too much unused, fragmented free space.  This should be a
 **| small multiple of kNewHunkSize, say about two to four times as great, to
 **| allow for no more free hunk space than fits in a handful of new hunks.
-**| This strategy will let us usefuly accumulate "some" free space in the
+**| This strategy will let us usefully accumulate "some" free space in the
 **| free hunk list, but without accumulating "too much" free space that way.
 |*/
 #define morkZone_kMaxFreeVolume (morkZone_kNewHunkSize * 3)
 
 /*| kMaxHunkWaste: if a current request is larger than this, and we cannot
 **| satisfy the request with the current hunk, then we just allocate the
 **| block from the heap without changing the current hunk.  Basically this
 **| number represents the largest amount of memory we are willing to waste,