From c503eece31ce6011a7ee7f89882399cad0701704 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 13 Aug 2021 13:58:42 -0700 Subject: [PATCH] spell check --- documentation/value.rst | 2 +- example/ticker.cpp | 2 +- src/bitmask.h | 8 ++++---- src/clientconn.cpp | 4 ++-- src/clientget.cpp | 4 ++-- src/clientimpl.h | 4 ++-- src/clientmon.cpp | 2 +- src/clientreq.cpp | 2 +- src/dataencode.cpp | 2 +- src/dataimpl.h | 4 ++-- src/nt.cpp | 2 +- src/pvaproto.h | 4 ++-- src/pvrequest.cpp | 2 +- src/pvxs/sharedArray.h | 2 +- src/server.cpp | 2 +- src/serverchan.cpp | 4 ++-- src/serverconn.cpp | 6 +++--- src/serverget.cpp | 2 +- src/serverintrospect.cpp | 4 ++-- src/servermon.cpp | 6 +++--- src/sharedarray.cpp | 2 +- src/util.cpp | 2 +- test/testmon.cpp | 2 +- test/testput.cpp | 2 +- test/testpvreq.cpp | 8 ++++---- 25 files changed, 42 insertions(+), 42 deletions(-) diff --git a/documentation/value.rst b/documentation/value.rst index 41b2c9c..49840f7 100644 --- a/documentation/value.rst +++ b/documentation/value.rst @@ -67,7 +67,7 @@ All operations on an invalid Value should be safe and well defined. .. code-block:: c++ Value top(nt::NTScalar{TypeCode::Int32}.create()); - int32_t val = top["nonexistant"].as(); + int32_t val = top["nonexistent"].as(); In this example, the operator[] lookup of a non-existant field returns an invalid Value. Attempting to extract an integer from this will then throw a `pvxs::NoField` exception. diff --git a/example/ticker.cpp b/example/ticker.cpp index d5bb99d..3e8f6f8 100644 --- a/example/ticker.cpp +++ b/example/ticker.cpp @@ -38,7 +38,7 @@ int main(int argc, char* argv[]) size_t idx=0; delay = 1.0/std::stod(argv[argc-1], &idx); if(idx BitMask(const detail::BitBase& expr) { resize(expr.size()); @@ -208,7 +208,7 @@ public: _words[i] = expr.word(i); } - // evaulate expression + // evaluate expression template BitMask& operator=(const detail::BitBase& expr) { resize(expr.size()); @@ -217,7 +217,7 @@ public: return *this; } - // evaulate expression + // evaluate expression template BitMask& operator|=(const detail::BitBase& expr) { resize(expr.size()); @@ -226,7 +226,7 @@ public: return *this; } - // evaulate expression + // evaluate expression template BitMask& operator&=(const detail::BitBase& expr) { resize(expr.size()); diff --git a/src/clientconn.cpp b/src/clientconn.cpp index 33f7b2c..6024c07 100644 --- a/src/clientconn.cpp +++ b/src/clientconn.cpp @@ -329,7 +329,7 @@ void Connection::handle_CREATE_CHANNEL() chan->statRx += rxlen; if(!sts.isSuccess()) { - // server refuses to create a channel, but presumably responded positivly to search + // server refuses to create a channel, but presumably responded positively to search chan->state = Channel::Searching; context->searchBuckets[context->currentBucket].push_back(chan); @@ -378,7 +378,7 @@ void Connection::handle_DESTROY_CHANNEL() { auto it = chanBySID.find(sid); if(it==chanBySID.end() || !(chan = it->second.lock())) { - log_debug_printf(io, "Server %s destroys non-existant channel %u:%u\n", + log_debug_printf(io, "Server %s destroys non-existent channel %u:%u\n", peerName.c_str(), unsigned(cid), unsigned(sid)); return; } diff --git a/src/clientget.cpp b/src/clientget.cpp index 3b42f23..61537e2 100644 --- a/src/clientget.cpp +++ b/src/clientget.cpp @@ -400,7 +400,7 @@ void Connection::handle_GPR(pva_app_msg_t cmd) bool init = subcmd&0x08; bool get = subcmd&0x40; - // immediately deserialize in unambigous cases + // immediately deserialize in unambiguous cases if(M.good() && cmd!=CMD_RPC && init && sts.isSuccess()) { // INIT of PUT or GET, decode type description @@ -436,7 +436,7 @@ void Connection::handle_GPR(pva_app_msg_t cmd) lvl = Level::Err; } - log_printf(io, lvl, "Server %s uses non-existant IOID %u. Ignoring...\n", + log_printf(io, lvl, "Server %s uses non-existent IOID %u. Ignoring...\n", peerName.c_str(), unsigned(ioid)); return; } diff --git a/src/clientimpl.h b/src/clientimpl.h index a9f3491..062d328 100644 --- a/src/clientimpl.h +++ b/src/clientimpl.h @@ -154,7 +154,7 @@ struct ConnectImpl : public Connect struct Channel { const std::shared_ptr context; const std::string name; - // Our choosen ID for this channel. + // Our chosen ID for this channel. // used as persistent CID and searchID const uint32_t cid; @@ -173,7 +173,7 @@ struct Channel { // channel created with .server() to bypass normal search process SockAddr forcedServer; - // when state==Searching, number of repeatitions + // when state==Searching, number of repetitions size_t nSearch = 0u; // GUID of last positive reply when state!=Searching diff --git a/src/clientmon.cpp b/src/clientmon.cpp index abcad71..b0cf73f 100644 --- a/src/clientmon.cpp +++ b/src/clientmon.cpp @@ -393,7 +393,7 @@ void Connection::handle_MONITOR() lvl = Level::Err; } - log_printf(io, lvl, "Server %s uses non-existant IOID %u. Ignoring...\n", + log_printf(io, lvl, "Server %s uses non-existent IOID %u. Ignoring...\n", peerName.c_str(), unsigned(ioid)); return; } diff --git a/src/clientreq.cpp b/src/clientreq.cpp index e1b9298..421c2ce 100644 --- a/src/clientreq.cpp +++ b/src/clientreq.cpp @@ -171,7 +171,7 @@ struct PVRParser input++; if(start==input) - throw std::runtime_error("invalid charactor near: "+std::string(start)); + throw std::runtime_error("invalid character near: "+std::string(start)); lexval = std::string(start, input-start); diff --git a/src/dataencode.cpp b/src/dataencode.cpp index ad85ff4..811eb67 100644 --- a/src/dataencode.cpp +++ b/src/dataencode.cpp @@ -184,7 +184,7 @@ void from_wire(Buffer& buf, std::vector& descs, TypeStore& cache, uns name+='.'; if(code.code==TypeCode::Struct && code==cfld.code) { - // copy descendant indicies for sub-struct + // copy descendant indices for sub-struct for(auto& pair : cfld.mlookup) { fld.mlookup[name+pair.first] = cindex - cref + pair.second; } diff --git a/src/dataimpl.h b/src/dataimpl.h index 36dd219..cbbca86 100644 --- a/src/dataimpl.h +++ b/src/dataimpl.h @@ -44,11 +44,11 @@ struct Buffer; /** Describes a single field, leaf or otherwise, in a nested structure. * - * FieldDesc are always stored depth first as a contigious array, + * FieldDesc are always stored depth first as a contiguous array, * with offset to descendant fields given as positive integers relative * to the current field. (not possible to jump _back_) * - * We deal with indicies in this FieldDesc array. found in FieldDesc::mlookup + * We deal with indices in this FieldDesc array. found in FieldDesc::mlookup * and FieldDesc::miter Relative to current position in FieldDesc array. (aka this+n) */ struct FieldDesc { diff --git a/src/nt.cpp b/src/nt.cpp index 994e8c7..6f70f0d 100644 --- a/src/nt.cpp +++ b/src/nt.cpp @@ -38,7 +38,7 @@ TypeDef NTScalar::build() const using namespace pvxs::members; if(!value.valid() || value.kind()==Kind::Compound) - throw std::logic_error("NTScalar only permits (array of) primative"); + throw std::logic_error("NTScalar only permits (array of) primitive"); TypeDef def(TypeCode::Struct, value.isarray() ? "epics:nt/NTScalarArray:1.0" : "epics:nt/NTScalar:1.0", { diff --git a/src/pvaproto.h b/src/pvaproto.h index d26482f..6768555 100644 --- a/src/pvaproto.h +++ b/src/pvaproto.h @@ -92,7 +92,7 @@ public: void restore(uint8_t* p) { pos = p; } }; -//! (de)serialization to/from buffers which are fixed size and contigious +//! (de)serialization to/from buffers which are fixed size and contiguous struct PVXS_API FixedBuf : public Buffer { typedef Buffer base_type; @@ -246,7 +246,7 @@ inline void from_wire(Buffer& buf, T& val) //! wrapper to disambiguate size_t from uint32_t or uint64_t. //! -//! __Always__ initialize w/ zero for sane behavour on error. +//! __Always__ initialize w/ zero for sane behavior on error. //! @code //! sbuf M; //! Size blen{0}; diff --git a/src/pvrequest.cpp b/src/pvrequest.cpp index ff256c7..fa4c82d 100644 --- a/src/pvrequest.cpp +++ b/src/pvrequest.cpp @@ -46,7 +46,7 @@ BitMask request2mask(const FieldDesc* desc, const Value& pvRequest) } } else { - // request of non-existant field + // request of non-existent field } } } diff --git a/src/pvxs/sharedArray.h b/src/pvxs/sharedArray.h index e100d0b..996bdd8 100644 --- a/src/pvxs/sharedArray.h +++ b/src/pvxs/sharedArray.h @@ -427,7 +427,7 @@ public: * * Type E may always be cast to itself. * - * Casts must preseve const-ness. + * Casts must preserve const-ness. * Either both of E and TO, or neither, must be const qualified. * * At most one of E or TO may have different non-void base type. diff --git a/src/server.cpp b/src/server.cpp index 8729b66..e5d8325 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -426,7 +426,7 @@ Server::Pvt::Pvt(const Config &conf) acceptor_loop.call([this](){ - // from acceptor worker + // from accepter worker bool firstiface = true; for(const auto& addr : effective.interfaces) { diff --git a/src/serverchan.cpp b/src/serverchan.cpp index c548338..058c2a9 100644 --- a/src/serverchan.cpp +++ b/src/serverchan.cpp @@ -282,7 +282,7 @@ void ServerConn::handle_CREATE_CHANNEL() auto G(iface->server->sourcesLock.lockReader()); // one channel create request contains main channel names. - // each of which will received a seperate reply. + // each of which will received a separate reply. uint16_t count = 0; from_wire(M, count); @@ -399,7 +399,7 @@ void ServerConn::handle_DESTROY_CHANNEL() auto it = chanBySID.find(sid); if(it==chanBySID.end()) { - log_debug_printf(connsetup, "Client %s DestroyChan non-existant sid=%d cid=%d\n", peerName.c_str(), + log_debug_printf(connsetup, "Client %s DestroyChan non-existent sid=%d cid=%d\n", peerName.c_str(), unsigned(sid), unsigned(cid)); return; } diff --git a/src/serverconn.cpp b/src/serverconn.cpp index bd9962a..06fa6df 100644 --- a/src/serverconn.cpp +++ b/src/serverconn.cpp @@ -111,7 +111,7 @@ const std::shared_ptr& ServerConn::lookupSID(uint32_t sid) if(it==chanBySID.end()) { static decltype (it->second) empty{}; return empty; - //throw std::runtime_error(SB()<<"Client "<second; } @@ -227,7 +227,7 @@ void ServerConn::handle_CANCEL_REQUEST() auto it = opByIOID.find(ioid); if(it==opByIOID.end()) { - log_warn_printf(connsetup, "Client %s Cancel of non-existant Op %u\n", peerName.c_str(), unsigned(ioid)); + log_warn_printf(connsetup, "Client %s Cancel of non-existent Op %u\n", peerName.c_str(), unsigned(ioid)); return; } @@ -296,7 +296,7 @@ void ServerConn::handle_MESSAGE() auto it = opByIOID.find(ioid); if(it==opByIOID.end()) { - log_debug_printf(connsetup, "Client %s Message on non-existant ioid\n", peerName.c_str()); + log_debug_printf(connsetup, "Client %s Message on non-existent ioid\n", peerName.c_str()); return; } auto chan = it->second->chan.lock(); diff --git a/src/serverget.cpp b/src/serverget.cpp index 4f43d78..4bad1e8 100644 --- a/src/serverget.cpp +++ b/src/serverget.cpp @@ -420,7 +420,7 @@ void ServerConn::handle_GPR(pva_app_msg_t cmd) std::shared_ptr op; auto it = opByIOID.find(ioid); if(it==opByIOID.end() || it->second->state==ServerOp::Dead) { - log_debug_printf(connio, "Client %s Gets non-existant IOID %u\n", + log_debug_printf(connio, "Client %s Gets non-existent IOID %u\n", peerName.c_str(), unsigned(ioid)); return; diff --git a/src/serverintrospect.cpp b/src/serverintrospect.cpp index 98a758e..2e316e5 100644 --- a/src/serverintrospect.cpp +++ b/src/serverintrospect.cpp @@ -70,7 +70,7 @@ struct ServerIntrospectControl : public server::ConnectOp _cred = conn->cred; } virtual ~ServerIntrospectControl() { - error("Implict Cancel"); + error("Implicit Cancel"); } virtual void connect(const Value& prototype) override final @@ -92,7 +92,7 @@ struct ServerIntrospectControl : public server::ConnectOp { auto serv = server.lock(); if(!serv) - return; // soft fail if already completed, cancelled, disconnected, .... + return; // soft fail if already completed, canceled, disconnected, .... serv->acceptor_loop.call([this, type, &sts](){ if(auto oper = op.lock()) diff --git a/src/servermon.cpp b/src/servermon.cpp index 059480a..2da6174 100644 --- a/src/servermon.cpp +++ b/src/servermon.cpp @@ -32,7 +32,7 @@ struct MonitorOp : public ServerOp, {} virtual ~MonitorOp() {} - // only access from acceptor worker thread + // only access from accepter worker thread std::function onStart; std::function onLowMark; std::function onHighMark; @@ -186,7 +186,7 @@ struct MonitorOp : public ServerOp, } if(state==Executing && !queue.empty() && (!pipeline || window)) { - // reshedule myself + // reschedule myself assert(!scheduled); // we've been holding the lock, so this should not have changed conn->iface->server->acceptor_loop.dispatch([self]() { @@ -502,7 +502,7 @@ void ServerConn::handle_MONITOR() // since server destroy commands aren't acknowledged, we can race // with traffic sent by the client before processing our destroy. // so we can't fault hard, so just ignore and hope for the best. - log_debug_printf(connio, "Client %s MONITORs non-existant IOID %u\n", + log_debug_printf(connio, "Client %s MONITORs non-existent IOID %u\n", peerName.c_str(), unsigned(ioid)); return; diff --git a/src/sharedarray.cpp b/src/sharedarray.cpp index 0401cfe..76c1453 100644 --- a/src/sharedarray.cpp +++ b/src/sharedarray.cpp @@ -177,7 +177,7 @@ printValue(std::string& dest, const Src& src) { std::ostringstream strm; strm<in)) - throw std::runtime_error(std::string("Unable to parse as IP addresss: ")+name); + throw std::runtime_error(std::string("Unable to parse as IP address: ")+name); if(temp.port()==0) temp.setPort(port); (*this) = temp; diff --git a/test/testmon.cpp b/test/testmon.cpp index 16989e2..3b0e24a 100644 --- a/test/testmon.cpp +++ b/test/testmon.cpp @@ -136,7 +136,7 @@ struct BasicTest { mbox.open(initial); auto sub(cli.monitor("mailbox") - .field("nonexistant") + .field("nonexistent") .maskConnected(false) .maskDisconnected(false) .event([this](client::Subscription&) { diff --git a/test/testput.cpp b/test/testput.cpp index 8687254..2ee00ce 100644 --- a/test/testput.cpp +++ b/test/testput.cpp @@ -285,7 +285,7 @@ struct TestPutBuilder : public TesterBase .set("value", "5") .set("alarm.severity", 3) .set("alarm", "not going to happen", false) - .set("nonexistant", "nope", false) + .set("nonexistent", "nope", false) .result([&actual, &done](client::Result&& result) { actual = std::move(result); done.signal(); diff --git a/test/testpvreq.cpp b/test/testpvreq.cpp index 0672ba9..bedd4df 100644 --- a/test/testpvreq.cpp +++ b/test/testpvreq.cpp @@ -74,7 +74,7 @@ void testPvRequest() auto rdef = TypeDef(TypeCode::Struct, { M::Struct("field", { M::Struct("timeStamp", {}), - M::Struct("nonexistant", {}), + M::Struct("nonexistent", {}), M::Struct("alarm", { M::Struct("status", {}), }), @@ -83,13 +83,13 @@ void testPvRequest() auto mask = request2mask(Value::Helper::desc(val), rdef.create()); - testEq(mask, BitMask({0, 2, 4, 6, 7, 8, 9}, 10u))<<" include including non-existant"; + testEq(mask, BitMask({0, 2, 4, 6, 7, 8, 9}, 10u))<<" include including non-existent"; } { auto rdef = TypeDef(TypeCode::Struct, { M::Struct("field", { - M::Struct("nonexistant", {}), + M::Struct("nonexistent", {}), }) }); @@ -357,7 +357,7 @@ void testBuilder() .set("value", "14") .set("alarm.severity", 3) .set("alarm", 42, false) - .set("nonexistant", 42, false); + .set("nonexistent", 42, false); auto built = builder.builder(nt::NTScalar{TypeCode::UInt32}.create());