mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 13:26:38 +02:00
core: fix typos in many comments and some strings
This commit is contained in:
@@ -1926,7 +1926,7 @@ command_help_list_plugin_commands (struct t_weechat_plugin *plugin,
|
||||
snprintf (str_format, sizeof (str_format),
|
||||
" %%-%ds", max_length);
|
||||
|
||||
/* auto compute number of colums, max size is 90% of chat width */
|
||||
/* auto compute number of columns, max size is 90% of chat width */
|
||||
cols = ((gui_current_window->win_chat_width * 90) / 100) / (max_length + 1);
|
||||
if (cols == 0)
|
||||
cols = 1;
|
||||
@@ -5118,7 +5118,7 @@ COMMAND_CALLBACK(upgrade)
|
||||
exec_args[3] = strdup (weechat_home);
|
||||
execvp (exec_args[0], exec_args);
|
||||
|
||||
/* this code should not be reached if execvp is ok */
|
||||
/* this code should not be reached if execvp is OK */
|
||||
string_iconv_fprintf (stderr, "\n\n*****\n");
|
||||
string_iconv_fprintf (stderr,
|
||||
_("***** Error: exec failed (program: \"%s\"), exiting WeeChat"),
|
||||
@@ -6113,7 +6113,7 @@ command_init ()
|
||||
" 50 > 100 ==> 0\n"
|
||||
" \"50\" > \"100\" ==> 1\n\n"
|
||||
"Some variables are replaced in expression, using the "
|
||||
"format ${variable}, variable can be, by order of prioity :\n"
|
||||
"format ${variable}, variable can be, by order of priority :\n"
|
||||
" 1. the name of an option (file.section.option)\n"
|
||||
" 2. the name of a local variable in buffer\n"
|
||||
" 3. a hdata name/variable (the value is automatically "
|
||||
|
||||
@@ -44,7 +44,7 @@ struct t_config_option;
|
||||
struct t_config_file
|
||||
{
|
||||
struct t_weechat_plugin *plugin; /* plugin which created this cfg */
|
||||
char *name; /* name (exemple: "weechat") */
|
||||
char *name; /* name (example: "weechat") */
|
||||
char *filename; /* filename (without path) */
|
||||
/* (example: "weechat.conf") */
|
||||
FILE *file; /* file pointer */
|
||||
@@ -123,7 +123,7 @@ struct t_config_option
|
||||
void *value; /* value */
|
||||
int null_value_allowed; /* null value allowed ? */
|
||||
int (*callback_check_value) /* called to check value before */
|
||||
(void *data, /* assiging new value */
|
||||
(void *data, /* assigning new value */
|
||||
struct t_config_option *option,
|
||||
const char *value);
|
||||
void *callback_check_value_data; /* data sent to check callback */
|
||||
|
||||
@@ -64,7 +64,7 @@ int debug_dump_active = 0;
|
||||
void
|
||||
debug_dump (int crash)
|
||||
{
|
||||
/* prevent reentrance */
|
||||
/* prevent reentrancy */
|
||||
if (debug_dump_active)
|
||||
exit (EXIT_FAILURE);
|
||||
|
||||
@@ -473,7 +473,7 @@ debug_infolists ()
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL, "%d infolists in memory (%s)", count,
|
||||
(count == 0) ?
|
||||
"this is ok!" :
|
||||
"this is OK!" :
|
||||
"WARNING: this is probably a memory leak in WeeChat or "
|
||||
"plugins/scripts!");
|
||||
|
||||
|
||||
+1
-1
@@ -518,7 +518,7 @@ eval_expression_internal (const char *expr, struct t_hashtable *pointers,
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
/* closing parenthese not found */
|
||||
/* closing parenthesis not found */
|
||||
if (pos[0] != ')')
|
||||
goto end;
|
||||
sub_expr = string_strndup (expr2 + 1, pos - expr2 - 1);
|
||||
|
||||
+4
-4
@@ -522,7 +522,7 @@ hook_command_build_completion (struct t_hook_command *hook_command)
|
||||
}
|
||||
|
||||
/*
|
||||
* build strings with concatentaion of items from different templates
|
||||
* build strings with concatenation of items from different templates
|
||||
* for each argument: these strings will be used when completing argument
|
||||
* if we can't find which template to use (for example for first argument)
|
||||
*/
|
||||
@@ -546,7 +546,7 @@ hook_command_build_completion (struct t_hook_command *hook_command)
|
||||
hook_command->cplt_template_args_concat[i] = malloc (length);
|
||||
if (hook_command->cplt_template_args_concat[i])
|
||||
{
|
||||
/* concatene items with "|" as separator */
|
||||
/* concatenate items with "|" as separator */
|
||||
weelist_remove_all (list);
|
||||
hook_command->cplt_template_args_concat[i][0] = '\0';
|
||||
for (j = 0; j < hook_command->cplt_num_templates; j++)
|
||||
@@ -1476,7 +1476,7 @@ hook_process_child (struct t_hook *hook_process)
|
||||
if (HOOK_PROCESS(hook_process, options))
|
||||
{
|
||||
/*
|
||||
* count number of arguments given in the hashable options,
|
||||
* count number of arguments given in the hashtable options,
|
||||
* keys are: "arg1", "arg2", ...
|
||||
*/
|
||||
while (1)
|
||||
@@ -1539,7 +1539,7 @@ hook_process_child (struct t_hook *hook_process)
|
||||
execvp (exec_args[0], exec_args);
|
||||
}
|
||||
|
||||
/* should not be executed if execvp was ok */
|
||||
/* should not be executed if execvp was OK */
|
||||
if (exec_args)
|
||||
string_free_split (exec_args);
|
||||
fprintf (stderr, "Error with command '%s'\n",
|
||||
|
||||
+2
-2
@@ -157,8 +157,8 @@ struct t_hook_command
|
||||
char ***cplt_template_args; /* arguments for each template */
|
||||
|
||||
/* concatenation of arg N for each template */
|
||||
int cplt_template_num_args_concat; /* number of concatened arguments */
|
||||
char **cplt_template_args_concat; /* concatened arguments */
|
||||
int cplt_template_num_args_concat; /* number of concatenated arguments */
|
||||
char **cplt_template_args_concat; /* concatenated arguments */
|
||||
};
|
||||
|
||||
/* hook command run */
|
||||
|
||||
@@ -236,7 +236,7 @@ network_pass_httpproxy (struct t_proxy *proxy, int sock, const char *address,
|
||||
if (CONFIG_STRING(proxy->options[PROXY_OPTION_USERNAME])
|
||||
&& CONFIG_STRING(proxy->options[PROXY_OPTION_USERNAME])[0])
|
||||
{
|
||||
/* authentification */
|
||||
/* authentication */
|
||||
snprintf (authbuf, sizeof (authbuf), "%s:%s",
|
||||
CONFIG_STRING(proxy->options[PROXY_OPTION_USERNAME]),
|
||||
(CONFIG_STRING(proxy->options[PROXY_OPTION_PASSWORD])) ?
|
||||
@@ -249,7 +249,7 @@ network_pass_httpproxy (struct t_proxy *proxy, int sock, const char *address,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no authentification */
|
||||
/* no authentication */
|
||||
length = snprintf (buffer, sizeof (buffer),
|
||||
"CONNECT %s:%d HTTP/1.0\r\n\r\n", address, port);
|
||||
}
|
||||
@@ -264,7 +264,7 @@ network_pass_httpproxy (struct t_proxy *proxy, int sock, const char *address,
|
||||
if (memcmp (buffer, "HTTP/", 5) || memcmp (buffer + 9, "200", 3))
|
||||
return 0;
|
||||
|
||||
/* connection ok */
|
||||
/* connection OK */
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ network_resolve (const char *hostname, char *ip, int *version)
|
||||
|
||||
freeaddrinfo (res);
|
||||
|
||||
/* resolution ok */
|
||||
/* resolution OK */
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ network_pass_socks4proxy (struct t_proxy *proxy, int sock, const char *address,
|
||||
if (network_recv_with_retry (sock, buffer, sizeof (buffer), 0) < 2)
|
||||
return 0;
|
||||
|
||||
/* connection ok */
|
||||
/* connection OK */
|
||||
if ((buffer[0] == 0) && (buffer[1] == 90))
|
||||
return 1;
|
||||
|
||||
@@ -511,7 +511,7 @@ network_pass_socks5proxy (struct t_proxy *proxy, int sock, const char *address,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* connection ok */
|
||||
/* connection OK */
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ network_connect (int sock, const struct sockaddr *addr, socklen_t addrlen)
|
||||
|
||||
/* for non-blocking sockets, the connect() may fail with EINPROGRESS,
|
||||
* if this happens, we wait for writability on socket and check
|
||||
* the option SO_ERROR, which is 0 if connect is ok (see man connect)
|
||||
* the option SO_ERROR, which is 0 if connect is OK (see man connect)
|
||||
*/
|
||||
while (1)
|
||||
{
|
||||
@@ -962,7 +962,7 @@ network_connect_child (struct t_hook *hook_connect)
|
||||
|
||||
status_str[0] = '0' + WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND;
|
||||
|
||||
/* try all IP addresses found, stop when connection is ok */
|
||||
/* try all IP addresses found, stop when connection is OK */
|
||||
sock = -1;
|
||||
for (i = 0; i < num_hosts; i++)
|
||||
{
|
||||
@@ -1327,7 +1327,7 @@ network_connect_child_read_cb (void *arg_hook_connect, int fd)
|
||||
{
|
||||
if (buffer[0] - '0' == WEECHAT_HOOK_CONNECT_OK)
|
||||
{
|
||||
/* connection ok, read IP address */
|
||||
/* connection OK, read IP address */
|
||||
buf_size[5] = '\0';
|
||||
num_read = read (HOOK_CONNECT(hook_connect, child_read),
|
||||
buf_size, 5);
|
||||
|
||||
@@ -1491,7 +1491,7 @@ string_split_command (const char *command, char separator)
|
||||
buffer[str_idx] = '\0';
|
||||
str_idx = -1;
|
||||
p = buffer;
|
||||
/* strip white spaces a the begining of the line */
|
||||
/* strip white spaces a the beginning of the line */
|
||||
while (*p == ' ') p++;
|
||||
if (p && p[0])
|
||||
array[arr_idx++] = strdup (p);
|
||||
|
||||
@@ -82,7 +82,7 @@ version_get_git ()
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the WeeCht version + the git version (between brackets, and only if
|
||||
* Returns the WeeChat version + the git version (between brackets, and only if
|
||||
* it is not empty).
|
||||
*
|
||||
* Examples:
|
||||
|
||||
+2
-2
@@ -262,7 +262,7 @@ weechat_parse_args (int argc, char *argv[])
|
||||
{
|
||||
/*
|
||||
* Electric-fence is not working fine when gnutls loads
|
||||
* certificates and valgrind reports many memory errors with gnutls.
|
||||
* certificates and Valgrind reports many memory errors with gnutls.
|
||||
* This option disables the init/deinit of gnutls,
|
||||
* it must NOT be used for other purposes!
|
||||
*/
|
||||
@@ -482,7 +482,7 @@ main (int argc, char *argv[])
|
||||
hdata_init (); /* initialize hdata */
|
||||
hook_init (); /* initialize hooks */
|
||||
debug_init (); /* hook signals for debug */
|
||||
gui_main_pre_init (&argc, &argv); /* pre-initiliaze interface */
|
||||
gui_main_pre_init (&argc, &argv); /* pre-initialize interface */
|
||||
command_init (); /* initialize WeeChat commands */
|
||||
completion_init (); /* add core completion hooks */
|
||||
gui_key_init (); /* init keys */
|
||||
|
||||
Reference in New Issue
Block a user