Spelling (#703)
diff --git a/amalgamate.py b/amalgamate.py
index 9cb2d08..f4bff4d 100644
--- a/amalgamate.py
+++ b/amalgamate.py
@@ -1,9 +1,9 @@
-"""Amalgate json-cpp library sources into a single source and header file.
+"""Amalgamate json-cpp library sources into a single source and header file.
Works with python2.6+ and python3.4+.
Example of invocation (must be invoked from json-cpp top directory):
-python amalgate.py
+python amalgamate.py
"""
import os
import os.path
@@ -50,20 +50,20 @@
def amalgamate_source(source_top_dir=None,
target_source_path=None,
header_include_path=None):
- """Produces amalgated source.
+ """Produces amalgamated source.
Parameters:
source_top_dir: top-directory
target_source_path: output .cpp path
header_include_path: generated header path relative to target_source_path.
"""
- print("Amalgating header...")
+ print("Amalgamating header...")
header = AmalgamationFile(source_top_dir)
- header.add_text("/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/).")
+ header.add_text("/// Json-cpp amalgamated header (http://jsoncpp.sourceforge.net/).")
header.add_text('/// It is intended to be used with #include "%s"' % header_include_path)
header.add_file("LICENSE", wrap_in_comment=True)
- header.add_text("#ifndef JSON_AMALGATED_H_INCLUDED")
- header.add_text("# define JSON_AMALGATED_H_INCLUDED")
- header.add_text("/// If defined, indicates that the source file is amalgated")
+ header.add_text("#ifndef JSON_AMALGAMATED_H_INCLUDED")
+ header.add_text("# define JSON_AMALGAMATED_H_INCLUDED")
+ header.add_text("/// If defined, indicates that the source file is amalgamated")
header.add_text("/// to prevent private header inclusion.")
header.add_text("#define JSON_IS_AMALGAMATION")
header.add_file("include/json/version.h")
@@ -75,37 +75,37 @@
header.add_file("include/json/reader.h")
header.add_file("include/json/writer.h")
header.add_file("include/json/assertions.h")
- header.add_text("#endif //ifndef JSON_AMALGATED_H_INCLUDED")
+ header.add_text("#endif //ifndef JSON_AMALGAMATED_H_INCLUDED")
target_header_path = os.path.join(os.path.dirname(target_source_path), header_include_path)
- print("Writing amalgated header to %r" % target_header_path)
+ print("Writing amalgamated header to %r" % target_header_path)
header.write_to(target_header_path)
base, ext = os.path.splitext(header_include_path)
forward_header_include_path = base + "-forwards" + ext
- print("Amalgating forward header...")
+ print("Amalgamating forward header...")
header = AmalgamationFile(source_top_dir)
- header.add_text("/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).")
+ header.add_text("/// Json-cpp amalgamated forward header (http://jsoncpp.sourceforge.net/).")
header.add_text('/// It is intended to be used with #include "%s"' % forward_header_include_path)
header.add_text("/// This header provides forward declaration for all JsonCpp types.")
header.add_file("LICENSE", wrap_in_comment=True)
- header.add_text("#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED")
- header.add_text("# define JSON_FORWARD_AMALGATED_H_INCLUDED")
- header.add_text("/// If defined, indicates that the source file is amalgated")
+ header.add_text("#ifndef JSON_FORWARD_AMALGAMATED_H_INCLUDED")
+ header.add_text("# define JSON_FORWARD_AMALGAMATED_H_INCLUDED")
+ header.add_text("/// If defined, indicates that the source file is amalgamated")
header.add_text("/// to prevent private header inclusion.")
header.add_text("#define JSON_IS_AMALGAMATION")
header.add_file("include/json/config.h")
header.add_file("include/json/forwards.h")
- header.add_text("#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED")
+ header.add_text("#endif //ifndef JSON_FORWARD_AMALGAMATED_H_INCLUDED")
target_forward_header_path = os.path.join(os.path.dirname(target_source_path),
forward_header_include_path)
- print("Writing amalgated forward header to %r" % target_forward_header_path)
+ print("Writing amalgamated forward header to %r" % target_forward_header_path)
header.write_to(target_forward_header_path)
- print("Amalgating source...")
+ print("Amalgamating source...")
source = AmalgamationFile(source_top_dir)
- source.add_text("/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/).")
+ source.add_text("/// Json-cpp amalgamated source (http://jsoncpp.sourceforge.net/).")
source.add_text('/// It is intended to be used with #include "%s"' % header_include_path)
source.add_file("LICENSE", wrap_in_comment=True)
source.add_text("")
@@ -123,12 +123,12 @@
source.add_file(os.path.join(lib_json, "json_value.cpp"))
source.add_file(os.path.join(lib_json, "json_writer.cpp"))
- print("Writing amalgated source to %r" % target_source_path)
+ print("Writing amalgamated source to %r" % target_source_path)
source.write_to(target_source_path)
def main():
usage = """%prog [options]
-Generate a single amalgated source and header file from the sources.
+Generate a single amalgamated source and header file from the sources.
"""
from optparse import OptionParser
parser = OptionParser(usage=usage)
@@ -136,7 +136,7 @@
parser.add_option("-s", "--source", dest="target_source_path", action="store", default="dist/jsoncpp.cpp",
help="""Output .cpp source path. [Default: %default]""")
parser.add_option("-i", "--include", dest="header_include_path", action="store", default="json/json.h",
- help="""Header include path. Used to include the header from the amalgated source file. [Default: %default]""")
+ help="""Header include path. Used to include the header from the amalgamated source file. [Default: %default]""")
parser.add_option("-t", "--top-dir", dest="top_dir", action="store", default=os.getcwd(),
help="""Source top-directory. [Default: %default]""")
parser.enable_interspersed_args()
@@ -149,7 +149,7 @@
sys.stderr.write(msg + "\n")
sys.exit(1)
else:
- print("Source succesfully amalagated")
+ print("Source successfully amalgamated")
if __name__ == "__main__":
main()
diff --git a/doc/doxyfile.in b/doc/doxyfile.in
index 7265a22..7bbe9bc 100644
--- a/doc/doxyfile.in
+++ b/doc/doxyfile.in
@@ -271,7 +271,7 @@
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
# (default is Fortran), use: inc=Fortran f=C.
@@ -1408,7 +1408,7 @@
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
+# http://www.mathjax.org) which uses client side JavaScript for the rendering
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
@@ -1478,7 +1478,7 @@
SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
+# implemented using a web server instead of a web client using JavaScript. There
# are two flavours of web server based searching depending on the
# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
# searching and an index file used by the script. When EXTERNAL_SEARCH is
@@ -1959,7 +1959,7 @@
EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all refrences to function-like macros that are alone on a line, have an
+# remove all references to function-like macros that are alone on a line, have an
# all uppercase name, and do not end with a semicolon. Such function macros are
# typically used for boiler-plate code, and will confuse the parser if not
# removed.
diff --git a/doc/web_doxyfile.in b/doc/web_doxyfile.in
index f221e64..7b4c934 100644
--- a/doc/web_doxyfile.in
+++ b/doc/web_doxyfile.in
@@ -271,7 +271,7 @@
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
# (default is Fortran), use: inc=Fortran f=C.
@@ -1408,7 +1408,7 @@
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
+# http://www.mathjax.org) which uses client side JavaScript for the rendering
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
@@ -1478,7 +1478,7 @@
SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
+# implemented using a web server instead of a web client using JavaScript. There
# are two flavours of web server based searching depending on the
# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
# searching and an index file used by the script. When EXTERNAL_SEARCH is
@@ -1947,7 +1947,7 @@
EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all refrences to function-like macros that are alone on a line, have an
+# remove all references to function-like macros that are alone on a line, have an
# all uppercase name, and do not end with a semicolon. Such function macros are
# typically used for boiler-plate code, and will confuse the parser if not
# removed.
diff --git a/doxybuild.py b/doxybuild.py
index f18c9c0..862c1f4 100644
--- a/doxybuild.py
+++ b/doxybuild.py
@@ -156,7 +156,7 @@
def main():
usage = """%prog
Generates doxygen documentation in build/doxygen.
- Optionaly makes a tarball of the documentation to dist/.
+ Optionally makes a tarball of the documentation to dist/.
Must be started in the project top directory.
"""
diff --git a/include/json/config.h b/include/json/config.h
index c83e78a..d6bad30 100644
--- a/include/json/config.h
+++ b/include/json/config.h
@@ -25,9 +25,9 @@
#define JSON_USE_EXCEPTION 1
#endif
-/// If defined, indicates that the source file is amalgated
+/// If defined, indicates that the source file is amalgamated
/// to prevent private header inclusion.
-/// Remarks: it is automatically defined in the generated amalgated header.
+/// Remarks: it is automatically defined in the generated amalgamated header.
// #define JSON_IS_AMALGAMATION
#ifdef JSON_IN_CPPTL
@@ -78,7 +78,7 @@
#endif // defined(_MSC_VER)
-// In c++11 the override keyword allows you to explicity define that a function
+// In c++11 the override keyword allows you to explicitly define that a function
// is intended to override the base-class version. This makes the code more
// managable and fixes a set of common hard-to-find bugs.
#if __cplusplus >= 201103L
diff --git a/include/json/value.h b/include/json/value.h
index 2e53314..be40c30 100644
--- a/include/json/value.h
+++ b/include/json/value.h
@@ -116,7 +116,7 @@
/** \brief Lightweight wrapper to tag static string.
*
- * Value constructor and objectValue member assignement takes advantage of the
+ * Value constructor and objectValue member assignment takes advantage of the
* StaticString and avoid the cost of string duplication when storing the
* string or the member name.
*
diff --git a/include/json/writer.h b/include/json/writer.h
index 5280016..2278bc8 100644
--- a/include/json/writer.h
+++ b/include/json/writer.h
@@ -99,7 +99,7 @@
- "dropNullPlaceholders": false or true
- Drop the "null" string from the writer's output for nullValues.
Strictly speaking, this is not valid JSON. But when the output is being
- fed to a browser's Javascript, it makes for smaller output and the
+ fed to a browser's JavaScript, it makes for smaller output and the
browser can handle the output just fine.
- "useSpecialFloats": false or true
- If true, outputs non-finite floating point values in the following way:
@@ -169,7 +169,7 @@
/** \brief Drop the "null" string from the writer's output for nullValues.
* Strictly speaking, this is not valid JSON. But when the output is being
- * fed to a browser's Javascript, it makes for smaller output and the
+ * fed to a browser's JavaScript, it makes for smaller output and the
* browser can handle the output just fine.
*/
void dropNullPlaceholders();
@@ -183,7 +183,7 @@
void writeValue(const Value& value);
JSONCPP_STRING document_;
- bool yamlCompatiblityEnabled_;
+ bool yamlCompatibilityEnabled_;
bool dropNullPlaceholders_;
bool omitEndingLineFeed_;
};
@@ -234,7 +234,7 @@
private:
void writeValue(const Value& value);
void writeArrayValue(const Value& value);
- bool isMultineArray(const Value& value);
+ bool isMultilineArray(const Value& value);
void pushValue(const JSONCPP_STRING& value);
void writeIndent();
void writeWithIndent(const JSONCPP_STRING& value);
@@ -307,7 +307,7 @@
private:
void writeValue(const Value& value);
void writeArrayValue(const Value& value);
- bool isMultineArray(const Value& value);
+ bool isMultilineArray(const Value& value);
void pushValue(const JSONCPP_STRING& value);
void writeIndent();
void writeWithIndent(const JSONCPP_STRING& value);
diff --git a/makerelease.py b/makerelease.py
index ba2e9aa..bc716cb 100644
--- a/makerelease.py
+++ b/makerelease.py
@@ -265,7 +265,7 @@
Must be started in the project top directory.
-Warning: --force should only be used when developping/testing the release script.
+Warning: --force should only be used when developing/testing the release script.
"""
from optparse import OptionParser
parser = OptionParser(usage=usage)
@@ -377,7 +377,7 @@
user=options.user, sftp=options.sftp)
print('Source and doc release tarballs uploaded')
else:
- print('No upload user specified. Web site and download tarbal were not uploaded.')
+ print('No upload user specified. Web site and download tarball were not uploaded.')
print('Tarball can be found at:', doc_tarball_path)
# Set next version number and commit
diff --git a/src/lib_json/json_tool.h b/src/lib_json/json_tool.h
index 51aa7a0..4590bfc 100644
--- a/src/lib_json/json_tool.h
+++ b/src/lib_json/json_tool.h
@@ -71,7 +71,7 @@
typedef char UIntToStringBuffer[uintToStringBufferSize];
/** Converts an unsigned integer to string.
- * @param value Unsigned interger to convert to string
+ * @param value Unsigned integer to convert to string
* @param current Input/Output string buffer.
* Must have at least uintToStringBufferSize chars free.
*/
diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
index 0852b48..9a912ac 100644
--- a/src/lib_json/json_writer.cpp
+++ b/src/lib_json/json_writer.cpp
@@ -128,7 +128,7 @@
snprintf(formatString, sizeof(formatString), "%%.%dg", precision);
// Print into the buffer. We need not request the alternative representation
- // that always has a decimal point because JSON doesn't distingish the
+ // that always has a decimal point because JSON doesn't distinguish the
// concepts of reals and integers.
if (isfinite(value)) {
len = snprintf(buffer, sizeof(buffer), formatString, value);
@@ -334,10 +334,10 @@
// //////////////////////////////////////////////////////////////////
FastWriter::FastWriter()
- : yamlCompatiblityEnabled_(false), dropNullPlaceholders_(false),
+ : yamlCompatibilityEnabled_(false), dropNullPlaceholders_(false),
omitEndingLineFeed_(false) {}
-void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; }
+void FastWriter::enableYAMLCompatibility() { yamlCompatibilityEnabled_ = true; }
void FastWriter::dropNullPlaceholders() { dropNullPlaceholders_ = true; }
@@ -397,7 +397,7 @@
if (it != members.begin())
document_ += ',';
document_ += valueToQuotedStringN(name.data(), static_cast<unsigned>(name.length()));
- document_ += yamlCompatiblityEnabled_ ? ": " : ":";
+ document_ += yamlCompatibilityEnabled_ ? ": " : ":";
writeValue(value[name]);
}
document_ += '}';
@@ -486,7 +486,7 @@
if (size == 0)
pushValue("[]");
else {
- bool isArrayMultiLine = isMultineArray(value);
+ bool isArrayMultiLine = isMultilineArray(value);
if (isArrayMultiLine) {
writeWithIndent("[");
indent();
@@ -524,7 +524,7 @@
}
}
-bool StyledWriter::isMultineArray(const Value& value) {
+bool StyledWriter::isMultilineArray(const Value& value) {
ArrayIndex const size = value.size();
bool isMultiLine = size * 3 >= rightMargin_;
childValues_.clear();
@@ -703,7 +703,7 @@
if (size == 0)
pushValue("[]");
else {
- bool isArrayMultiLine = isMultineArray(value);
+ bool isArrayMultiLine = isMultilineArray(value);
if (isArrayMultiLine) {
writeWithIndent("[");
indent();
@@ -743,7 +743,7 @@
}
}
-bool StyledStreamWriter::isMultineArray(const Value& value) {
+bool StyledStreamWriter::isMultilineArray(const Value& value) {
ArrayIndex const size = value.size();
bool isMultiLine = size * 3 >= rightMargin_;
childValues_.clear();
@@ -860,7 +860,7 @@
private:
void writeValue(Value const& value);
void writeArrayValue(Value const& value);
- bool isMultineArray(Value const& value);
+ bool isMultilineArray(Value const& value);
void pushValue(JSONCPP_STRING const& value);
void writeIndent();
void writeWithIndent(JSONCPP_STRING const& value);
@@ -984,7 +984,7 @@
if (size == 0)
pushValue("[]");
else {
- bool isMultiLine = (cs_ == CommentStyle::All) || isMultineArray(value);
+ bool isMultiLine = (cs_ == CommentStyle::All) || isMultilineArray(value);
if (isMultiLine) {
writeWithIndent("[");
indent();
@@ -1026,7 +1026,7 @@
}
}
-bool BuiltStyledStreamWriter::isMultineArray(Value const& value) {
+bool BuiltStyledStreamWriter::isMultilineArray(Value const& value) {
ArrayIndex const size = value.size();
bool isMultiLine = size * 3 >= rightMargin_;
childValues_.clear();
diff --git a/src/test_lib_json/jsontest.cpp b/src/test_lib_json/jsontest.cpp
index f8c0767..94a0672 100644
--- a/src/test_lib_json/jsontest.cpp
+++ b/src/test_lib_json/jsontest.cpp
@@ -398,7 +398,7 @@
_CrtSetReportHook(&msvcrtSilentReportHook);
#endif // if defined(_MSC_VER)
-// @todo investiguate this handler (for buffer overflow)
+// @todo investigate this handler (for buffer overflow)
// _set_security_error_handler
#if defined(_WIN32)
diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp
index 3bbe896..4e5aad1 100644
--- a/src/test_lib_json/main.cpp
+++ b/src/test_lib_json/main.cpp
@@ -2040,7 +2040,7 @@
}
}
JSONTEST_FIXTURE(CharReaderFailIfExtraTest, issue107) {
- // This is interpretted as an int value followed by a colon.
+ // This is interpreted as an int value followed by a colon.
Json::CharReaderBuilder b;
Json::Value root;
char const doc[] =