[ekg2-commit] r4102 - in trunk/plugins: gg ncurses: trunk/plugins/gg/commands.c trunk/plugins/ncurses/old.c
SVN commit
svn w toxygen.net
Sob, 12 Lip 2008, 20:20:44 CEST
Author: wiechu
Date: 2008-07-12 20:20:44 +0200 (Sat, 12 Jul 2008)
New Revision: 4102
Modified:
trunk/plugins/gg/commands.c
trunk/plugins/ncurses/old.c
Log:
fix compilation warning
Modified: trunk/plugins/gg/commands.c
===================================================================
--- trunk/plugins/gg/commands.c 2008-07-12 10:13:56 UTC (rev 4101)
+++ trunk/plugins/gg/commands.c 2008-07-12 18:20:44 UTC (rev 4102)
@@ -626,7 +626,7 @@
/* analiz�tekstu zrobimy w osobnym bloku dla porzdku */
{
unsigned char attr = 0, last_attr = 0;
- const unsigned char *p = msg, *end = p + xstrlen(p);
+ const unsigned char *p = msg, *end = p + xstrlen((char *) p);
int msglen = 0;
unsigned char rgb[3], last_rgb[3];
@@ -635,7 +635,7 @@
p++;
if (xisdigit(*p)) {
- int num = atoi(p);
+ int num = atoi((char *) p);
if (num < 0 || num > 15)
num = 0;
Modified: trunk/plugins/ncurses/old.c
===================================================================
--- trunk/plugins/ncurses/old.c 2008-07-12 10:13:56 UTC (rev 4101)
+++ trunk/plugins/ncurses/old.c 2008-07-12 18:20:44 UTC (rev 4102)
@@ -121,7 +121,7 @@
oldpromptlen = ncurses_current->prompt_len;
oldline = ncurses_line;
oldlines = ncurses_lines;
- ncurses_current->prompt = (char*) prompt ? prompt : format_find("password_input");
+ ncurses_current->prompt = (char*) (prompt ? prompt : format_find("password_input"));
ncurses_current->prompt_len = xstrlen(ncurses_current->prompt);
ncurses_update_real_prompt(ncurses_current);
ncurses_lines = NULL;
@@ -135,7 +135,7 @@
if (xwcslen(passa)) {
if (rprompt) {
- ncurses_current->prompt = (char*) *rprompt ? *rprompt : format_find("password_repeat");
+ ncurses_current->prompt = (char*) (*rprompt ? *rprompt : format_find("password_repeat"));
ncurses_current->prompt_len = xstrlen(ncurses_current->prompt);
ncurses_noecho = 1;
ncurses_update_real_prompt(ncurses_current);
@@ -312,13 +312,13 @@
#ifdef USE_UNICODE
n->prompt_real = normal_to_wcs(n->prompt);
#else
- n->prompt_real = xstrdup(n->prompt);
+ n->prompt_real = (CHAR_T *) xstrdup(n->prompt);
#endif
}
n->prompt_real_len = xwcslen(n->prompt_real);
if (n->prompt_real_len > maxlen) { /* need to cut it */
- const CHAR_T *dots = TEXT("...");
+ const CHAR_T *dots = (CHAR_T *) TEXT("...");
#ifdef USE_UNICODE
const wchar_t udots[2] = { 0x2026, 0 };
if (config_use_unicode) /* use unicode hellip, if using utf8 */
@@ -2309,7 +2309,7 @@
what[j] = what_j;
#else
/* sprawdzamy pisownie tego wyrazu */
- fillznak = (aspell_speller_check(spell_checker, &what[i], j - i) == 0) ? ASPELLCHAR : ' ';
+ fillznak = (aspell_speller_check(spell_checker, (char *) &what[i], j - i) == 0) ? ASPELLCHAR : ' ';
#endif
for (; i < j; i++)
@@ -2398,7 +2398,7 @@
#ifdef USE_UNICODE /* XXX: should we check config_use_unicode here? */
mvwaddwstr(input, 0, 0, ncurses_current->prompt_real);
#else
- mvwaddstr(input, 0, 0, ncurses_current->prompt_real);
+ mvwaddstr(input, 0, 0, (char *) ncurses_current->prompt_real);
#endif
if (ncurses_noecho) {
@@ -2757,7 +2757,7 @@
if (lastlog->isregex) { /* regexp */
#ifdef HAVE_REGEX_H
int rs;
- if (!(rs = regexec(&(lastlog->reg), n->backlog[i]->str.w, 0, NULL, 0)))
+ if (!(rs = regexec(&(lastlog->reg), (char *) n->backlog[i]->str.w, 0, NULL, 0)))
found = 1;
else if (rs != REG_NOMATCH) {
char errbuf[512];
@@ -2772,8 +2772,8 @@
#endif
} else { /* substring */
if (local_config_lastlog_case)
- found = !!xstrstr(n->backlog[i]->str.w, lastlog->expression);
- else found = !!xstrcasestr(n->backlog[i]->str.w, lastlog->expression);
+ found = !!xstrstr((char *) n->backlog[i]->str.w, lastlog->expression);
+ else found = !!xstrcasestr((char *) n->backlog[i]->str.w, lastlog->expression);
}
if (!config_lastlog_noitems && found && !items) { /* add header only when found */
Więcej informacji o liście dyskusyjnej ekg2-commit