Skip to content

Commit

Permalink
Fix typos in comments (#194)
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Stoeckmann <[email protected]>
  • Loading branch information
stoeckmann authored Jan 22, 2024
1 parent 40a032d commit 0da7f20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/libeconf_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extern "C" {
#endif

struct econf_ext_value {
/** Values of a given key in form of an string array.*/
/** Values of a given key in form of a string array.*/
char **values;
/** Path of the configuration file where this value has been read. */
char *file;
Expand Down
12 changes: 6 additions & 6 deletions lib/getfilecontents.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ read_file(econf_file *ef, const char *file,
while (*name && isspace((unsigned)*name))
name++;

/* go through all comment characters and check, if one of could be found */
/* go through all comment characters and check if one of them could be found */
for (size_t i = 0; i < strlen(comment); i++) {
p = strchr(name, comment[i]);
if (p)
Expand Down Expand Up @@ -366,7 +366,7 @@ read_file(econf_file *ef, const char *file,
continue;
}

/* Valid delimters are defined */
/* Valid delimiters are defined */
/* go to the end of the name */
data = name;
while (*data && !(isspace((unsigned)*data) ||
Expand Down Expand Up @@ -437,17 +437,17 @@ read_file(econf_file *ef, const char *file,
}
}

/* Go on. It is not an multiline entry */
/* Go on. It is not a multiline entry */

if (!*name || data == name)
continue;

if (*data == '\0')
/* No seperator -> return NULL pointer, there is no value,
/* No separator -> return NULL pointer, there is no value,
not even an empty key */
data = NULL;
else {
/* go to the begin of the value */
/* go to the beginning of the value */
while (*data && isspace((unsigned)*data))
data++;
if (!has_wsp && !delim_seen) {
Expand Down Expand Up @@ -492,7 +492,7 @@ read_file(econf_file *ef, const char *file,
p--;
while (p > data && (isspace((unsigned)*p)))
p--;
/* Strip double quotes only if both leading and trainling quote exist. */
/* Strip double quotes only if both leading and trailing quotes exist. */
if (p >= data && quote_seen) {
if (*p == '"')
p--;
Expand Down

0 comments on commit 0da7f20

Please sign in to comment.