Skip to content

Commit e6a588a

Browse files
jsorefcdunn2001
authored andcommitted
1 parent 7c979e8 commit e6a588a

12 files changed

+57
-57
lines changed

amalgamate.py

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
"""Amalgate json-cpp library sources into a single source and header file.
1+
"""Amalgamate json-cpp library sources into a single source and header file.
22
33
Works with python2.6+ and python3.4+.
44
55
Example of invocation (must be invoked from json-cpp top directory):
6-
python amalgate.py
6+
python amalgamate.py
77
"""
88
import os
99
import os.path
@@ -50,20 +50,20 @@ def write_to(self, output_path):
5050
def amalgamate_source(source_top_dir=None,
5151
target_source_path=None,
5252
header_include_path=None):
53-
"""Produces amalgated source.
53+
"""Produces amalgamated source.
5454
Parameters:
5555
source_top_dir: top-directory
5656
target_source_path: output .cpp path
5757
header_include_path: generated header path relative to target_source_path.
5858
"""
59-
print("Amalgating header...")
59+
print("Amalgamating header...")
6060
header = AmalgamationFile(source_top_dir)
61-
header.add_text("/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/).")
61+
header.add_text("/// Json-cpp amalgamated header (http://jsoncpp.sourceforge.net/).")
6262
header.add_text('/// It is intended to be used with #include "%s"' % header_include_path)
6363
header.add_file("LICENSE", wrap_in_comment=True)
64-
header.add_text("#ifndef JSON_AMALGATED_H_INCLUDED")
65-
header.add_text("# define JSON_AMALGATED_H_INCLUDED")
66-
header.add_text("/// If defined, indicates that the source file is amalgated")
64+
header.add_text("#ifndef JSON_AMALGAMATED_H_INCLUDED")
65+
header.add_text("# define JSON_AMALGAMATED_H_INCLUDED")
66+
header.add_text("/// If defined, indicates that the source file is amalgamated")
6767
header.add_text("/// to prevent private header inclusion.")
6868
header.add_text("#define JSON_IS_AMALGAMATION")
6969
header.add_file("include/json/version.h")
@@ -75,37 +75,37 @@ def amalgamate_source(source_top_dir=None,
7575
header.add_file("include/json/reader.h")
7676
header.add_file("include/json/writer.h")
7777
header.add_file("include/json/assertions.h")
78-
header.add_text("#endif //ifndef JSON_AMALGATED_H_INCLUDED")
78+
header.add_text("#endif //ifndef JSON_AMALGAMATED_H_INCLUDED")
7979

8080
target_header_path = os.path.join(os.path.dirname(target_source_path), header_include_path)
81-
print("Writing amalgated header to %r" % target_header_path)
81+
print("Writing amalgamated header to %r" % target_header_path)
8282
header.write_to(target_header_path)
8383

8484
base, ext = os.path.splitext(header_include_path)
8585
forward_header_include_path = base + "-forwards" + ext
86-
print("Amalgating forward header...")
86+
print("Amalgamating forward header...")
8787
header = AmalgamationFile(source_top_dir)
88-
header.add_text("/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).")
88+
header.add_text("/// Json-cpp amalgamated forward header (http://jsoncpp.sourceforge.net/).")
8989
header.add_text('/// It is intended to be used with #include "%s"' % forward_header_include_path)
9090
header.add_text("/// This header provides forward declaration for all JsonCpp types.")
9191
header.add_file("LICENSE", wrap_in_comment=True)
92-
header.add_text("#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED")
93-
header.add_text("# define JSON_FORWARD_AMALGATED_H_INCLUDED")
94-
header.add_text("/// If defined, indicates that the source file is amalgated")
92+
header.add_text("#ifndef JSON_FORWARD_AMALGAMATED_H_INCLUDED")
93+
header.add_text("# define JSON_FORWARD_AMALGAMATED_H_INCLUDED")
94+
header.add_text("/// If defined, indicates that the source file is amalgamated")
9595
header.add_text("/// to prevent private header inclusion.")
9696
header.add_text("#define JSON_IS_AMALGAMATION")
9797
header.add_file("include/json/config.h")
9898
header.add_file("include/json/forwards.h")
99-
header.add_text("#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED")
99+
header.add_text("#endif //ifndef JSON_FORWARD_AMALGAMATED_H_INCLUDED")
100100

101101
target_forward_header_path = os.path.join(os.path.dirname(target_source_path),
102102
forward_header_include_path)
103-
print("Writing amalgated forward header to %r" % target_forward_header_path)
103+
print("Writing amalgamated forward header to %r" % target_forward_header_path)
104104
header.write_to(target_forward_header_path)
105105

106-
print("Amalgating source...")
106+
print("Amalgamating source...")
107107
source = AmalgamationFile(source_top_dir)
108-
source.add_text("/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/).")
108+
source.add_text("/// Json-cpp amalgamated source (http://jsoncpp.sourceforge.net/).")
109109
source.add_text('/// It is intended to be used with #include "%s"' % header_include_path)
110110
source.add_file("LICENSE", wrap_in_comment=True)
111111
source.add_text("")
@@ -123,20 +123,20 @@ def amalgamate_source(source_top_dir=None,
123123
source.add_file(os.path.join(lib_json, "json_value.cpp"))
124124
source.add_file(os.path.join(lib_json, "json_writer.cpp"))
125125

126-
print("Writing amalgated source to %r" % target_source_path)
126+
print("Writing amalgamated source to %r" % target_source_path)
127127
source.write_to(target_source_path)
128128

129129
def main():
130130
usage = """%prog [options]
131-
Generate a single amalgated source and header file from the sources.
131+
Generate a single amalgamated source and header file from the sources.
132132
"""
133133
from optparse import OptionParser
134134
parser = OptionParser(usage=usage)
135135
parser.allow_interspersed_args = False
136136
parser.add_option("-s", "--source", dest="target_source_path", action="store", default="dist/jsoncpp.cpp",
137137
help="""Output .cpp source path. [Default: %default]""")
138138
parser.add_option("-i", "--include", dest="header_include_path", action="store", default="json/json.h",
139-
help="""Header include path. Used to include the header from the amalgated source file. [Default: %default]""")
139+
help="""Header include path. Used to include the header from the amalgamated source file. [Default: %default]""")
140140
parser.add_option("-t", "--top-dir", dest="top_dir", action="store", default=os.getcwd(),
141141
help="""Source top-directory. [Default: %default]""")
142142
parser.enable_interspersed_args()
@@ -149,7 +149,7 @@ def main():
149149
sys.stderr.write(msg + "\n")
150150
sys.exit(1)
151151
else:
152-
print("Source succesfully amalagated")
152+
print("Source successfully amalgamated")
153153

154154
if __name__ == "__main__":
155155
main()

doc/doxyfile.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
271271
# parses. With this tag you can assign which parser to use for a given
272272
# extension. Doxygen has a built-in mapping, but you can override or extend it
273273
# using this tag. The format is ext=language, where ext is a file extension, and
274-
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
274+
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
275275
# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
276276
# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
277277
# (default is Fortran), use: inc=Fortran f=C.
@@ -1408,7 +1408,7 @@ FORMULA_FONTSIZE = 10
14081408
FORMULA_TRANSPARENT = YES
14091409

14101410
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
1411-
# http://www.mathjax.org) which uses client side Javascript for the rendering
1411+
# http://www.mathjax.org) which uses client side JavaScript for the rendering
14121412
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
14131413
# installed or if you want to formulas look prettier in the HTML output. When
14141414
# enabled you may also need to install MathJax separately and configure the path
@@ -1478,7 +1478,7 @@ MATHJAX_CODEFILE =
14781478
SEARCHENGINE = NO
14791479

14801480
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1481-
# implemented using a web server instead of a web client using Javascript. There
1481+
# implemented using a web server instead of a web client using JavaScript. There
14821482
# are two flavours of web server based searching depending on the
14831483
# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
14841484
# searching and an index file used by the script. When EXTERNAL_SEARCH is
@@ -1959,7 +1959,7 @@ PREDEFINED = "_MSC_VER=1400" \
19591959
EXPAND_AS_DEFINED =
19601960

19611961
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
1962-
# remove all refrences to function-like macros that are alone on a line, have an
1962+
# remove all references to function-like macros that are alone on a line, have an
19631963
# all uppercase name, and do not end with a semicolon. Such function macros are
19641964
# typically used for boiler-plate code, and will confuse the parser if not
19651965
# removed.

doc/web_doxyfile.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
271271
# parses. With this tag you can assign which parser to use for a given
272272
# extension. Doxygen has a built-in mapping, but you can override or extend it
273273
# using this tag. The format is ext=language, where ext is a file extension, and
274-
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
274+
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
275275
# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
276276
# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
277277
# (default is Fortran), use: inc=Fortran f=C.
@@ -1408,7 +1408,7 @@ FORMULA_FONTSIZE = 10
14081408
FORMULA_TRANSPARENT = YES
14091409

14101410
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
1411-
# http://www.mathjax.org) which uses client side Javascript for the rendering
1411+
# http://www.mathjax.org) which uses client side JavaScript for the rendering
14121412
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
14131413
# installed or if you want to formulas look prettier in the HTML output. When
14141414
# enabled you may also need to install MathJax separately and configure the path
@@ -1478,7 +1478,7 @@ MATHJAX_CODEFILE =
14781478
SEARCHENGINE = NO
14791479

14801480
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1481-
# implemented using a web server instead of a web client using Javascript. There
1481+
# implemented using a web server instead of a web client using JavaScript. There
14821482
# are two flavours of web server based searching depending on the
14831483
# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
14841484
# searching and an index file used by the script. When EXTERNAL_SEARCH is
@@ -1947,7 +1947,7 @@ PREDEFINED = "_MSC_VER=1400" \
19471947
EXPAND_AS_DEFINED =
19481948

19491949
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
1950-
# remove all refrences to function-like macros that are alone on a line, have an
1950+
# remove all references to function-like macros that are alone on a line, have an
19511951
# all uppercase name, and do not end with a semicolon. Such function macros are
19521952
# typically used for boiler-plate code, and will confuse the parser if not
19531953
# removed.

doxybuild.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def yesno(bool):
156156
def main():
157157
usage = """%prog
158158
Generates doxygen documentation in build/doxygen.
159-
Optionaly makes a tarball of the documentation to dist/.
159+
Optionally makes a tarball of the documentation to dist/.
160160
161161
Must be started in the project top directory.
162162
"""

include/json/config.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
#define JSON_USE_EXCEPTION 1
2626
#endif
2727

28-
/// If defined, indicates that the source file is amalgated
28+
/// If defined, indicates that the source file is amalgamated
2929
/// to prevent private header inclusion.
30-
/// Remarks: it is automatically defined in the generated amalgated header.
30+
/// Remarks: it is automatically defined in the generated amalgamated header.
3131
// #define JSON_IS_AMALGAMATION
3232

3333
#ifdef JSON_IN_CPPTL
@@ -78,7 +78,7 @@
7878

7979
#endif // defined(_MSC_VER)
8080

81-
// In c++11 the override keyword allows you to explicity define that a function
81+
// In c++11 the override keyword allows you to explicitly define that a function
8282
// is intended to override the base-class version. This makes the code more
8383
// managable and fixes a set of common hard-to-find bugs.
8484
#if __cplusplus >= 201103L

include/json/value.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ enum CommentPlacement {
116116

117117
/** \brief Lightweight wrapper to tag static string.
118118
*
119-
* Value constructor and objectValue member assignement takes advantage of the
119+
* Value constructor and objectValue member assignment takes advantage of the
120120
* StaticString and avoid the cost of string duplication when storing the
121121
* string or the member name.
122122
*

include/json/writer.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
9999
- "dropNullPlaceholders": false or true
100100
- Drop the "null" string from the writer's output for nullValues.
101101
Strictly speaking, this is not valid JSON. But when the output is being
102-
fed to a browser's Javascript, it makes for smaller output and the
102+
fed to a browser's JavaScript, it makes for smaller output and the
103103
browser can handle the output just fine.
104104
- "useSpecialFloats": false or true
105105
- If true, outputs non-finite floating point values in the following way:
@@ -169,7 +169,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API FastWriter
169169

170170
/** \brief Drop the "null" string from the writer's output for nullValues.
171171
* Strictly speaking, this is not valid JSON. But when the output is being
172-
* fed to a browser's Javascript, it makes for smaller output and the
172+
* fed to a browser's JavaScript, it makes for smaller output and the
173173
* browser can handle the output just fine.
174174
*/
175175
void dropNullPlaceholders();
@@ -183,7 +183,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API FastWriter
183183
void writeValue(const Value& value);
184184

185185
JSONCPP_STRING document_;
186-
bool yamlCompatiblityEnabled_;
186+
bool yamlCompatibilityEnabled_;
187187
bool dropNullPlaceholders_;
188188
bool omitEndingLineFeed_;
189189
};
@@ -234,7 +234,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API StyledWrite
234234
private:
235235
void writeValue(const Value& value);
236236
void writeArrayValue(const Value& value);
237-
bool isMultineArray(const Value& value);
237+
bool isMultilineArray(const Value& value);
238238
void pushValue(const JSONCPP_STRING& value);
239239
void writeIndent();
240240
void writeWithIndent(const JSONCPP_STRING& value);
@@ -307,7 +307,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API StyledStrea
307307
private:
308308
void writeValue(const Value& value);
309309
void writeArrayValue(const Value& value);
310-
bool isMultineArray(const Value& value);
310+
bool isMultilineArray(const Value& value);
311311
void pushValue(const JSONCPP_STRING& value);
312312
void writeIndent();
313313
void writeWithIndent(const JSONCPP_STRING& value);

makerelease.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def main():
265265
266266
Must be started in the project top directory.
267267
268-
Warning: --force should only be used when developping/testing the release script.
268+
Warning: --force should only be used when developing/testing the release script.
269269
"""
270270
from optparse import OptionParser
271271
parser = OptionParser(usage=usage)
@@ -377,7 +377,7 @@ def main():
377377
user=options.user, sftp=options.sftp)
378378
print('Source and doc release tarballs uploaded')
379379
else:
380-
print('No upload user specified. Web site and download tarbal were not uploaded.')
380+
print('No upload user specified. Web site and download tarball were not uploaded.')
381381
print('Tarball can be found at:', doc_tarball_path)
382382

383383
# Set next version number and commit

src/lib_json/json_tool.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ enum {
7171
typedef char UIntToStringBuffer[uintToStringBufferSize];
7272

7373
/** Converts an unsigned integer to string.
74-
* @param value Unsigned interger to convert to string
74+
* @param value Unsigned integer to convert to string
7575
* @param current Input/Output string buffer.
7676
* Must have at least uintToStringBufferSize chars free.
7777
*/

src/lib_json/json_writer.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int p
128128
snprintf(formatString, sizeof(formatString), "%%.%dg", precision);
129129

130130
// Print into the buffer. We need not request the alternative representation
131-
// that always has a decimal point because JSON doesn't distingish the
131+
// that always has a decimal point because JSON doesn't distinguish the
132132
// concepts of reals and integers.
133133
if (isfinite(value)) {
134134
len = snprintf(buffer, sizeof(buffer), formatString, value);
@@ -334,10 +334,10 @@ Writer::~Writer() {}
334334
// //////////////////////////////////////////////////////////////////
335335

336336
FastWriter::FastWriter()
337-
: yamlCompatiblityEnabled_(false), dropNullPlaceholders_(false),
337+
: yamlCompatibilityEnabled_(false), dropNullPlaceholders_(false),
338338
omitEndingLineFeed_(false) {}
339339

340-
void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; }
340+
void FastWriter::enableYAMLCompatibility() { yamlCompatibilityEnabled_ = true; }
341341

342342
void FastWriter::dropNullPlaceholders() { dropNullPlaceholders_ = true; }
343343

@@ -397,7 +397,7 @@ void FastWriter::writeValue(const Value& value) {
397397
if (it != members.begin())
398398
document_ += ',';
399399
document_ += valueToQuotedStringN(name.data(), static_cast<unsigned>(name.length()));
400-
document_ += yamlCompatiblityEnabled_ ? ": " : ":";
400+
document_ += yamlCompatibilityEnabled_ ? ": " : ":";
401401
writeValue(value[name]);
402402
}
403403
document_ += '}';
@@ -486,7 +486,7 @@ void StyledWriter::writeArrayValue(const Value& value) {
486486
if (size == 0)
487487
pushValue("[]");
488488
else {
489-
bool isArrayMultiLine = isMultineArray(value);
489+
bool isArrayMultiLine = isMultilineArray(value);
490490
if (isArrayMultiLine) {
491491
writeWithIndent("[");
492492
indent();
@@ -524,7 +524,7 @@ void StyledWriter::writeArrayValue(const Value& value) {
524524
}
525525
}
526526

527-
bool StyledWriter::isMultineArray(const Value& value) {
527+
bool StyledWriter::isMultilineArray(const Value& value) {
528528
ArrayIndex const size = value.size();
529529
bool isMultiLine = size * 3 >= rightMargin_;
530530
childValues_.clear();
@@ -703,7 +703,7 @@ void StyledStreamWriter::writeArrayValue(const Value& value) {
703703
if (size == 0)
704704
pushValue("[]");
705705
else {
706-
bool isArrayMultiLine = isMultineArray(value);
706+
bool isArrayMultiLine = isMultilineArray(value);
707707
if (isArrayMultiLine) {
708708
writeWithIndent("[");
709709
indent();
@@ -743,7 +743,7 @@ void StyledStreamWriter::writeArrayValue(const Value& value) {
743743
}
744744
}
745745

746-
bool StyledStreamWriter::isMultineArray(const Value& value) {
746+
bool StyledStreamWriter::isMultilineArray(const Value& value) {
747747
ArrayIndex const size = value.size();
748748
bool isMultiLine = size * 3 >= rightMargin_;
749749
childValues_.clear();
@@ -860,7 +860,7 @@ struct BuiltStyledStreamWriter : public StreamWriter
860860
private:
861861
void writeValue(Value const& value);
862862
void writeArrayValue(Value const& value);
863-
bool isMultineArray(Value const& value);
863+
bool isMultilineArray(Value const& value);
864864
void pushValue(JSONCPP_STRING const& value);
865865
void writeIndent();
866866
void writeWithIndent(JSONCPP_STRING const& value);
@@ -984,7 +984,7 @@ void BuiltStyledStreamWriter::writeArrayValue(Value const& value) {
984984
if (size == 0)
985985
pushValue("[]");
986986
else {
987-
bool isMultiLine = (cs_ == CommentStyle::All) || isMultineArray(value);
987+
bool isMultiLine = (cs_ == CommentStyle::All) || isMultilineArray(value);
988988
if (isMultiLine) {
989989
writeWithIndent("[");
990990
indent();
@@ -1026,7 +1026,7 @@ void BuiltStyledStreamWriter::writeArrayValue(Value const& value) {
10261026
}
10271027
}
10281028

1029-
bool BuiltStyledStreamWriter::isMultineArray(Value const& value) {
1029+
bool BuiltStyledStreamWriter::isMultilineArray(Value const& value) {
10301030
ArrayIndex const size = value.size();
10311031
bool isMultiLine = size * 3 >= rightMargin_;
10321032
childValues_.clear();

0 commit comments

Comments
 (0)