Skip to content

Commit 6640189

Browse files
committed
fix typos
1 parent 21b0cb1 commit 6640189

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ Remember that the library makes use of C++11 features and therefore you have to
4545

4646
The library was developed and tested with GCC 4.6.1
4747

48-
Note that VS2013 is not C++11 compilant and will therefore not work out of the box. See [here](https://code.google.com/p/fast-cpp-csv-parser/issues/detail?id=6) for what needs to be adjusted to make the code work.
48+
Note that VS2013 is not C++11 compliant and will therefore not work out of the box. See [here](https://code.google.com/p/fast-cpp-csv-parser/issues/detail?id=6) for what needs to be adjusted to make the code work.
4949

5050
## Documentation
5151

52-
The libary provides two classes:
52+
The library provides two classes:
5353

5454
* `LineReader`: A class to efficiently read large files line by line.
5555
* `CSVReader`: A class that efficiently reads large CSV files.
@@ -90,7 +90,7 @@ public:
9090
};
9191
```
9292

93-
The read function should fill the provided buffer with at most `size` bytes from the data source. It should return the number of bytes actually written to the buffer. If data source has run out of bytes (because for example an end of file was reached) then the function should return 0. If a fatal error occures then you can throw an exception. Note that the function can be called both from the main and the worker thread. However, it is guarenteed that they do not call the function at the same time.
93+
The read function should fill the provided buffer with at most `size` bytes from the data source. It should return the number of bytes actually written to the buffer. If data source has run out of bytes (because for example an end of file was reached) then the function should return 0. If a fatal error occurs then you can throw an exception. Note that the function can be called both from the main and the worker thread. However, it is guaranteed that they do not call the function at the same time.
9494

9595
Lines are read by calling the `next_line` function. It returns a pointer to a null terminated C-string that contains the line. If the end of file is reached a null pointer is returned. The newline character is not included in the string. You may modify the string as long as you do not write past the null terminator. The string stays valid until the destructor is called or until next_line is called again. Windows and `*`nix newlines are handled transparently. UTF-8 BOMs are automatically ignored and missing newlines at the end of the file are no problem.
9696

@@ -191,7 +191,7 @@ Examples:
191191

192192
The constructors and the file location functions are exactly the same as for `LineReader`. See its documentation for details.
193193

194-
There are three methods that deal with headers. The `read_header` methods reads a line from the file and rearranges the columns to match that order. It also checks whether all necessary columns are present. The `set_header` method does *not* read any input. Use it if the file does not have any header. Obviously it is impossible to rearrange columns or check for their availability when using it. The order in the file and in the program must match when using `set_header`. The `has_column` method checks whether a column is present in the file. The first argument of `read_header` is a bitfield that determines how the function should react to column mismatches. The default behavior is to throw an `error::extra_column_in_header` exception if the file contains more columns than expected and an `error::missing_column_in_header` when there are not enough. This behavior can be altered using the following flags.
194+
There are three methods that deal with headers. The `read_header` methods reads a line from the file and rearranges the columns to match that order. It also checks whether all necessary columns are present. The `set_header` method does *not* read any input. Use it if the file does not have any header. Obviously it is impossible to rearrange columns or check for their availability when using it. The order in the file and in the program must match when using `set_header`. The `has_column` method checks whether a column is present in the file. The first argument of `read_header` is a bit field that determines how the function should react to column mismatches. The default behavior is to throw an `error::extra_column_in_header` exception if the file contains more columns than expected and an `error::missing_column_in_header` when there are not enough. This behavior can be altered using the following flags.
195195

196196
* `ignore_no_column`: The default behavior, no flags are set
197197
* `ignore_extra_column`: If a column with a name is in the file but not in the argument list, then it is silently ignored.
@@ -257,7 +257,7 @@ A: Read a `char*` and parse the string. At first this seems expensive but it is
257257

258258
Q: I get lots of compiler errors when compiling the header! Please fix it. :(
259259

260-
A: Have you enabled the C++11 mode of your compiler? If you use GCC you have to add -std=c++0x to the commandline. If this does not resolve the problem, then please open a ticket.
260+
A: Have you enabled the C++11 mode of your compiler? If you use GCC you have to add -std=c++0x to the command line. If this does not resolve the problem, then please open a ticket.
261261

262262

263263
Q: The library crashes when parsing large files! Please fix it. :(

csv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,11 @@ template <class overflow_policy, class T> void parse(char *col, T &x) {
10361036
// Mute unused variable compiler warning
10371037
(void)col;
10381038
(void)x;
1039-
// GCC evalutes "false" when reading the template and
1039+
// GCC evaluates "false" when reading the template and
10401040
// "sizeof(T)!=sizeof(T)" only when instantiating it. This is why
10411041
// this strange construct is used.
10421042
static_assert(sizeof(T) != sizeof(T),
1043-
"Can not parse this type. Only buildin integrals, floats, "
1043+
"Can not parse this type. Only builtin integrals, floats, "
10441044
"char, char*, const char* and std::string are supported");
10451045
}
10461046

0 commit comments

Comments
 (0)