Skip to content

Commit

Permalink
doc: Fix more spelling mistakes
Browse files Browse the repository at this point in the history
Found with a recent version of codespell.

Signed-off-by: Alexander Dahl <[email protected]>
  • Loading branch information
LeSpocky committed Jul 24, 2018
1 parent 2b989aa commit 0d34320
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion examples/session/session_ex1/restricted.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(void)
else {
puts(""
"<font face='arial, verdana' size='2' color='#ff0000'>In this page you can register"
"any session variable you want. Here is a good place to test session suport, and "
"any session variable you want. Here is a good place to test session support, and "
"<a href='show_vars.cgi'>here</a> you can see all already registered variables!!!|"
"</font>"
"<br>"
Expand Down
2 changes: 1 addition & 1 deletion examples/session/session_ex1/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int main(void)
" "
"<tr>"
"<td><font face='arial, verdana' size='2' color='#0000ff'>"
"This is the main page of LibCGI session suport test. Please choose one of the options"
"This is the main page of LibCGI session support test. Please choose one of the options"
"in the navigation bar.</font>"
"</td>"
"</tr>"
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_form/form2.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int main(void)
if (cgi_param("age"))
printf("Age: %s<br>", cgi_param("age"));
else
puts("Age: Emtpy<br>");
puts("Age: Empty<br>");

// GENDER
printf("Gender: %s<br>", cgi_param("gender"));
Expand Down
2 changes: 1 addition & 1 deletion examples/strings/explode.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int main()
cgi_process_form();
cgi_init_headers();

// The form was submited??
// The form was submitted??
if (cgi_param("action")) {
str = cgi_param("str");
delim = cgi_param("delim");
Expand Down
2 changes: 1 addition & 1 deletion include/libcgi/cgi.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ extern "C" {

// general purpose linked list. Actually isn't very portable
// because uses only 'name' and 'value' variables to store data.
// Problably, in a future release, this will be replaced by
// Probably, in a future release, this will be replaced by
// another type of struct
typedef struct formvarsA {
char *name;
Expand Down
2 changes: 1 addition & 1 deletion src/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void decodeblock( unsigned char in[4], unsigned char out[3] )
*/

/**
* Encodes a given tring to its base64 form.
* Encodes a given string to its base64 form.
*
* @param *str String to convert
* @return Base64 encoded String
Expand Down
6 changes: 3 additions & 3 deletions src/cgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ formvars *process_data(const char *query, formvars **start, formvars **last,

/**
* Process HTML form or URL data.
* Used to retrieve GET or POST data. It handles automaticaly the correct REQUEST_METHOD, so you don't need to afraid about it.
* Used to retrieve GET or POST data. It handles automatically the correct REQUEST_METHOD, so you don't need to afraid about it.
* @return Returns the contents of URL or FORM into a formvars variable, or NULL if FALSE. Most of time, you
* don't need any variable to store the form data, because is used an internal variable to manipulate the contents.
* @see cgi_init, cgi_init_headers
Expand Down Expand Up @@ -226,7 +226,7 @@ void cgi_fatal(const char *msg)

/**
* Include static files.
* Function used to include static data ( normaly html files ).
* Function used to include static data ( normally html files ).
* File contents will never be processed.
* Note that I don't scan for any special character. The reason
* I did it is, if the you are using this library, you have a shell
Expand Down Expand Up @@ -546,7 +546,7 @@ char *cgi_param(const char *var_name)
/**
* Sends a specific header.
* Sends a specific HTTP header. You won't need to add '\\n\\n' chars.
* @param header HTTP header to send, without new line characteres
* @param header HTTP header to send, without new line characters
* @return True
* @see cgi_init_headers
**/
Expand Down
2 changes: 1 addition & 1 deletion src/general.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ char **file(const char *filename, unsigned int *total)
// initial line length
columms = 100;

// How many characteres in the line
// How many characters in the line
char_count = 1;

i = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

/*****************************************************
* The varibles/functions beginning with sess_ are
* The variables/functions beginning with sess_ are
* for manipulation internly only. You can use
* the session_ like functions/variables
*****************************************************
Expand Down Expand Up @@ -197,7 +197,7 @@ int cgi_session_destroy()

// hhhmmm..
if (headers_initialized)
libcgi_error(E_WARNING, "Headers alreay sent. session_destroy() can't fully unregister the session");
libcgi_error(E_WARNING, "Headers already sent. session_destroy() can't fully unregister the session");
else
cgi_add_cookie(SESSION_COOKIE_NAME, "", 0, 0, 0, 0);

Expand Down
18 changes: 9 additions & 9 deletions src/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ char *addnslashes(char *s, int n)
* Add slashes to a string when necessary.
* Adds a '\' in every quote ( " ), apostrophe ( ' ) or backslash ( \ )
* It's useful when working with databases, for example, because
* someone can try insert this caracters to try hack the application...
* someone can try insert this characters to try hack the application...
* @param *s String to parse
* @return The new string, with slashes
* @see stripslashes, addnslashes
Expand Down Expand Up @@ -292,7 +292,7 @@ char *substr(char *src, const int start, const int count)
* @param token Character delimiter to search.
* @param total An integer variable passed as reference, which stores the total of
* itens of the array
* @return The array, where each item is one separeted by token
* @return The array, where each item is one separated by token
*
* \code
*
Expand Down Expand Up @@ -372,8 +372,8 @@ char **explode(char *src, const char *token, int *total)
}

/**
* Replace characteres in a string, but not more than 'n'.
* Replace all occourences of *delim on *src with characteres pointed by *with,
* Replace characters in a string, but not more than 'n'.
* Replace all occourences of *delim on *src with characters pointed by *with,
* stopping after 'n' char.
* @param *src String to parse
* @param *delim Character to search that will be replaced
Expand Down Expand Up @@ -422,7 +422,7 @@ char *str_nreplace(char *src, const char *delim, const char *with, int n)
for (i = 0; i < w_len; i++)
buf[counter++] = with[i];
}
// otherwise, only do a simple character subtitution
// otherwise, only do a simple character substitution
buf[counter++] = *with;
}
else
Expand All @@ -437,10 +437,10 @@ char *str_nreplace(char *src, const char *delim, const char *with, int n)
}

/**
* Replace characteres in a string.
* Replace all occourences of *delim on *src with characteres pointed by *with.
* Replace characters in a string.
* Replace all occourences of *delim on *src with characters pointed by *with.
* The problem with the following code is that the function only searches for the
* first character of *delim, ingoring the rest. Other problem is speed relacioned:
* first character of *delim, ignoring the rest. Other problem is speed relacioned:
* note that the function ever compare the length of *with to do the correct action.
* @param src String to parse
* @param delim Character to search that will be replaced
Expand Down Expand Up @@ -507,7 +507,7 @@ int strpos(char *s, char *ch)
* Delete count characters of s, starting in start
* @param s String to search
* @param start Initial offset to begin search
* @param count Number of characteres to delete
* @param count Number of characters to delete
* @return The new string
* @see strndel()
*
Expand Down

0 comments on commit 0d34320

Please sign in to comment.