Browse Source

Fix many typos

Thanks to @peternewman
Stéphane Raimbault 3 years ago
parent
commit
d25150ac61

+ 22 - 22
ISSUE_TEMPLATE.md

@@ -1,40 +1,40 @@
 Please read the following carefully before submitting this new issue.
 Please read the following carefully before submitting this new issue.
 
 
- - Please ensure, that you are really reporting a bug. When in doubt,
-   post a message on https://groups.google.com/forum/#!forum/libmodbus
-   or send an email to libmodbus@googlegroups.com
+- Please ensure, that you are really reporting a bug. When in doubt, post a
+  message on <https://groups.google.com/forum/#!forum/libmodbus> or send an
+  email to libmodbus@googlegroups.com
 
 
- - Please do not open issues to ask questions about using libmodbus.
-   Use the mailing list for this as there are many more people reading
-   that list, who could help you.
+- Please do not open issues to ask questions about using libmodbus. Use the
+  mailing list for this as there are many more people reading that list, who
+  could help you.
 
 
- - When using libmodbus from a distribution (Debian, Fedora...), please
-   report the bug first in the bug tracker of the distribution. The
-   reason for doing so is that the package maintainer should have a chance
-   to look at the issue first as it might be a packaging error. If/when
-   the package maintainer comes to the conclusion that is really an upstream
-   bug, then he/she will usually report it here by himself/herself.
-   This is because he/she is interested in staying in the notification chain
-   to decide about a backport as soon as a bugfix is available.
-   Otherwise you (distribution user) will be asked to do so explicitely.
+- When using libmodbus from a distribution (Debian, Fedora...), please report
+  the bug first in the bug tracker of the distribution. The reason for doing so
+  is that the package maintainer should have a chance to look at the issue first
+  as it might be a packaging error. If/when the package maintainer comes to the
+  conclusion that is really an upstream bug, then he/she will usually report it
+  here by himself/herself. This is because he/she is interested in staying in
+  the notification chain to decide about a backport as soon as a bugfix is
+  available. Otherwise you (distribution user) will be asked to do so
+  explicitly.
 
 
-When you get here and you are still convinced that you want report a bug:
+When you get here and you are still convinced that you want to report a bug:
 
 
- - *Use a clear and decriptive title* for the issue to identify
+- *Use a clear and decriptive title* for the issue to identify
 
 
- - *Which version of libmodbus are you using?* you can obtain this information
+- *Which version of libmodbus are you using?* you can obtain this information
    from your package manager or by running `pkg-config --modversion libmodbus`.
    from your package manager or by running `pkg-config --modversion libmodbus`.
    You can provide the sha1 of the commit if you have fetched the code with `git`.
    You can provide the sha1 of the commit if you have fetched the code with `git`.
 
 
- - *Which operating system are you using?*
+- *Which operating system are you using?*
 
 
- - *Describe the exact steps which reproduce the problem* in as many details as
+- *Describe the exact steps which reproduce the problem* in as many details as
    possible. For example, the software/equipement which runs the Modbus server, how
    possible. For example, the software/equipement which runs the Modbus server, how
    the clients are connected (TCP, RTU, ASCII) and the source code you are using.
    the clients are connected (TCP, RTU, ASCII) and the source code you are using.
 
 
- - *Enable the debug mode*, libmodbus provides a function to display the content
+- *Enable the debug mode*, libmodbus provides a function to display the content
    of the Modbus messages and it's very convenient to analyze issues
    of the Modbus messages and it's very convenient to analyze issues
-   (http://libmodbus.org/docs/latest/modbus_set_debug.html).
+   (<http://libmodbus.org/docs/latest/modbus_set_debug.html>).
 
 
 Good bug reports provide right and quick fixes!
 Good bug reports provide right and quick fixes!
 
 

+ 1 - 1
MIGRATION

@@ -16,7 +16,7 @@ dynamically allocated structure modbus_t.
 
 
 - all function and constants are respectively prefixed by modbus_ or MODBUS_.
 - all function and constants are respectively prefixed by modbus_ or MODBUS_.
 
 
-- the POSIX error conventions are used (if an error occured, -1 or NULL is
+- the POSIX error conventions are used (if an error occurred, -1 or NULL is
   returned and errno is set accordingly).
   returned and errno is set accordingly).
 
 
 - coil status and discretes inputs are just bits and force/preset actions have
 - coil status and discretes inputs are just bits and force/preset actions have

+ 1 - 1
NEWS

@@ -423,7 +423,7 @@ libmodbus 2.1.0 (2010-03-24)
 - Fix report slave ID request
 - Fix report slave ID request
   Patch (bzr) provided by Paul Fertser.
   Patch (bzr) provided by Paul Fertser.
 - Fix #425604 - Conditional jump or move depends on uninitialised value(s)
 - Fix #425604 - Conditional jump or move depends on uninitialised value(s)
-  Occurs on first occurence of slave timeout.
+  Occurs on first occurrence of slave timeout.
   Reported by Henrik Munktell.
   Reported by Henrik Munktell.
 - Fix #457200 - FreeBSD support
 - Fix #457200 - FreeBSD support
   Patch provided by Norbert Koch.
   Patch provided by Norbert Koch.

+ 2 - 2
doc/modbus_mapping_new_start_address.txt

@@ -21,9 +21,9 @@ The _modbus_mapping_new_start_address()_ function shall allocate four arrays to
 store bits, input bits, registers and inputs registers. The pointers are stored
 store bits, input bits, registers and inputs registers. The pointers are stored
 in modbus_mapping_t structure. All values of the arrays are initialized to zero.
 in modbus_mapping_t structure. All values of the arrays are initialized to zero.
 
 
-The different starting adresses make it possible to place the mapping at any
+The different starting addresses make it possible to place the mapping at any
 address in each address space. This way, you can give access to values stored
 address in each address space. This way, you can give access to values stored
-at high adresses without allocating memory from the address zero, for eg. to
+at high addresses without allocating memory from the address zero, for eg. to
 make available registers from 10000 to 10009, you can use:
 make available registers from 10000 to 10009, you can use:
 
 
 [source,c]
 [source,c]

+ 1 - 1
doc/modbus_receive_confirmation.txt

@@ -30,7 +30,7 @@ avoid crashes of your server.
 RETURN VALUE
 RETURN VALUE
 ------------
 ------------
 The function shall store the confirmation request in _rsp_ and return the
 The function shall store the confirmation request in _rsp_ and return the
-response length if sucessful. The returned request length can be zero if the
+response length if successful. The returned request length can be zero if the
 indication request is ignored (eg. a query for another slave in RTU
 indication request is ignored (eg. a query for another slave in RTU
 mode). Otherwise it shall return -1 and set errno.
 mode). Otherwise it shall return -1 and set errno.
 
 

+ 1 - 1
doc/modbus_reply.txt

@@ -3,7 +3,7 @@ modbus_reply(3)
 
 
 NAME
 NAME
 ----
 ----
-modbus_reply - send a reponse to the received request
+modbus_reply - send a response to the received request
 
 
 
 
 SYNOPSIS
 SYNOPSIS

+ 1 - 1
doc/modbus_reply_exception.txt

@@ -3,7 +3,7 @@ modbus_reply_exception(3)
 
 
 NAME
 NAME
 ----
 ----
-modbus_reply_exception - send an exception reponse
+modbus_reply_exception - send an exception response
 
 
 
 
 SYNOPSIS
 SYNOPSIS

+ 1 - 1
doc/modbus_set_float_badc.txt

@@ -15,7 +15,7 @@ SYNOPSIS
 DESCRIPTION
 DESCRIPTION
 -----------
 -----------
 The *modbus_set_float_badc()* function shall set a float to 4 bytes in swapped
 The *modbus_set_float_badc()* function shall set a float to 4 bytes in swapped
-bytes Modbus format (BADC insted of ABCD). The _dest_ array must be pointer on
+bytes Modbus format (BADC instead of ABCD). The _dest_ array must be pointer on
 two 16 bits values to be able to store the full result of the conversion.
 two 16 bits values to be able to store the full result of the conversion.
 
 
 
 

+ 1 - 1
src/modbus-rtu.c

@@ -842,7 +842,7 @@ static int _modbus_rtu_connect(modbus_t *ctx)
        ONCLR ant others needs OPOST to be enabled
        ONCLR ant others needs OPOST to be enabled
     */
     */
 
 
-    /* Raw ouput */
+    /* Raw output */
     tios.c_oflag &=~ OPOST;
     tios.c_oflag &=~ OPOST;
 
 
     /* C_CC         Control characters
     /* C_CC         Control characters

+ 1 - 1
src/modbus-tcp-private.h

@@ -14,7 +14,7 @@
 #define _MODBUS_TCP_CHECKSUM_LENGTH    0
 #define _MODBUS_TCP_CHECKSUM_LENGTH    0
 
 
 /* In both structures, the transaction ID must be placed on first position
 /* In both structures, the transaction ID must be placed on first position
-   to have a quick access not dependant of the TCP backend */
+   to have a quick access not dependent of the TCP backend */
 typedef struct _modbus_tcp {
 typedef struct _modbus_tcp {
     /* Extract from MODBUS Messaging on TCP/IP Implementation Guide V1.0b
     /* Extract from MODBUS Messaging on TCP/IP Implementation Guide V1.0b
        (page 23/46):
        (page 23/46):

+ 2 - 2
src/modbus-tcp.c

@@ -154,7 +154,7 @@ static int _modbus_tcp_prepare_response_tid(const uint8_t *req, int *req_length)
 
 
 static int _modbus_tcp_send_msg_pre(uint8_t *req, int req_length)
 static int _modbus_tcp_send_msg_pre(uint8_t *req, int req_length)
 {
 {
-    /* Substract the header length to the message length */
+    /* Subtract the header length to the message length */
     int mbap_length = req_length - 6;
     int mbap_length = req_length - 6;
 
 
     req[4] = mbap_length >> 8;
     req[4] = mbap_length >> 8;
@@ -905,7 +905,7 @@ modbus_t* modbus_new_tcp_pi(const char *node, const char *service)
         dest_size = sizeof(char) * _MODBUS_TCP_PI_SERVICE_LENGTH;
         dest_size = sizeof(char) * _MODBUS_TCP_PI_SERVICE_LENGTH;
         ret_size = strlcpy(ctx_tcp_pi->service, service, dest_size);
         ret_size = strlcpy(ctx_tcp_pi->service, service, dest_size);
     } else {
     } else {
-        /* Empty service is not allowed, error catched below. */
+        /* Empty service is not allowed, error caught below. */
         ret_size = 0;
         ret_size = 0;
     }
     }
 
 

+ 1 - 1
src/modbus.c

@@ -1406,7 +1406,7 @@ int modbus_mask_write_register(modbus_t *ctx, int addr, uint16_t and_mask, uint1
     int rc;
     int rc;
     int req_length;
     int req_length;
     /* The request length can not exceed _MIN_REQ_LENGTH - 2 and 4 bytes to
     /* The request length can not exceed _MIN_REQ_LENGTH - 2 and 4 bytes to
-     * store the masks. The ugly substraction is there to remove the 'nb' value
+     * store the masks. The ugly subtraction is there to remove the 'nb' value
      * (2 bytes) which is not used. */
      * (2 bytes) which is not used. */
     uint8_t req[_MIN_REQ_LENGTH + 2];
     uint8_t req[_MIN_REQ_LENGTH + 2];
 
 

+ 1 - 1
tests/README.md

@@ -21,7 +21,7 @@ programs are essential to test the Modbus protocol implementation and libmodbus
 behavior.
 behavior.
 
 
 - `bandwidth-server-one`, `bandwidth-server-many-up` and `bandwidth-client`
 - `bandwidth-server-one`, `bandwidth-server-many-up` and `bandwidth-client`
- return very useful information about the performance of transfert rate between
+ return very useful information about the performance of transfer rate between
  the server and the client. `bandwidth-server-one` can only handles one
  the server and the client. `bandwidth-server-one` can only handles one
  connection at once with a client whereas `bandwidth-server-many-up` opens a
  connection at once with a client whereas `bandwidth-server-many-up` opens a
  connection for each new clients (with a limit).
  connection for each new clients (with a limit).

+ 4 - 4
tests/bandwidth-client.c

@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
             use_backend = RTU;
             use_backend = RTU;
             n_loop = 100;
             n_loop = 100;
         } else {
         } else {
-            printf("Usage:\n  %s [tcp|rtu] - Modbus client to measure data bandwith\n\n", argv[0]);
+            printf("Usage:\n  %s [tcp|rtu] - Modbus client to measure data bandwidth\n\n", argv[0]);
             exit(1);
             exit(1);
         }
         }
     } else {
     } else {
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
     elapsed = end - start;
     elapsed = end - start;
 
 
     rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
     rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
-    printf("Transfert rate in points/seconds:\n");
+    printf("Transfer rate in points/seconds:\n");
     printf("* %d points/s\n", rate);
     printf("* %d points/s\n", rate);
     printf("\n");
     printf("\n");
 
 
@@ -141,7 +141,7 @@ int main(int argc, char *argv[])
     elapsed = end - start;
     elapsed = end - start;
 
 
     rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
     rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
-    printf("Transfert rate in points/seconds:\n");
+    printf("Transfer rate in points/seconds:\n");
     printf("* %d registers/s\n", rate);
     printf("* %d registers/s\n", rate);
     printf("\n");
     printf("\n");
 
 
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
     elapsed = end - start;
     elapsed = end - start;
 
 
     rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
     rate = (n_loop * nb_points) * G_MSEC_PER_SEC / (end - start);
-    printf("Transfert rate in points/seconds:\n");
+    printf("Transfer rate in points/seconds:\n");
     printf("* %d registers/s\n", rate);
     printf("* %d registers/s\n", rate);
     printf("\n");
     printf("\n");
 
 

+ 1 - 1
tests/bandwidth-server-one.c

@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
         } else if (strcmp(argv[1], "rtu") == 0) {
         } else if (strcmp(argv[1], "rtu") == 0) {
             use_backend = RTU;
             use_backend = RTU;
         } else {
         } else {
-            printf("Usage:\n  %s [tcp|rtu] - Modbus client to measure data bandwith\n\n", argv[0]);
+            printf("Usage:\n  %s [tcp|rtu] - Modbus client to measure data bandwidth\n\n", argv[0]);
             exit(1);
             exit(1);
         }
         }
     } else {
     } else {

+ 2 - 2
tests/unit-test-client.c

@@ -533,7 +533,7 @@ int main(int argc, char *argv[])
     rc = modbus_report_slave_id(ctx, NB_REPORT_SLAVE_ID, tab_rp_bits);
     rc = modbus_report_slave_id(ctx, NB_REPORT_SLAVE_ID, tab_rp_bits);
     ASSERT_TRUE(rc == NB_REPORT_SLAVE_ID, "");
     ASSERT_TRUE(rc == NB_REPORT_SLAVE_ID, "");
 
 
-    /* Slave ID is an arbitraty number for libmodbus */
+    /* Slave ID is an arbitrary number for libmodbus */
     ASSERT_TRUE(rc > 0, "");
     ASSERT_TRUE(rc > 0, "");
 
 
     /* Run status indicator is ON */
     /* Run status indicator is ON */
@@ -622,7 +622,7 @@ int main(int argc, char *argv[])
         printf("1/2 Too small byte timeout (3ms < 5ms): ");
         printf("1/2 Too small byte timeout (3ms < 5ms): ");
         ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, "");
         ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, "");
 
 
-        /* Wait remaing bytes before flushing */
+        /* Wait remaining bytes before flushing */
         usleep(11 * 5000);
         usleep(11 * 5000);
         modbus_flush(ctx);
         modbus_flush(ctx);