Skip to content

Commit

Permalink
THRIFT-2849: spelling errors fixed using codespell tool
Browse files Browse the repository at this point in the history
Client: All
Patch: Anatol Pomozov

This closes #281
  • Loading branch information
hcorg committed Nov 24, 2014
1 parent eab29a0 commit 3b5dacb
Show file tree
Hide file tree
Showing 72 changed files with 132 additions and 132 deletions.
2 changes: 1 addition & 1 deletion aclocal/ax_javac_and_java.m4
Expand Up @@ -7,7 +7,7 @@ dnl If "JAVA" is defined in the environment, that will be the only
dnl java command tested. Otherwise, a hard-coded list will be used.
dnl Similarly for "JAVAC".
dnl
dnl AX_JAVAC_AND_JAVA does not currenly support testing for a particular
dnl AX_JAVAC_AND_JAVA does not currently support testing for a particular
dnl Java version, testing for only one of "java" and "javac", or
dnl compiling or running user-provided Java code.
dnl
Expand Down
2 changes: 1 addition & 1 deletion compiler/cpp/src/generate/t_csharp_generator.cc
Expand Up @@ -691,7 +691,7 @@ void t_csharp_generator::generate_csharp_struct_definition(ofstream& out,
if ((serialize_ || wcf_) && !is_exception) {
indent(out) << "[DataContract(Namespace=\"" << wcf_namespace_ << "\")]"
<< endl; // do not make exception classes directly WCF serializable, we provide a
// seperate "fault" for that
// separate "fault" for that
}
bool is_final = (tstruct->annotations_.find("final") != tstruct->annotations_.end());

Expand Down
2 changes: 1 addition & 1 deletion compiler/cpp/src/generate/t_html_generator.cc
Expand Up @@ -716,7 +716,7 @@ int t_html_generator::print_type(t_type* ttype) {
*/
void t_html_generator::print_const_value(t_type* type, t_const_value* tvalue) {

// if tvalue is an indentifier, the constant content is already shown elsewhere
// if tvalue is an identifier, the constant content is already shown elsewhere
if (tvalue->get_type() == t_const_value::CV_IDENTIFIER) {
string fname = program_->get_name() + ".html";
string name = escape_html(tvalue->get_identifier());
Expand Down
2 changes: 1 addition & 1 deletion compiler/cpp/src/generate/t_php_generator.cc
Expand Up @@ -228,7 +228,7 @@ class t_php_generator : public t_oop_generator {
return (nsglobal_.size() ? NSGLOBAL_B : NSGLOBAL) + ns;
}

// add a directory to allready existing namespace
// add a directory to already existing namespace
string php_namespace_directory(string directory, bool end = true) {
(void)directory;
if (end) {
Expand Down
2 changes: 1 addition & 1 deletion compiler/cpp/src/globals.h
Expand Up @@ -123,7 +123,7 @@ enum PROGDOCTEXT_STATUS {
};

/**
* The program level doctext. Stored seperately to make parsing easier.
* The program level doctext. Stored separately to make parsing easier.
*/
extern char* g_program_doctext_candidate;
extern int g_program_doctext_lineno;
Expand Down
2 changes: 1 addition & 1 deletion compiler/cpp/src/main.cc
Expand Up @@ -992,7 +992,7 @@ void generate(t_program* program, const vector<string>& generator_strings) {
if (gen_recurse) {
const vector<t_program*>& includes = program->get_includes();
for (size_t i = 0; i < includes.size(); ++i) {
// Propogate output path from parent to child programs
// Propagate output path from parent to child programs
includes[i]->set_out_path(program->get_out_path(), program->is_out_path_absolute());

generate(includes[i], generator_strings);
Expand Down
24 changes: 12 additions & 12 deletions compiler/cpp/src/parse/t_program.h
Expand Up @@ -135,11 +135,11 @@ class t_program : public t_doc {
* @return true if a certain collision was found, otherwise false
*/
bool is_unique_typename(t_type* t) {
int occurances = program_typename_count(this, t);
int occurrences = program_typename_count(this, t);
for (std::vector<t_program*>::iterator it = includes_.begin(); it != includes_.end(); ++it) {
occurances += program_typename_count(*it, t);
occurrences += program_typename_count(*it, t);
}
return 0 == occurances;
return 0 == occurrences;
}

/**
Expand All @@ -149,12 +149,12 @@ class t_program : public t_doc {
* @return the number of certain typename collisions
*/
int program_typename_count(t_program* prog, t_type* t) {
int occurances = 0;
occurances += collection_typename_count(prog, prog->typedefs_, t);
occurances += collection_typename_count(prog, prog->enums_, t);
occurances += collection_typename_count(prog, prog->objects_, t);
occurances += collection_typename_count(prog, prog->services_, t);
return occurances;
int occurrences = 0;
occurrences += collection_typename_count(prog, prog->typedefs_, t);
occurrences += collection_typename_count(prog, prog->enums_, t);
occurrences += collection_typename_count(prog, prog->objects_, t);
occurrences += collection_typename_count(prog, prog->services_, t);
return occurrences;
}

/**
Expand All @@ -166,11 +166,11 @@ class t_program : public t_doc {
*/
template <class T>
int collection_typename_count(t_program* prog, T type_collection, t_type* t) {
int occurances = 0;
int occurrences = 0;
for (typename T::iterator it = type_collection.begin(); it != type_collection.end(); ++it)
if (t != *it && 0 == t->get_name().compare((*it)->get_name()) && is_common_namespace(prog, t))
++occurances;
return occurances;
++occurrences;
return occurrences;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion contrib/fb303/TClientInfo.h
Expand Up @@ -192,7 +192,7 @@ class TClientInfoConnection {

/**
* Return as string the thrift call either currently being processed or
* most recently processed if the connection is still open for additonal
* most recently processed if the connection is still open for additional
* calls. Returns NULL if a call hasn't been made yet or processing
* has ended.
*/
Expand Down
2 changes: 1 addition & 1 deletion contrib/fb303/aclocal/ax_javac_and_java.m4
Expand Up @@ -7,7 +7,7 @@ dnl If "JAVA" is defined in the environment, that will be the only
dnl java command tested. Otherwise, a hard-coded list will be used.
dnl Similarly for "JAVAC".
dnl
dnl AX_JAVAC_AND_JAVA does not currenly support testing for a particular
dnl AX_JAVAC_AND_JAVA does not currently support testing for a particular
dnl Java version, testing for only one of "java" and "javac", or
dnl compiling or running user-provided Java code.
dnl
Expand Down
2 changes: 1 addition & 1 deletion contrib/parse_profiling.py
Expand Up @@ -42,7 +42,7 @@ def __init__(self, obj_file, address):
self.address = address
self.sourceFile = None
self.sourceLine = None
self.funtion = None
self.function = None


g_addrs_by_filename = {}
Expand Down
Expand Up @@ -193,7 +193,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
attachFiles();
}
} catch (IOException e) {
throw new MojoExecutionException("An IO error occured", e);
throw new MojoExecutionException("An IO error occurred", e);
} catch (IllegalArgumentException e) {
throw new MojoFailureException("thrift failed to execute because: " + e.getMessage(), e);
} catch (CommandLineException e) {
Expand Down
2 changes: 1 addition & 1 deletion contrib/vagrant/centos-6.5/README.md
Expand Up @@ -15,7 +15,7 @@ This will download and launch the base box VM under VirtualBox and run the Apach

The provisioning script (inside the Vagrantfile) runs ./bootstrap.sh, ./configure, make and make check, but does not install thrift. To install thrift run "make install".

The Vagrant base box used here is a minimal Centos 6.5 VirtualBox with 2GB RAM and 2 CPUs. For more Vagrant information: https://www.vagrantup.com. A summary of the base box preperation follows:
The Vagrant base box used here is a minimal Centos 6.5 VirtualBox with 2GB RAM and 2 CPUs. For more Vagrant information: https://www.vagrantup.com. A summary of the base box preparation follows:

root password: vagrant

Expand Down
2 changes: 1 addition & 1 deletion contrib/zeromq/csharp/TZmqClient.cs
Expand Up @@ -47,7 +47,7 @@ public override int Read (byte[] buf, int off, int len)
throw new NotImplementedException ();

if (_rbuf.Length == 0) {
//Fill the Buffer with the complete ZMQ Message which needs to be(?!) the complete Thrift reponse
//Fill the Buffer with the complete ZMQ Message which needs to be(?!) the complete Thrift response
debug ("Client_Read Filling buffer..");
byte[] tmpBuf = _sock.Recv ();
debug (string.Format("Client_Read filled with {0}b",tmpBuf.Length));
Expand Down
4 changes: 2 additions & 2 deletions debian/rules
Expand Up @@ -193,11 +193,11 @@ binary-common:
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
# Build architecture independent packages using the common target.
binary-indep: build-indep install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
# Build architecture dependent packages using the common target.
binary-arch: build-arch install-arch
echo "php:Depends=phpapi-$(php-config5 --phpapi)" > debian/substvars
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
Expand Down
4 changes: 2 additions & 2 deletions lib/cocoa/src/transport/TSSLSocketClient.m
Expand Up @@ -193,8 +193,8 @@ - (void)stream:(NSStream *)aStream
case NSStreamEventErrorOccurred:
{
NSError *theError = [aStream streamError];
NSLog(@"Error occured opening stream: %@", theError);
// @throw [TSSLSocketException exceptionWithReason: @"Error occured opening stream" error: theError];
NSLog(@"Error occurred opening stream: %@", theError);
// @throw [TSSLSocketException exceptionWithReason: @"Error occurred opening stream" error: theError];
break;
}
case NSStreamEventEndEncountered:
Expand Down
28 changes: 14 additions & 14 deletions lib/cpp/libthrift.vcxproj.filters
Expand Up @@ -25,19 +25,19 @@
<Filter>concurrency</Filter>
</ClCompile>
<ClCompile Include="src\thrift\protocol\TDebugProtocol.cpp">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClCompile>
<ClCompile Include="src\thrift\protocol\TDenseProtocol.cpp">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClCompile>
<ClCompile Include="src\thrift\protocol\TBase64Utils.cpp">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClCompile>
<ClCompile Include="src\thrift\protocol\TJSONProtocol.cpp">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClCompile>
<ClCompile Include="src\thrift\protocol\TMultiplexedProtocol.cpp">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClCompile>
<ClCompile Include="src\thrift\transport\TFDTransport.cpp">
<Filter>transport</Filter>
Expand Down Expand Up @@ -120,7 +120,7 @@
<Filter>transport</Filter>
</ClInclude>
<ClInclude Include="src\thrift\protocol\TBinaryProtocol.h">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClInclude>
<ClInclude Include="src\thrift\Thrift.h" />
<ClInclude Include="src\thrift\TProcessor.h" />
Expand Down Expand Up @@ -153,10 +153,10 @@
<Filter>windows</Filter>
</ClInclude>
<ClInclude Include="src\thrift\protocol\TProtocol.h">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClInclude>
<ClInclude Include="src\thrift\protocol\TVirtualProtocol.h">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClInclude>
<ClInclude Include="src\thrift\server\TServer.h">
<Filter>server</Filter>
Expand Down Expand Up @@ -201,16 +201,16 @@
<Filter>transport</Filter>
</ClInclude>
<ClInclude Include="src\thrift\protocol\TJSONProtocol.h">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClInclude>
<ClInclude Include="src\thrift\protocol\TMultiplexedProtocol.h">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClInclude>
<ClInclude Include="src\thrift\protocol\TDenseProtocol.h">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClInclude>
<ClInclude Include="src\thrift\protocol\TDebugProtocol.h">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</ClInclude>
<ClInclude Include="src\thrift\transport\TServerSocket.h">
<Filter>transport</Filter>
Expand Down Expand Up @@ -247,7 +247,7 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="protocal">
<Filter Include="protocol">
<UniqueIdentifier>{07ced19b-b72a-4105-9ffb-6d2bcf64497e}</UniqueIdentifier>
</Filter>
<Filter Include="transport">
Expand All @@ -274,7 +274,7 @@
</ItemGroup>
<ItemGroup>
<None Include="src\thrift\protocol\TBinaryProtocol.tcc">
<Filter>protocal</Filter>
<Filter>protocol</Filter>
</None>
<None Include="src\thrift\windows\tr1\functional">
<Filter>windows\tr1</Filter>
Expand Down
6 changes: 3 additions & 3 deletions lib/cpp/src/thrift/TLogging.h
Expand Up @@ -62,7 +62,7 @@
#endif

/**
* analagous to T_DEBUG but also prints the time
* analogous to T_DEBUG but also prints the time
*
* @param string format_string input: printf style format string
*/
Expand All @@ -88,7 +88,7 @@
#endif

/**
* analagous to T_DEBUG but uses input level to determine whether or not the string
* analogous to T_DEBUG but uses input level to determine whether or not the string
* should be logged.
*
* @param int level: specified debug level
Expand Down Expand Up @@ -120,7 +120,7 @@
}

/**
* Analagous to T_ERROR, additionally aborting the process.
* Analogous to T_ERROR, additionally aborting the process.
* WARNING: macro calls abort(), ending program execution
*
* @param string format_string input: printf style format string
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp/src/thrift/concurrency/PosixThreadFactory.h
Expand Up @@ -46,7 +46,7 @@ class PosixThreadFactory : public ThreadFactory {
*
* Absolute priority is determined by scheduler policy and OS. This
* enumeration specifies relative priorities such that one can specify a
* priority withing a giving scheduler policy without knowing the absolute
* priority within a giving scheduler policy without knowing the absolute
* value of the priority.
*/
enum PRIORITY {
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
Expand Up @@ -96,7 +96,7 @@ class TMultiplexedProcessor : public TProcessor {
*
* \param [in] serviceName Name of a service, has to be identical to the name
* declared in the Thrift IDL, e.g. "WeatherReport".
* \param [in] processor Implementation of a service, ususally referred to
* \param [in] processor Implementation of a service, usually referred to
* as "handlers", e.g. WeatherReportHandler,
* implementing WeatherReportIf interface.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
Expand Up @@ -261,7 +261,7 @@ uint32_t TCompactProtocolT<Transport_>::writeDouble(const double dub) {
}

/**
* Write a string to the wire with a varint size preceeding.
* Write a string to the wire with a varint size preceding.
*/
template <class Transport_>
uint32_t TCompactProtocolT<Transport_>::writeString(const std::string& str) {
Expand Down
4 changes: 2 additions & 2 deletions lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
Expand Up @@ -656,7 +656,7 @@ uint32_t TJSONProtocol::writeBool(const bool value) {
}

uint32_t TJSONProtocol::writeByte(const int8_t byte) {
// writeByte() must be handled specially becuase boost::lexical cast sees
// writeByte() must be handled specially because boost::lexical cast sees
// int8_t as a text type instead of an integer type
return writeJSONInteger((int16_t)byte);
}
Expand Down Expand Up @@ -984,7 +984,7 @@ uint32_t TJSONProtocol::readBool(bool& value) {
return readJSONInteger(value);
}

// readByte() must be handled properly becuase boost::lexical cast sees int8_t
// readByte() must be handled properly because boost::lexical cast sees int8_t
// as a text type instead of an integer type
uint32_t TJSONProtocol::readByte(int8_t& byte) {
int16_t tmp = (int16_t)byte;
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp/src/thrift/protocol/TJSONProtocol.h
Expand Up @@ -43,7 +43,7 @@ class TJSONContext;
* 2. Thrift doubles are represented as JSON numbers. Some special values are
* represented as strings:
* a. "NaN" for not-a-number values
* b. "Infinity" for postive infinity
* b. "Infinity" for positive infinity
* c. "-Infinity" for negative infinity
*
* 3. Thrift string values are emitted as JSON strings, with appropriate
Expand Down
4 changes: 2 additions & 2 deletions lib/cpp/src/thrift/server/TNonblockingServer.h
Expand Up @@ -669,7 +669,7 @@ class TNonblockingServer : public TServer {

/**
* Check buffer sizes every "count" calls. This allows buffer limits
* to be enforced for persistant connections with a controllable degree
* to be enforced for persistent connections with a controllable degree
* of overhead. 0 disables checks except at connection close.
*
* @param count the number of calls between checks, or 0 to disable
Expand Down Expand Up @@ -812,7 +812,7 @@ class TNonblockingIOThread : public Runnable {
* C-callable event handler for listener events. Provides a callback
* that libevent can understand which invokes server->handleEvent().
*
* @param fd the descriptor the event occured on.
* @param fd the descriptor the event occurred on.
* @param which the flags associated with the event.
* @param v void* callback arg where we placed TNonblockingServer's "this".
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp/src/thrift/transport/TBufferTransports.cpp
Expand Up @@ -63,7 +63,7 @@ uint32_t TBufferedTransport::readSlow(uint8_t* buf, uint32_t len) {
void TBufferedTransport::writeSlow(const uint8_t* buf, uint32_t len) {
uint32_t have_bytes = static_cast<uint32_t>(wBase_ - wBuf_.get());
uint32_t space = static_cast<uint32_t>(wBound_ - wBase_);
// We should only take the slow path if we can't accomodate the write
// We should only take the slow path if we can't accommodate the write
// with the free space already in the buffer.
assert(wBound_ - wBase_ < static_cast<ptrdiff_t>(len));

Expand Down
4 changes: 2 additions & 2 deletions lib/cpp/src/thrift/transport/TBufferTransports.h
Expand Up @@ -86,7 +86,7 @@ class TBufferBase : public TVirtualTransport<TBufferBase> {
/**
* Fast-path write.
*
* When we have enough empty space in our buffer to accomodate the write, we
* When we have enough empty space in our buffer to accommodate the write, we
* can satisfy it with a single memcpy, then adjust our internal pointers.
* If the buffer is full, we call out to our slow path, implemented by a
* subclass. This method is meant to eventually be nonvirtual and
Expand Down Expand Up @@ -629,7 +629,7 @@ class TMemoryBuffer : public TVirtualTransport<TMemoryBuffer, TBufferBase> {
uint32_t available_write() const { return static_cast<uint32_t>(wBound_ - wBase_); }

// Returns a pointer to where the client can write data to append to
// the TMemoryBuffer, and ensures the buffer is big enough to accomodate a
// the TMemoryBuffer, and ensures the buffer is big enough to accommodate a
// write of the provided length. The returned pointer is very convenient for
// passing to read(), recv(), or similar. You must call wroteBytes() as soon
// as data is written or the buffer will not be aware that data has changed.
Expand Down

1 comment on commit 3b5dacb

@betapcode
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi !
I'm compile zeromq and thrift in /contrib/zeromq with lib TZmqServer.cpp but get the error " error: ‘processor_’ was not declared in this scope"
line: processor_->process(inputProtocol, outputProtocol);
Help me ! thanks

Please sign in to comment.