Commit d25150ac61e3396563a430b79140aa8d3daa9270

Authored by Stéphane Raimbault
1 parent 56d1d95d

Fix many typos

Thanks to @peternewman
ISSUE_TEMPLATE.md
1 1 Please read the following carefully before submitting this new issue.
2 2  
3   - - Please ensure, that you are really reporting a bug. When in doubt,
4   - post a message on https://groups.google.com/forum/#!forum/libmodbus
5   - or send an email to libmodbus@googlegroups.com
  3 +- Please ensure, that you are really reporting a bug. When in doubt, post a
  4 + message on <https://groups.google.com/forum/#!forum/libmodbus> or send an
  5 + email to libmodbus@googlegroups.com
6 6  
7   - - Please do not open issues to ask questions about using libmodbus.
8   - Use the mailing list for this as there are many more people reading
9   - that list, who could help you.
  7 +- Please do not open issues to ask questions about using libmodbus. Use the
  8 + mailing list for this as there are many more people reading that list, who
  9 + could help you.
10 10  
11   - - When using libmodbus from a distribution (Debian, Fedora...), please
12   - report the bug first in the bug tracker of the distribution. The
13   - reason for doing so is that the package maintainer should have a chance
14   - to look at the issue first as it might be a packaging error. If/when
15   - the package maintainer comes to the conclusion that is really an upstream
16   - bug, then he/she will usually report it here by himself/herself.
17   - This is because he/she is interested in staying in the notification chain
18   - to decide about a backport as soon as a bugfix is available.
19   - Otherwise you (distribution user) will be asked to do so explicitely.
  11 +- When using libmodbus from a distribution (Debian, Fedora...), please report
  12 + the bug first in the bug tracker of the distribution. The reason for doing so
  13 + is that the package maintainer should have a chance to look at the issue first
  14 + as it might be a packaging error. If/when the package maintainer comes to the
  15 + conclusion that is really an upstream bug, then he/she will usually report it
  16 + here by himself/herself. This is because he/she is interested in staying in
  17 + the notification chain to decide about a backport as soon as a bugfix is
  18 + available. Otherwise you (distribution user) will be asked to do so
  19 + explicitly.
20 20  
21   -When you get here and you are still convinced that you want report a bug:
  21 +When you get here and you are still convinced that you want to report a bug:
22 22  
23   - - *Use a clear and decriptive title* for the issue to identify
  23 +- *Use a clear and decriptive title* for the issue to identify
24 24  
25   - - *Which version of libmodbus are you using?* you can obtain this information
  25 +- *Which version of libmodbus are you using?* you can obtain this information
26 26 from your package manager or by running `pkg-config --modversion libmodbus`.
27 27 You can provide the sha1 of the commit if you have fetched the code with `git`.
28 28  
29   - - *Which operating system are you using?*
  29 +- *Which operating system are you using?*
30 30  
31   - - *Describe the exact steps which reproduce the problem* in as many details as
  31 +- *Describe the exact steps which reproduce the problem* in as many details as
32 32 possible. For example, the software/equipement which runs the Modbus server, how
33 33 the clients are connected (TCP, RTU, ASCII) and the source code you are using.
34 34  
35   - - *Enable the debug mode*, libmodbus provides a function to display the content
  35 +- *Enable the debug mode*, libmodbus provides a function to display the content
36 36 of the Modbus messages and it's very convenient to analyze issues
37   - (http://libmodbus.org/docs/latest/modbus_set_debug.html).
  37 + (<http://libmodbus.org/docs/latest/modbus_set_debug.html>).
38 38  
39 39 Good bug reports provide right and quick fixes!
40 40  
... ...
MIGRATION
... ... @@ -16,7 +16,7 @@ dynamically allocated structure modbus_t.
16 16  
17 17 - all function and constants are respectively prefixed by modbus_ or MODBUS_.
18 18  
19   -- the POSIX error conventions are used (if an error occured, -1 or NULL is
  19 +- the POSIX error conventions are used (if an error occurred, -1 or NULL is
20 20 returned and errno is set accordingly).
21 21  
22 22 - coil status and discretes inputs are just bits and force/preset actions have
... ...
... ... @@ -423,7 +423,7 @@ libmodbus 2.1.0 (2010-03-24)
423 423 - Fix report slave ID request
424 424 Patch (bzr) provided by Paul Fertser.
425 425 - Fix #425604 - Conditional jump or move depends on uninitialised value(s)
426   - Occurs on first occurence of slave timeout.
  426 + Occurs on first occurrence of slave timeout.
427 427 Reported by Henrik Munktell.
428 428 - Fix #457200 - FreeBSD support
429 429 Patch provided by Norbert Koch.
... ...
doc/modbus_mapping_new_start_address.txt
... ... @@ -21,9 +21,9 @@ The _modbus_mapping_new_start_address()_ function shall allocate four arrays to
21 21 store bits, input bits, registers and inputs registers. The pointers are stored
22 22 in modbus_mapping_t structure. All values of the arrays are initialized to zero.
23 23  
24   -The different starting adresses make it possible to place the mapping at any
  24 +The different starting addresses make it possible to place the mapping at any
25 25 address in each address space. This way, you can give access to values stored
26   -at high adresses without allocating memory from the address zero, for eg. to
  26 +at high addresses without allocating memory from the address zero, for eg. to
27 27 make available registers from 10000 to 10009, you can use:
28 28  
29 29 [source,c]
... ...
doc/modbus_receive_confirmation.txt
... ... @@ -30,7 +30,7 @@ avoid crashes of your server.
30 30 RETURN VALUE
31 31 ------------
32 32 The function shall store the confirmation request in _rsp_ and return the
33   -response length if sucessful. The returned request length can be zero if the
  33 +response length if successful. The returned request length can be zero if the
34 34 indication request is ignored (eg. a query for another slave in RTU
35 35 mode). Otherwise it shall return -1 and set errno.
36 36  
... ...
doc/modbus_reply.txt
... ... @@ -3,7 +3,7 @@ modbus_reply(3)
3 3  
4 4 NAME
5 5 ----
6   -modbus_reply - send a reponse to the received request
  6 +modbus_reply - send a response to the received request
7 7  
8 8  
9 9 SYNOPSIS
... ...
doc/modbus_reply_exception.txt
... ... @@ -3,7 +3,7 @@ modbus_reply_exception(3)
3 3  
4 4 NAME
5 5 ----
6   -modbus_reply_exception - send an exception reponse
  6 +modbus_reply_exception - send an exception response
7 7  
8 8  
9 9 SYNOPSIS
... ...
doc/modbus_set_float_badc.txt
... ... @@ -15,7 +15,7 @@ SYNOPSIS
15 15 DESCRIPTION
16 16 -----------
17 17 The *modbus_set_float_badc()* function shall set a float to 4 bytes in swapped
18   -bytes Modbus format (BADC insted of ABCD). The _dest_ array must be pointer on
  18 +bytes Modbus format (BADC instead of ABCD). The _dest_ array must be pointer on
19 19 two 16 bits values to be able to store the full result of the conversion.
20 20  
21 21  
... ...
src/modbus-rtu.c
... ... @@ -842,7 +842,7 @@ static int _modbus_rtu_connect(modbus_t *ctx)
842 842 ONCLR ant others needs OPOST to be enabled
843 843 */
844 844  
845   - /* Raw ouput */
  845 + /* Raw output */
846 846 tios.c_oflag &=~ OPOST;
847 847  
848 848 /* C_CC Control characters
... ...
src/modbus-tcp-private.h
... ... @@ -14,7 +14,7 @@
14 14 #define _MODBUS_TCP_CHECKSUM_LENGTH 0
15 15  
16 16 /* In both structures, the transaction ID must be placed on first position
17   - to have a quick access not dependant of the TCP backend */
  17 + to have a quick access not dependent of the TCP backend */
18 18 typedef struct _modbus_tcp {
19 19 /* Extract from MODBUS Messaging on TCP/IP Implementation Guide V1.0b
20 20 (page 23/46):
... ...
src/modbus-tcp.c
... ... @@ -154,7 +154,7 @@ static int _modbus_tcp_prepare_response_tid(const uint8_t *req, int *req_length)
154 154  
155 155 static int _modbus_tcp_send_msg_pre(uint8_t *req, int req_length)
156 156 {
157   - /* Substract the header length to the message length */
  157 + /* Subtract the header length to the message length */
158 158 int mbap_length = req_length - 6;
159 159  
160 160 req[4] = mbap_length >> 8;
... ... @@ -905,7 +905,7 @@ modbus_t* modbus_new_tcp_pi(const char *node, const char *service)
905 905 dest_size = sizeof(char) * _MODBUS_TCP_PI_SERVICE_LENGTH;
906 906 ret_size = strlcpy(ctx_tcp_pi->service, service, dest_size);
907 907 } else {
908   - /* Empty service is not allowed, error catched below. */
  908 + /* Empty service is not allowed, error caught below. */
909 909 ret_size = 0;
910 910 }
911 911  
... ...
src/modbus.c
... ... @@ -1406,7 +1406,7 @@ int modbus_mask_write_register(modbus_t *ctx, int addr, uint16_t and_mask, uint1
1406 1406 int rc;
1407 1407 int req_length;
1408 1408 /* The request length can not exceed _MIN_REQ_LENGTH - 2 and 4 bytes to
1409   - * store the masks. The ugly substraction is there to remove the 'nb' value
  1409 + * store the masks. The ugly subtraction is there to remove the 'nb' value
1410 1410 * (2 bytes) which is not used. */
1411 1411 uint8_t req[_MIN_REQ_LENGTH + 2];
1412 1412  
... ...
tests/README.md
... ... @@ -21,7 +21,7 @@ programs are essential to test the Modbus protocol implementation and libmodbus
21 21 behavior.
22 22  
23 23 - `bandwidth-server-one`, `bandwidth-server-many-up` and `bandwidth-client`
24   - return very useful information about the performance of transfert rate between
  24 + return very useful information about the performance of transfer rate between
25 25 the server and the client. `bandwidth-server-one` can only handles one
26 26 connection at once with a client whereas `bandwidth-server-many-up` opens a
27 27 connection for each new clients (with a limit).
... ...
tests/bandwidth-client.c
... ... @@ -59,7 +59,7 @@ int main(int argc, char *argv[])
59 59 use_backend = RTU;
60 60 n_loop = 100;
61 61 } else {
62   - printf("Usage:\n %s [tcp|rtu] - Modbus client to measure data bandwith\n\n", argv[0]);
  62 + printf("Usage:\n %s [tcp|rtu] - Modbus client to measure data bandwidth\n\n", argv[0]);
63 63 exit(1);
64 64 }
65 65 } else {
... ... @@ -104,7 +104,7 @@ int main(int argc, char *argv[])
104 104 elapsed = end - start;
105 105  
106 106 rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
107   - printf("Transfert rate in points/seconds:\n");
  107 + printf("Transfer rate in points/seconds:\n");
108 108 printf("* %d points/s\n", rate);
109 109 printf("\n");
110 110  
... ... @@ -141,7 +141,7 @@ int main(int argc, char *argv[])
141 141 elapsed = end - start;
142 142  
143 143 rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
144   - printf("Transfert rate in points/seconds:\n");
  144 + printf("Transfer rate in points/seconds:\n");
145 145 printf("* %d registers/s\n", rate);
146 146 printf("\n");
147 147  
... ... @@ -180,7 +180,7 @@ int main(int argc, char *argv[])
180 180 elapsed = end - start;
181 181  
182 182 rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
183   - printf("Transfert rate in points/seconds:\n");
  183 + printf("Transfer rate in points/seconds:\n");
184 184 printf("* %d registers/s\n", rate);
185 185 printf("\n");
186 186  
... ...
tests/bandwidth-server-one.c
... ... @@ -38,7 +38,7 @@ int main(int argc, char *argv[])
38 38 } else if (strcmp(argv[1], "rtu") == 0) {
39 39 use_backend = RTU;
40 40 } else {
41   - printf("Usage:\n %s [tcp|rtu] - Modbus client to measure data bandwith\n\n", argv[0]);
  41 + printf("Usage:\n %s [tcp|rtu] - Modbus client to measure data bandwidth\n\n", argv[0]);
42 42 exit(1);
43 43 }
44 44 } else {
... ...
tests/unit-test-client.c
... ... @@ -533,7 +533,7 @@ int main(int argc, char *argv[])
533 533 rc = modbus_report_slave_id(ctx, NB_REPORT_SLAVE_ID, tab_rp_bits);
534 534 ASSERT_TRUE(rc == NB_REPORT_SLAVE_ID, "");
535 535  
536   - /* Slave ID is an arbitraty number for libmodbus */
  536 + /* Slave ID is an arbitrary number for libmodbus */
537 537 ASSERT_TRUE(rc > 0, "");
538 538  
539 539 /* Run status indicator is ON */
... ... @@ -622,7 +622,7 @@ int main(int argc, char *argv[])
622 622 printf("1/2 Too small byte timeout (3ms < 5ms): ");
623 623 ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, "");
624 624  
625   - /* Wait remaing bytes before flushing */
  625 + /* Wait remaining bytes before flushing */
626 626 usleep(11 * 5000);
627 627 modbus_flush(ctx);
628 628  
... ...