From svn w toxygen.net Sat Nov 1 17:42:22 2008 From: svn w toxygen.net (SVN commit) Date: Sat, 1 Nov 2008 17:42:22 +0100 (CET) Subject: [ekg2-commit] r4734 - trunk/plugins/jabber: trunk/plugins/jabber/jabber_handlers.c Message-ID: <20081101164222.313DE17B1F@toxygen.net> Author: darkjames Date: 2008-11-01 17:42:21 +0100 (Sat, 01 Nov 2008) New Revision: 4734 Modified: trunk/plugins/jabber/jabber_handlers.c Log: fix typo, sesion -> session (lazy_bum) Modified: trunk/plugins/jabber/jabber_handlers.c =================================================================== --- trunk/plugins/jabber/jabber_handlers.c 2008-10-30 13:37:43 UTC (rev 4733) +++ trunk/plugins/jabber/jabber_handlers.c 2008-11-01 16:42:21 UTC (rev 4734) @@ -238,7 +238,7 @@ if (!xstrcmp(another->data, "DIGEST-MD5")) print("xmpp_feature_sub", session_name(s), j->server, "SASL", another->data, "Default"); else if (!xstrcmp(another->data, "PLAIN")) - print("xmpp_feature_sub", session_name(s), j->server, "SASL", another->data, "/sesion plaintext_passwd"); + print("xmpp_feature_sub", session_name(s), j->server, "SASL", another->data, "/session plaintext_passwd"); else print("xmpp_feature_sub_unknown", session_name(s), j->server, "SASL", __(another->data), ""); } } From svn w toxygen.net Sat Nov 15 21:37:12 2008 From: svn w toxygen.net (SVN commit) Date: Sat, 15 Nov 2008 21:37:12 +0100 (CET) Subject: [ekg2-commit] r4735 - trunk/plugins/ncurses: trunk/plugins/ncurses/old.c Message-ID: <20081115203712.60F6917B1F@toxygen.net> Author: darkjames Date: 2008-11-15 21:37:11 +0100 (Sat, 15 Nov 2008) New Revision: 4735 Modified: trunk/plugins/ncurses/old.c Log: - remove dead code, add note about useless call. Modified: trunk/plugins/ncurses/old.c =================================================================== --- trunk/plugins/ncurses/old.c 2008-11-01 16:42:21 UTC (rev 4734) +++ trunk/plugins/ncurses/old.c 2008-11-15 20:37:11 UTC (rev 4735) @@ -1303,12 +1303,9 @@ /* * update_header() * - * uaktualnia nagłówek okna i wyświetla go ponownie. - * - * - commit - czy wyświetlić od razu? + * uaktualnia nagłówek okna */ -static void update_header(int commit) -{ +static void update_header() { int y; if (!ncurses_header) @@ -1324,9 +1321,6 @@ for (x = 0; x <= ncurses_status->_maxx; x++) waddch(ncurses_header, ' '); } - - if (commit) - ncurses_commit(); } /* @@ -2684,7 +2678,7 @@ else wresize(header, config_header_size, stdscr->_maxx + 1); - update_header(0); + update_header(); /* note: do wywalenia, nie robi nic wiecej niz update_statusbar() zrobi kilka linijek nizej */ } if (!config_header_size && header) { From svn w toxygen.net Sun Nov 23 16:39:59 2008 From: svn w toxygen.net (SVN commit) Date: Sun, 23 Nov 2008 16:39:59 +0100 (CET) Subject: [ekg2-commit] r4736 - trunk/ekg: trunk/ekg/ekg.c trunk/ekg/legacyconfig.c Message-ID: <20081123154000.0375617B1F@toxygen.net> Author: porridge Date: 2008-11-23 16:39:59 +0100 (Sun, 23 Nov 2008) New Revision: 4736 Modified: trunk/ekg/ekg.c trunk/ekg/legacyconfig.c Log: Use -1 as the special value of config_version to mean "user config file not present". Using 0 for that purpose was incorrect: 0 means "config written by an old version, without config upgrades support". Modified: trunk/ekg/ekg.c =================================================================== --- trunk/ekg/ekg.c 2008-11-15 20:37:11 UTC (rev 4735) +++ trunk/ekg/ekg.c 2008-11-23 15:39:59 UTC (rev 4736) @@ -905,7 +905,9 @@ theme_plugins_init(); scripts_init(); - config_read(NULL); + /* If user does not have a config, don't bug her about config upgrades. */ + if (config_read(NULL) == -1) + config_version = -1; /* jeśli ma być theme, niech będzie theme */ if (load_theme) theme_read(load_theme, 1); Modified: trunk/ekg/legacyconfig.c =================================================================== --- trunk/ekg/legacyconfig.c 2008-11-15 20:37:11 UTC (rev 4735) +++ trunk/ekg/legacyconfig.c 2008-11-23 15:39:59 UTC (rev 4736) @@ -42,7 +42,7 @@ else if (config_version == 0) print("console_charset_using", config_console_charset); - if (config_version == 0 || config_version >= current_config_version) + if (config_version == -1 || config_version >= current_config_version) return; print("config_upgrade_begin"); From svn w toxygen.net Sun Nov 23 22:41:16 2008 From: svn w toxygen.net (SVN commit) Date: Sun, 23 Nov 2008 22:41:16 +0100 (CET) Subject: [ekg2-commit] r4737 - trunk/ekg: trunk/ekg/ekg.c trunk/ekg/legacyconfig.c Message-ID: <20081123214116.ACC2717B1F@toxygen.net> Author: darkjames Date: 2008-11-23 22:41:16 +0100 (Sun, 23 Nov 2008) New Revision: 4737 Modified: trunk/ekg/ekg.c trunk/ekg/legacyconfig.c Log: - don't favour female users (s/her//) :) we don't have sex checker anyway :) - when config_version == -1, we should set config_version to current one. Modified: trunk/ekg/ekg.c =================================================================== --- trunk/ekg/ekg.c 2008-11-23 15:39:59 UTC (rev 4736) +++ trunk/ekg/ekg.c 2008-11-23 21:41:16 UTC (rev 4737) @@ -905,7 +905,7 @@ theme_plugins_init(); scripts_init(); - /* If user does not have a config, don't bug her about config upgrades. */ + /* If user does not have a config, don't bug about config upgrades. */ if (config_read(NULL) == -1) config_version = -1; Modified: trunk/ekg/legacyconfig.c =================================================================== --- trunk/ekg/legacyconfig.c 2008-11-23 15:39:59 UTC (rev 4736) +++ trunk/ekg/legacyconfig.c 2008-11-23 21:41:16 UTC (rev 4737) @@ -39,14 +39,17 @@ if (xstrcasecmp(console_charset, config_console_charset)) print("console_charset_bad", console_charset, config_console_charset); - else if (config_version == 0) + else if (config_version == 0 || config_version == -1) print("console_charset_using", config_console_charset); - if (config_version == -1 || config_version >= current_config_version) + if (config_version == -1) + config_version = current_config_version; + + if (config_version >= current_config_version) return; print("config_upgrade_begin"); - + switch (config_version) { /* versions MUST be sorted, break MUST NOT be used */ case 0: /* jabber SASL behavior change */ print("config_upgrade_major", From svn w toxygen.net Mon Nov 24 19:49:19 2008 From: svn w toxygen.net (SVN commit) Date: Mon, 24 Nov 2008 19:49:19 +0100 (CET) Subject: [ekg2-commit] r4738 - branches: +branches/c++_renames/ Message-ID: <20081124184919.402C317B1F@toxygen.net> Author: porridge Date: 2008-11-24 19:49:18 +0100 (Mon, 24 Nov 2008) New Revision: 4738 Added: branches/c++_renames/ Log: Created a branch for changing some names to be acceptable to a C++ compiler. This is a rather invasive change, so let's not mess trunk with it for now. We'll merge into trunk when it's ready. Copied: branches/c++_renames (from rev 4737, trunk) From svn w toxygen.net Mon Nov 24 20:02:23 2008 From: svn w toxygen.net (SVN commit) Date: Mon, 24 Nov 2008 20:02:23 +0100 (CET) Subject: [ekg2-commit] r4739 - in branches/c++_renames: ekg plugins/feed plugins/gg plugins/gsm plugins/gtk plugins/httprc_xajax plugins/irc plugins/jabber plugins/logs plugins/ncurses plugins/oss plugins/pcm plugins/perl plugins/python plugins/readline plugins/remote plugins/ruby plugins/sim plugins/xosd: branches/c++_renames/ekg/audio.c branches/c++_renames/ekg/audio.h branches/c++_renames/ekg/ekg.c branches/c++_renames/ekg/scripts.c branches/c++_renames/ekg/scripts.h branches/c++_renames/ekg/stuff.c branches/c++_renames/ekg/stuff.h branches/c++_renames/ekg/themes.c branches/c++_renames/ekg/themes.h branches/c++_renames/ekg/userlist.h branches/c++_renames/ekg/windows.h branches/c++_renames/plugins/feed/feed.c branches/c++_renames/plugins/feed/feed.h branches/c++_renames/plugins/gg/dcc.c branches/c++_renames/plugins/gsm/main.c branches/c++_renames/plugins/gtk/main.h branches/c++_renames/plugins/gtk/maingui.c branches/c++_renames/plugins/httprc_xajax/httprc_xajax.c branches/! c++_renames/plugins/irc/misc.c branches/c++_renames/plugins/irc/people.c branches/c++_renames/plugins/jabber/commands.c branches/c++_renames/plugins/jabber/jabber.c branches/c++_renames/plugins/jabber/jabber.h branches/c++_renames/plugins/jabber/jabber_dcc.c branches/c++_renames/plugins/jabber/jabber_dcc.h branches/c++_renames/plugins/jabber/jabber_handlers.c branches/c++_renames/plugins/jabber/jabber_handlers_iq_result.inc branches/c++_renames/plugins/logs/main.c branches/c++_renames/plugins/ncurses/bindings.c branches/c++_renames/plugins/ncurses/contacts.c branches/c++_renames/plugins/ncurses/main.c branches/c++_renames/plugins/ncurses/mouse.c branches/c++_renames/plugins/ncurses/old.c branches/c++_renames/plugins/ncurses/old.h branches/c++_renames/plugins/oss/oss.c branches/c++_renames/plugins/pcm/main.c branches/c++_renames/plugins/perl/perl_core.c branches/c++_renames/plugins/python/python.c branches/c++_renames/plugins/readline/main.c branches/c++_renames/plugins/read! line/ui-readline.h branches/c++_renames/plugins/remote/remote.c branches/c++_renames/plugins/ruby/ruby_ekg.c branches/c++_renames/plugins/sim/simlite.c branches/c++_renames/plugins/xosd/xosd.c Message-ID: <20081124190223.C509C17B1F@toxygen.net> Author: porridge Date: 2008-11-24 20:02:22 +0100 (Mon, 24 Nov 2008) New Revision: 4739 Modified: branches/c++_renames/ekg/audio.c branches/c++_renames/ekg/audio.h branches/c++_renames/ekg/ekg.c branches/c++_renames/ekg/scripts.c branches/c++_renames/ekg/scripts.h branches/c++_renames/ekg/stuff.c branches/c++_renames/ekg/stuff.h branches/c++_renames/ekg/themes.c branches/c++_renames/ekg/themes.h branches/c++_renames/ekg/userlist.h branches/c++_renames/ekg/windows.h branches/c++_renames/plugins/feed/feed.c branches/c++_renames/plugins/feed/feed.h branches/c++_renames/plugins/gg/dcc.c branches/c++_renames/plugins/gsm/main.c branches/c++_renames/plugins/gtk/main.h branches/c++_renames/plugins/gtk/maingui.c branches/c++_renames/plugins/httprc_xajax/httprc_xajax.c branches/c++_renames/plugins/irc/misc.c branches/c++_renames/plugins/irc/people.c branches/c++_renames/plugins/jabber/commands.c branches/c++_renames/plugins/jabber/jabber.c branches/c++_renames/plugins/jabber/jabber.h branches/c++_renames/plugins/jabber/jabber_dcc.c branches/c++_renames/plugins/jabber/jabber_dcc.h branches/c++_renames/plugins/jabber/jabber_handlers.c branches/c++_renames/plugins/jabber/jabber_handlers_iq_result.inc branches/c++_renames/plugins/logs/main.c branches/c++_renames/plugins/ncurses/bindings.c branches/c++_renames/plugins/ncurses/contacts.c branches/c++_renames/plugins/ncurses/main.c branches/c++_renames/plugins/ncurses/mouse.c branches/c++_renames/plugins/ncurses/old.c branches/c++_renames/plugins/ncurses/old.h branches/c++_renames/plugins/oss/oss.c branches/c++_renames/plugins/pcm/main.c branches/c++_renames/plugins/perl/perl_core.c branches/c++_renames/plugins/python/python.c branches/c++_renames/plugins/readline/main.c branches/c++_renames/plugins/readline/ui-readline.h branches/c++_renames/plugins/remote/remote.c branches/c++_renames/plugins/ruby/ruby_ekg.c branches/c++_renames/plugins/sim/simlite.c branches/c++_renames/plugins/xosd/xosd.c Log: Renamed "private" to "priv_data" basically everywhere. It might not be strictly necessary in all places, but I thought it's better for consistency. Modified: branches/c++_renames/ekg/audio.c =================================================================== --- branches/c++_renames/ekg/audio.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/audio.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -392,7 +392,7 @@ va_end(ap); if (!aio || !out) return NULL; - if (!(priv = aio->private)) return NULL; + if (!(priv = aio->priv_data)) return NULL; if (way == AUDIO_READ) directory = "__input"; if (way == AUDIO_WRITE) directory = "__output"; @@ -472,7 +472,7 @@ int fd = -1; int suc = 1; - if (type == AUDIO_CONTROL_GET && !(priv = aio->private)) return NULL; + if (type == AUDIO_CONTROL_GET && !(priv = aio->priv_data)) return NULL; va_start(ap, aio); while ((attr = va_arg(ap, char *))) { @@ -538,13 +538,13 @@ aio = xmalloc(sizeof(audio_io_t)); aio->a = &stream_audio; aio->fd = fd; - aio->private = priv; + aio->priv_data = priv; priv->parent = aio; } else if (type == AUDIO_CONTROL_DEINIT && aio) { - if (aio->private) { - stream_private_t *priv = aio->private; + if (aio->priv_data) { + stream_private_t *priv = aio->priv_data; xfree(priv->file); xfree(priv->format); @@ -586,7 +586,7 @@ if (!w) debug("stream_handle() watch_t: 0x%x\n", w); if (!w) return -1; - len = w(type, fd, audio->buffer, audio->private); + len = w(type, fd, audio->buffer, audio->priv_data); if (type) { close(fd); @@ -622,7 +622,7 @@ if (!w) debug("stream_handle() watch_t: 0x%x\n", w); if (!w) return -1; - len = w(type, fd, audio->buffer, audio->private); + len = w(type, fd, audio->buffer, audio->priv_data); if (len > 0 && s->output) { /* if watch write do nothing */ if (!codec) { @@ -633,9 +633,9 @@ } else { int res = -1; if (codec->way == CODEC_CODE) { - res = codec->c->code_handler(type, audio->buffer, s->output->buffer, codec->private); + res = codec->c->code_handler(type, audio->buffer, s->output->buffer, codec->priv_data); } else if (s->codec->way == CODEC_DECODE) { - res = codec->c->decode_handler(type, audio->buffer, s->output->buffer, codec->private); + res = codec->c->decode_handler(type, audio->buffer, s->output->buffer, codec->priv_data); } /* debug("[AUDIO, CODEC, RECODE]: %d\n", res); */ if (res > 0) { @@ -647,7 +647,7 @@ if (s->output->fd == -1) { int res; debug("[audio_handle_write] in queue: %d bytes.... ", s->output->buffer->len); - res = s->output->a->write_handler(type, -1, s->output->buffer, s->output->private); + res = s->output->a->write_handler(type, -1, s->output->buffer, s->output->priv_data); debug(" ... wrote:%d bytes (handler: 0x%x) ", res, s->output->a->write_handler); if (res > 0) { string_remove(s->output->buffer, res); Modified: branches/c++_renames/ekg/audio.h =================================================================== --- branches/c++_renames/ekg/audio.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/audio.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -79,7 +79,7 @@ audio_handler_func_t *read_handler; audio_handler_func_t *write_handler; - void *private; + void *priv_data; } audio_t; typedef struct { @@ -87,7 +87,7 @@ int fd; unsigned int outb; /* how many bytes go through handler */ string_t buffer; - void *private; + void *priv_data; } audio_io_t; typedef struct codec { @@ -97,18 +97,18 @@ void *(*control_handler)(audio_control_t, audio_way_t, void *, ...); /* initing / checking if audio_codec_t is correct / deiniting */ - /* IN: int type, string_t input, string_t output, void *private + /* IN: int type, string_t input, string_t output, void *priv_data * OUT: how many bytes he code/decode */ int (*code_handler)(int, string_t, string_t, void *); int (*decode_handler)(int, string_t, string_t, void *); - void *private; + void *priv_data; } codec_t; typedef struct { codec_t *c; /* codec_t * */ codec_way_t way; /* CODEC_CODE CODEC_DECODE */ - void *private; + void *priv_data; } audio_codec_t; typedef struct stream { @@ -119,7 +119,7 @@ audio_codec_t *codec; audio_io_t *output; - void *private; + void *priv_data; } stream_t; int stream_create(char *name, audio_io_t *in, audio_codec_t *co, audio_io_t *out); Modified: branches/c++_renames/ekg/ekg.c =================================================================== --- branches/c++_renames/ekg/ekg.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/ekg.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -255,7 +255,7 @@ } if (c->handler) - c->handler(c, c->pid, c->name, WEXITSTATUS(status), c->private); + c->handler(c, c->pid, c->name, WEXITSTATUS(status), c->priv_data); c = children_removei(c); } Modified: branches/c++_renames/ekg/scripts.c =================================================================== --- branches/c++_renames/ekg/scripts.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/scripts.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -217,7 +217,7 @@ for (l = script_vars; l; l = l->next) { script_var_t *v = l->data; if (!scr || v->scr == scr) { - print("script_varlist", v->self->name, v->value, v->private); + print("script_varlist", v->self->name, v->value, v->priv_data); i++; } } @@ -462,7 +462,7 @@ fprintf(f, "%s\n", v->name); if (free) { /* xfree(v->value); variables_free() free it. */ - xfree(v->private); /* should be NULL here. */ + xfree(v->priv_data); /* should be NULL here. */ xfree(v->name); xfree(v); } @@ -513,7 +513,7 @@ int script_command_unbind(script_command_t *temp, int free) { int notfound = 1; /* TODO */ - SCRIPT_UNBIND_HANDLER(SCRIPT_COMMANDTYPE, temp->private); + SCRIPT_UNBIND_HANDLER(SCRIPT_COMMANDTYPE, temp->priv_data); if (notfound) commands_remove(temp->self); return list_remove(&script_commands, temp, 1); @@ -522,7 +522,7 @@ int script_query_unbind(script_query_t *temp, int free) { - SCRIPT_UNBIND_HANDLER(SCRIPT_QUERYTYPE, temp->private); + SCRIPT_UNBIND_HANDLER(SCRIPT_QUERYTYPE, temp->priv_data); query_free(temp->self); return list_remove(&script_queries, temp, 1); } @@ -540,7 +540,7 @@ } else temp = l->data; } - SCRIPT_UNBIND_HANDLER(SCRIPT_PLUGINTYPE, temp->private); + SCRIPT_UNBIND_HANDLER(SCRIPT_PLUGINTYPE, temp->priv_data); plugin_unregister(temp->self); xfree(temp->self->name); xfree(temp->self); @@ -553,7 +553,7 @@ temp->removed = 1; if (remove) timers_remove(temp->self); - SCRIPT_UNBIND_HANDLER(SCRIPT_TIMERTYPE, temp->private); + SCRIPT_UNBIND_HANDLER(SCRIPT_TIMERTYPE, temp->priv_data); return list_remove(&script_timers, temp, 0 /* 0 is ok */); } @@ -564,15 +564,15 @@ if (remove) watch_free(temp->self); /* TODO: testit */ - SCRIPT_UNBIND_HANDLER(SCRIPT_WATCHTYPE, temp->private, temp->data); + SCRIPT_UNBIND_HANDLER(SCRIPT_WATCHTYPE, temp->priv_data, temp->data); return list_remove(&script_watches, temp, 1); } int script_var_unbind(script_var_t *temp, int free) { - SCRIPT_UNBIND_HANDLER(SCRIPT_VARTYPE, temp->private); + SCRIPT_UNBIND_HANDLER(SCRIPT_VARTYPE, temp->priv_data); temp->scr = NULL; - temp->private = NULL; + temp->priv_data = NULL; return 0; } @@ -584,7 +584,7 @@ tmp = script_var_find(name); if (tmp) { tmp->scr = scr; - tmp->private = handler; + tmp->priv_data = handler; if (in_autoexec) /* i think it is enough, not tested. */ variable_set(name, value); } else if (!tmp) { Modified: branches/c++_renames/ekg/scripts.h =================================================================== --- branches/c++_renames/ekg/scripts.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/scripts.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -32,7 +32,7 @@ void *lang; char *name; char *path; - void *private; + void *priv_data; int inited; } script_t; extern script_t *scripts; @@ -41,13 +41,13 @@ script_t *scr; struct timer *self; int removed; - void *private; + void *priv_data; } script_timer_t; typedef struct { script_t *scr; plugin_t *self; - void *private; + void *priv_data; } script_plugin_t; typedef struct { @@ -56,7 +56,7 @@ char *name; char *value; - void *private; + void *priv_data; } script_var_t; typedef struct { @@ -64,14 +64,14 @@ query_t *self; int argc; int argv_type[MAX_ARGS]; - void *private; + void *priv_data; int hack; } script_query_t; typedef struct { script_t *scr; command_t *self; - void *private; + void *priv_data; } script_command_t; typedef struct { @@ -79,7 +79,7 @@ watch_t *self; int removed; void *data; - void *private; + void *priv_data; } script_watch_t; typedef int (scriptlang_initialize_t)(); @@ -114,7 +114,7 @@ script_handler_var_t *script_handler_var; script_handler_watch_t *script_handler_watch; - void *private; + void *priv_data; } scriptlang_t; extern scriptlang_t *scriptlang; @@ -164,8 +164,8 @@ script_handler_watch : x##_watches,\ } -#define script_private_get(s) (s->private) -#define script_private_set(s, p) (s->private = p) +#define script_private_get(s) (s->priv_data) +#define script_private_set(s, p) (s->priv_data = p) #ifndef EKG2_WIN32_NOFUNCTION int script_unload_lang(scriptlang_t *s); @@ -201,7 +201,7 @@ #define SCRIPT_UNBIND_HANDLER(type, args...) \ {\ SCRIPT_HANDLER_HEADER(script_free_bind_t);\ - SCRIPT_HANDLER_FOOTER(script_free_bind, type, temp->private, args);\ + SCRIPT_HANDLER_FOOTER(script_free_bind, type, temp->priv_data, args);\ } /* BINDING && UNBINDING */ @@ -214,7 +214,7 @@ } \ temp = xmalloc(sizeof(x)); \ temp->scr = scr;\ - temp->private = handler; + temp->priv_data = handler; #define SCRIPT_BIND_FOOTER(y) \ if (!temp->self) {\ @@ -235,7 +235,7 @@ /* TODO: quietmode */ #define SCRIPT_HANDLER_FOOTER(y, _args...) \ if ((_scr = temp->scr) && ((_slang = _scr->lang))) _handler = _slang->y;\ - else _handler = temp->private;\ + else _handler = temp->priv_data;\ if (_handler)\ ret = _handler(_scr, temp, _args); \ else {\ Modified: branches/c++_renames/ekg/stuff.c =================================================================== --- branches/c++_renames/ekg/stuff.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/stuff.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -1307,7 +1307,7 @@ * * 0/-1 */ -child_t *child_add(plugin_t *plugin, pid_t pid, const char *name, child_handler_t handler, void *private) +child_t *child_add(plugin_t *plugin, pid_t pid, const char *name, child_handler_t handler, void *priv_data) { child_t *c = xmalloc(sizeof(child_t)); @@ -1315,7 +1315,7 @@ c->pid = pid; c->name = xstrdup(name); c->handler = handler; - c->private = private; + c->priv_data = priv_data; children_add(c); return c; Modified: branches/c++_renames/ekg/stuff.h =================================================================== --- branches/c++_renames/ekg/stuff.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/stuff.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -65,11 +65,11 @@ plugin_t *plugin; /* obsługujący plugin */ char *name; /* nazwa, wyświetlana przy /exec */ child_handler_t handler; /* zakład pogrzebowy */ - void *private; /* dane procesu */ + void *priv_data; /* dane procesu */ } child_t; #ifndef EKG2_WIN32_NOFUNCTION -child_t *child_add(plugin_t *plugin, pid_t pid, const char *name, child_handler_t handler, void *private); +child_t *child_add(plugin_t *plugin, pid_t pid, const char *name, child_handler_t handler, void *priv_data); child_t *children_removei(child_t *c); void children_destroy(void); #endif @@ -124,7 +124,7 @@ char *session; char *name; struct userlist *participants; - void *private; + void *priv_data; } newconference_t; struct buffer { Modified: branches/c++_renames/ekg/themes.c =================================================================== --- branches/c++_renames/ekg/themes.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/themes.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -680,7 +680,7 @@ * * Free memory allocated by @a str * - * @todo XXX Think about freeing str->private + * @todo XXX Think about freeing str->priv_data * * @param str - fstring_t * to free. */ @@ -691,7 +691,7 @@ xfree(str->str.b); xfree(str->attr); - xfree(str->private); + xfree(str->priv_data); xfree(str); } Modified: branches/c++_renames/ekg/themes.h =================================================================== --- branches/c++_renames/ekg/themes.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/themes.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -49,7 +49,7 @@ przejściu do kolejnej linii. */ unsigned int prompt_empty : 1; /* prompt przy przenoszeniu będzie pusty */ int margin_left; /* where the margin is set (on what char) */ - void *private; /* can be helpfull */ + void *priv_data; /* can be helpfull */ } fstring_t; #define print(x...) print_window_w(NULL, EKG_WINACT_JUNK, x) Modified: branches/c++_renames/ekg/userlist.h =================================================================== --- branches/c++_renames/ekg/userlist.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/userlist.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -48,7 +48,7 @@ * userlist_t is used to manage all info about user.
* It's used not only to manage contacts in roster, but also to manage people in chat or conference * - * @bug There are two private fields [u->private and u->priv] one need to be removed. + * @bug There are two private fields [u->priv_data and u->priv] one needs to be removed. */ typedef struct userlist { @@ -76,7 +76,7 @@ status_t last_status; /**< Lastseen status */ char *last_descr; /**< Lastseen description */ time_t status_time; /**< From when we have this status, description */ - void *private; /**< Alternate private data, used by ncurses plugin */ + void *priv_data; /**< Alternate private data, used by ncurses plugin */ private_data_t *priv_list; /* New user private data */ } userlist_t; @@ -117,7 +117,7 @@ status_t status; /**< status, like u->status [status of resource] */ char *descr; /**< descr, like u->descr [description of resource] */ int prio; /**< prio of resource [priority of this resource] */ - void *private; /**< priv, like u->private [private data info/struct] */ + void *priv_data; /**< priv, like u->priv_data [private data info/struct] */ } ekg_resource_t; /** Modified: branches/c++_renames/ekg/windows.h =================================================================== --- branches/c++_renames/ekg/windows.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/ekg/windows.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -81,7 +81,7 @@ struct userlist *userlist; /* sometimes window may require separate userlist */ window_lastlog_t *lastlog; /* prywatne informacje lastloga */ - void *private; /* prywatne informacje ui */ + void *priv_data; /* prywatne informacje ui */ } window_t; typedef enum { Modified: branches/c++_renames/plugins/feed/feed.c =================================================================== --- branches/c++_renames/plugins/feed/feed.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/feed/feed.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -67,10 +67,10 @@ j = xmalloc(sizeof(feed_private_t)); #ifdef HAVE_EXPAT j->isrss = (tolower(s->uid[0]) == 'r'); - if (j->isrss) j->private = rss_protocol_init(); + if (j->isrss) j->priv_data = rss_protocol_init(); else #endif - j->private = nntp_protocol_init(); + j->priv_data = nntp_protocol_init(); s->priv = j; userlist_read(s); @@ -89,10 +89,10 @@ userlist_write(s); s->priv = NULL; #ifdef HAVE_EXPAT - if (j->isrss) rss_protocol_deinit(j->private); + if (j->isrss) rss_protocol_deinit(j->priv_data); else #endif - nntp_protocol_deinit(j->private); + nntp_protocol_deinit(j->priv_data); xfree(j); Modified: branches/c++_renames/plugins/feed/feed.h =================================================================== --- branches/c++_renames/plugins/feed/feed.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/feed/feed.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -6,7 +6,7 @@ #define RSS_FLAGS RSS_ONLY | SESSION_MUSTBECONNECTED #define RSS_FLAGS_TARGET RSS_FLAGS | COMMAND_ENABLEREQPARAMS | COMMAND_PARAMASTARGET -#define feed_private(s) ((s && s->priv) ? ((feed_private_t *) s->priv)->private : NULL) +#define feed_private(s) ((s && s->priv) ? ((feed_private_t *) s->priv)->priv_data : NULL) extern plugin_t feed_plugin; @@ -14,7 +14,7 @@ #ifdef HAVE_EXPAT int isrss; #endif - void *private; + void *priv_data; } feed_private_t; extern void *nntp_protocol_init(); /* nntp.c */ Modified: branches/c++_renames/plugins/gg/dcc.c =================================================================== --- branches/c++_renames/plugins/gg/dcc.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/gg/dcc.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -63,7 +63,7 @@ int dccfd = -1; int len = GG_DCC_VOICE_FRAME_LENGTH_505; - if (type == AUDIO_CONTROL_GET) priv = aio->private; + if (type == AUDIO_CONTROL_GET) priv = aio->priv_data; else priv= xmalloc(sizeof(gg_audio_private_t)); va_start(ap, aio); @@ -99,7 +99,7 @@ aio = xmalloc(sizeof(audio_io_t)); aio->a = &gg_dcc_audio; - aio->private = priv; + aio->priv_data = priv; aio->fd = dccfd; } else if (type == AUDIO_CONTROL_HELP) { return NULL; Modified: branches/c++_renames/plugins/gsm/main.c =================================================================== --- branches/c++_renames/plugins/gsm/main.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/gsm/main.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -55,7 +55,7 @@ va_list ap; if (type == AUDIO_CONTROL_INIT && aco) { - gsm_private_t *priv = aco->private; + gsm_private_t *priv = aco->priv_data; char **inpque = NULL, **outque = NULL, **tmp; /* we create array with vals... (XXX, to query only once.) */ audio_io_t *inp, *out; codec_way_t cway = -1; @@ -138,9 +138,9 @@ aco = xmalloc(sizeof(audio_codec_t)); aco->c = &gsm_codec; - aco->private = priv; + aco->priv_data = priv; } else if (type == AUDIO_CONTROL_DEINIT && aco) { /* gsm_codec_destroy() */ - gsm_private_t *priv = priv = aco->private; + gsm_private_t *priv = priv = aco->priv_data; if (priv && priv->codec) gsm_destroy(priv->codec); xfree(priv); Modified: branches/c++_renames/plugins/gtk/main.h =================================================================== --- branches/c++_renames/plugins/gtk/main.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/gtk/main.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -84,8 +84,8 @@ #define mainwindow_top_config 0 #define newtabstofront_config 2 -#define gtk_private_ui(w) (((gtk_window_t*) w->private)->gui) -#define gtk_private(w) ((gtk_window_t*) w->private) +#define gtk_private_ui(w) (((gtk_window_t*) w->priv_data)->gui) +#define gtk_private(w) ((gtk_window_t*) w->priv_data) #define gui_win_state_config 0 Modified: branches/c++_renames/plugins/gtk/maingui.c =================================================================== --- branches/c++_renames/plugins/gtk/maingui.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/gtk/maingui.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -2203,7 +2203,7 @@ gui->is_tab = FALSE; gtk_window->gui = gui; - sess->private = gtk_window; + sess->priv_data = gtk_window; mg_create_topwindow(sess); fe_set_title(sess); #if DARK @@ -2219,14 +2219,14 @@ memset(gui, 0, sizeof(gtk_window_ui_t)); gui->is_tab = TRUE; gtk_window->gui = gui; - sess->private = gtk_window; + sess->priv_data = gtk_window; mg_create_tabwindow(sess); mg_gui = gui; parent_window = gui->window; } else { gtk_window->gui = gui = mg_gui; - sess->private = gtk_window; + sess->priv_data = gtk_window; gui->is_tab = TRUE; } #if 0 @@ -2323,9 +2323,9 @@ if (gtk_private_ui(sess) != &static_mg_gui) xfree(gtk_private_ui(sess)); /* free gui, if not static */ - xfree(sess->private); /* free window strukt */ + xfree(sess->priv_data); /* free window strukt */ - sess->private = NULL; + sess->priv_data = NULL; } /* NOT COPIED: Modified: branches/c++_renames/plugins/httprc_xajax/httprc_xajax.c =================================================================== --- branches/c++_renames/plugins/httprc_xajax/httprc_xajax.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/httprc_xajax/httprc_xajax.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -279,7 +279,7 @@ { if (!gline) { char *fstringed; -/* ncurses_window_t *n = w->private; */ +/* ncurses_window_t *n = w->priv_data; */ line = *(va_arg(ap, fstring_t **)); gline=1; fstringed = http_fstring(w->id, "ch", line, 0); @@ -706,7 +706,7 @@ if (w->id == 0) continue; - n = w->private; + n = w->priv_data; string_append(htheader, "i=0;\n"); temp = saprintf("gwins[%d][2][i++] = ch;\n", w->id); for (j=0, i = n->backlog_size-1; i >= 0; i--) { Modified: branches/c++_renames/plugins/irc/misc.c =================================================================== --- branches/c++_renames/plugins/irc/misc.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/irc/misc.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -147,7 +147,7 @@ for (rl = u->resources; rl; rl = rl->next) { r = rl; - if (r->private == p) { + if (r->priv_data == p) { char *tmp = &(u->uid[4]); /* fast forward move.. */ @@ -243,7 +243,7 @@ r->status = EKG_STATUS_AVAIL; r->descr = xstrdup(chan->name+4); - r->private = p; + r->priv_data = p; if (u->status != EKG_STATUS_AVAIL) { xfree(u->descr); @@ -1124,7 +1124,7 @@ param[0] = (char *) session_get(s, "server")-1; */ xosd_to_us = 1; /*param[0] = saprintf(":%s",session_get(s, "server"));*/ - /* private message ... */ + /* priv_data message ... */ } else if (!xstrcmp(j->nick, param[2])) { /* dj: if he's not on the list we should add him */ /* G->dj: okey, but must be done in other way imho Modified: branches/c++_renames/plugins/irc/people.c =================================================================== --- branches/c++_renames/plugins/irc/people.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/irc/people.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -64,8 +64,8 @@ * nick can contain mode prefix (one of): '@%+' * * list should be one of: - * private->channels - * private->people->channels->onchan + * priv_data->channels + * priv_data->people->channels->onchan */ people_t *irc_find_person(list_t p, char *nick) { @@ -91,7 +91,7 @@ return NULL; } -/* p = private->channel || */ +/* p = priv_data->channel || */ channel_t *irc_find_channel(list_t p, char *channame) { channel_t *chan; @@ -107,7 +107,7 @@ return NULL; } -/* p = private->people->channels */ +/* p = priv_data->people->channels */ people_chan_t *irc_find_person_chan(list_t p, char *channame) { people_chan_t *ret; @@ -129,7 +129,7 @@ * * this helper function iterates over people present on a channel, * finds the one with longest.. nickname and changes value of - * longest_nick private variable + * longest_nick priv_data variable * * this function is used by irc_del_person_channel (e.g person /parts * or is kicked from channel) and by irc_nick_change. @@ -157,7 +157,7 @@ * irc plugin * * @param s - current session structure - * @param j - irc private structure of current session + * @param j - irc priv_data structure of current session * @param nick - nickname of user without 'irc:' * prefix, and possibly with '@%+' prefix * @param chan - channel structure, on which nick appeared, @@ -195,7 +195,7 @@ irccol = irc_color_in_contacts(modes, mode, ulist); } - /* add entry in private->people if nick's not yet there */ + /* add entry in priv_data->people if nick's not yet there */ /* ok new irc-find-person checked */ if (!(person = irc_find_person(j->people, nick))) { /* debug("+%s lista ludzi, ", nick); */ @@ -204,7 +204,7 @@ /* K&Rv2 5.4 */ list_add(&(j->people), person); } - /* add entry in private->channels->onchan if nick's not yet there */ + /* add entry in priv_data->channels->onchan if nick's not yet there */ if (!(peronchan = irc_find_person(chan->onchan, nick))) { /* debug("+do kanału, "); */ list_add(&(chan->onchan), person); @@ -323,12 +323,12 @@ } if ((tmp = irc_find_person_chan(nick->channels, chan->name))) { - /* delete entry in private->people->channels + /* delete entry in priv_data->people->channels debug("-lista kanałów usera, "); */ list_remove(&(nick->channels), tmp, 1); } if (!(nick->channels)) { - /* delete entry in private->people + /* delete entry in priv_data->people debug("-%s lista ludzi, ", nick->nick); */ LIST_REMOVE(&(j->people), nick, list_irc_people_free); @@ -336,7 +336,7 @@ return 1; } - /* delete entry in private->channels->onchan + /* delete entry in priv_data->channels->onchan debug("-z kanału\n"); */ list_remove(&(chan->onchan), nick, 0); return 0; @@ -347,7 +347,7 @@ * deletes data from internal structures, when user has been kicked of or parts from a given channel * * @param s - current session structure - * @param j - irc private structure of current session + * @param j - irc priv_data structure of current session * @param nick - nickname of user without 'irc:' * prefix, can contain '@%+' prefix * @param chan - channel structure, where part/kick occured @@ -382,7 +382,7 @@ * /quits from IRC * * @param s - current session structure - * @param j - irc private structure of current session + * @param j - irc priv_data structure of current session * @param nick - nickname of user without 'irc:' * prefix, can contain '@%+' prefix * @param chan - channel structure, where part/kick occured @@ -413,7 +413,7 @@ return -1; } /* - * GiM: removing from private->people is in + * GiM: removing from priv_data->people is in * irc_del_person_channel_int * * tmp is set, we can run the loop @@ -565,7 +565,7 @@ * this is internal function called when give person changes nick * * @param s - current session structure - * @param j - irc private structure of current session + * @param j - irc priv_data structure of current session * @param old - old nickname of user without 'irc:' * prefix, and WITHOUT '@%+' prefix * @param new - new nickname of user without 'irc:' @@ -596,7 +596,7 @@ for (rl = u->resources; rl; rl = rl->next) { ekg_resource_t *r = rl; - if (r->private != per) continue; + if (r->priv_data != per) continue; xfree(r->name); r->name = xstrdup(t2); Modified: branches/c++_renames/plugins/jabber/commands.c =================================================================== --- branches/c++_renames/plugins/jabber/commands.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/jabber/commands.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -1539,22 +1539,22 @@ book = xmalloc(sizeof(jabber_bookmark_t)); book->type = JABBER_BOOKMARK_URL; - book->private.url = xmalloc(sizeof(jabber_bookmark_url_t)); - book->private.url->name = xstrdup(jabber_attr(splitted, "")); - book->private.url->url = xstrdup(splitted[1]); + book->priv_data.url = xmalloc(sizeof(jabber_bookmark_url_t)); + book->priv_data.url->name = xstrdup(jabber_attr(splitted, "")); + book->priv_data.url->url = xstrdup(splitted[1]); } else if (!xstrcmp(splitted[0], "conf")) { book = xmalloc(sizeof(jabber_bookmark_t)); book->type = JABBER_BOOKMARK_CONFERENCE; - book->private.conf = xmalloc(sizeof(jabber_bookmark_conference_t)); - book->private.conf->name = xstrdup(jabber_attr(splitted, "")); - book->private.conf->jid = xstrdup(splitted[1]); - book->private.conf->nick= xstrdup(jabber_attr(splitted, "nick")); - book->private.conf->pass= xstrdup(jabber_attr(splitted, "pass")); + book->priv_data.conf = xmalloc(sizeof(jabber_bookmark_conference_t)); + book->priv_data.conf->name = xstrdup(jabber_attr(splitted, "")); + book->priv_data.conf->jid = xstrdup(splitted[1]); + book->priv_data.conf->nick= xstrdup(jabber_attr(splitted, "nick")); + book->priv_data.conf->pass= xstrdup(jabber_attr(splitted, "pass")); - if (jabber_attr(splitted, "autojoin") && atoi(jabber_attr(splitted, "autojoin"))) book->private.conf->autojoin = 1; -/* else book->private.conf->autojoin = 0; */ + if (jabber_attr(splitted, "autojoin") && atoi(jabber_attr(splitted, "autojoin"))) book->priv_data.conf->autojoin = 1; +/* else book->priv_data.conf->autojoin = 0; */ } else bookmark_sync = -1; if (book) list_add(&(j->bookmarks), book); } @@ -1588,7 +1588,7 @@ return 1; } - watch_write(j->send_watch, "<%s/>", id, namespace); + watch_write(j->send_watch, "<%s/>", id, namespace); return 0; } @@ -1678,13 +1678,13 @@ switch (book->type) { case (JABBER_BOOKMARK_URL): - watch_write(j->send_watch, "", book->private.url->name, book->private.url->url); + watch_write(j->send_watch, "", book->priv_data.url->name, book->priv_data.url->url); break; case (JABBER_BOOKMARK_CONFERENCE): - watch_write(j->send_watch, "", book->private.conf->name, - book->private.conf->autojoin ? "true" : "false", book->private.conf->jid); - if (book->private.conf->nick) watch_write(j->send_watch, "%s", book->private.conf->nick); - if (book->private.conf->pass) watch_write(j->send_watch, "%s", book->private.conf->pass); + watch_write(j->send_watch, "", book->priv_data.conf->name, + book->priv_data.conf->autojoin ? "true" : "false", book->priv_data.conf->jid); + if (book->priv_data.conf->nick) watch_write(j->send_watch, "%s", book->priv_data.conf->nick); + if (book->priv_data.conf->pass) watch_write(j->send_watch, "%s", book->priv_data.conf->pass); watch_write(j->send_watch, ""); break; default: @@ -1913,7 +1913,7 @@ conf = newconference_create(session, mucuid, 1); - conf->private = xstrdup(username); + conf->priv_data = xstrdup(username); xfree(username); xfree(password); @@ -1933,7 +1933,7 @@ status = (params[0] && params[1]) ? saprintf(" %s ", params[1]) : NULL; - watch_write(j->send_watch, "%s", c->name+5, c->private, status ? status : ""); + watch_write(j->send_watch, "%s", c->name+5, c->priv_data, status ? status : ""); xfree(status); newconference_destroy(c, 1 /* XXX, dorobic zmienna */); Modified: branches/c++_renames/plugins/jabber/jabber.c =================================================================== --- branches/c++_renames/plugins/jabber/jabber.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/jabber/jabber.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -92,7 +92,7 @@ * jabber_session_init() * * Handler for: SESSION_ADDED
- * Init private session struct jabber_private_t if @a session is jabber one. + * Init priv_data session struct jabber_private_t if @a session is jabber one. * * @param ap 1st param: (char *) session - uid of session * @param data NULL @@ -234,12 +234,12 @@ } static LIST_FREE_ITEM(list_jabber_bookmarks_free, jabber_bookmark_t *) { - if (data->type == JABBER_BOOKMARK_URL) { xfree(data->private.url->name); xfree(data->private.url->url); } + if (data->type == JABBER_BOOKMARK_URL) { xfree(data->priv_data.url->name); xfree(data->priv_data.url->url); } else if (data->type == JABBER_BOOKMARK_CONFERENCE) { - xfree(data->private.conf->name); xfree(data->private.conf->jid); - xfree(data->private.conf->nick); xfree(data->private.conf->pass); + xfree(data->priv_data.conf->name); xfree(data->priv_data.conf->jid); + xfree(data->priv_data.conf->nick); xfree(data->priv_data.conf->pass); } - xfree(data->private.other); + xfree(data->priv_data.other); xfree(data); } @@ -311,7 +311,7 @@ if (w && w->id && w->target && session_check(w->session, 1, "xmpp") && (c = newconference_find(w->session, w->target)) && (j = jabber_private(w->session)) && session_connected_get(w->session)) { /* XXX: check really needed? vv */ - watch_write(j->send_watch, "%s", w->target + 5, c->private, status ? status : ""); + watch_write(j->send_watch, "%s", w->target + 5, c->priv_data, status ? status : ""); newconference_destroy(c, 0); } @@ -1358,7 +1358,7 @@ format_add("jabber_private_list_session", "%g|| + %n Session: %W%4%n", 1); /* %4 - uid */ format_add("jabber_private_list_plugin", "%g|| + %n Plugin: %W%4 (%5)%n", 1); /* %4 - name %5 - prio*/ format_add("jabber_private_list_subitem", "%g|| - %n %4: %W%5%n", 1); /* %4 - item %5 - value */ - format_add("jabber_private_list_footer", _("%g`+=%G----- End of the private list%n"), 1); + format_add("jabber_private_list_footer", _("%g`+=%G----- End of the priv_data list%n"), 1); format_add("jabber_private_list_empty", _("%! No list: %T%2/%3%n"), 1); format_add("jabber_private_list_error", _("%! (%1) Error in request %gjabber:iq:private%n from %W%2%n: %r%3"), 1); Modified: branches/c++_renames/plugins/jabber/jabber.h =================================================================== --- branches/c++_renames/plugins/jabber/jabber.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/jabber/jabber.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -83,11 +83,11 @@ typedef struct { enum jabber_bookmark_type_t type; - union { /* private data based on bookmark type */ + union { /* priv_data data based on bookmark type */ jabber_bookmark_url_t *url; /* for JABBER_BOOKMARK_URL */ jabber_bookmark_conference_t *conf; /* for JABBER_BOOKMARK_CONFERENCE */ void *other; /* ? ;p */ - } private; + } priv_data; } jabber_bookmark_t; enum jabber_compression_method { @@ -133,7 +133,7 @@ } jabber_stanza_t; /** - * jabber_private_t contains private data of jabber/tlen session. + * jabber_private_t contains priv_data data of jabber/tlen session. */ typedef struct { int fd; /**< connection's fd */ Modified: branches/c++_renames/plugins/jabber/jabber_dcc.c =================================================================== --- branches/c++_renames/plugins/jabber/jabber_dcc.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/jabber/jabber_dcc.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -43,7 +43,7 @@ switch (p->protocol) { case (JABBER_DCC_PROTOCOL_BYTESTREAMS): { - jabber_dcc_bytestream_t *b = p->private.bytestream; + jabber_dcc_bytestream_t *b = p->priv_data.bytestream; char buf[16384]; /* dla data transfer */ int len; Modified: branches/c++_renames/plugins/jabber/jabber_dcc.h =================================================================== --- branches/c++_renames/plugins/jabber/jabber_dcc.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/jabber/jabber_dcc.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -50,10 +50,10 @@ char *req; char *sid; enum jabber_dcc_protocol_type_t protocol; - union { /* private data based on protocol */ + union { /* priv_data data based on protocol */ jabber_dcc_bytestream_t *bytestream; /* for JABBER_DCC_PROTOCOL_BYTESTREAMS */ void *other; /* XXX */ - } private; + } priv_data; } jabber_dcc_t; Modified: branches/c++_renames/plugins/jabber/jabber_handlers.c =================================================================== --- branches/c++_renames/plugins/jabber/jabber_handlers.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/jabber/jabber_handlers.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -985,7 +985,7 @@ char *uid2 = (tuid) ? xstrndup(uid, tuid-uid) : xstrdup(uid); /* muc room */ char *nick = (tuid) ? xstrdup(tuid+1) : NULL; /* nickname */ newconference_t *c = newconference_find(s, uid2); - int isour = (c && !xstrcmp(c->private, nick)) ? 1 : 0; /* is our message? */ + int isour = (c && !xstrcmp(c->priv_data, nick)) ? 1 : 0; /* is our message? */ char *formatted; userlist_t *u; Modified: branches/c++_renames/plugins/jabber/jabber_handlers_iq_result.inc =================================================================== --- branches/c++_renames/plugins/jabber/jabber_handlers_iq_result.inc 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/jabber/jabber_handlers_iq_result.inc 2008-11-24 19:02:22 UTC (rev 4739) @@ -299,7 +299,7 @@ if (!config_display || !bookmark_display) quiet = 1; if (node->children) printq("jabber_private_list_header", session_name(s), lname, ns); - if (!xstrcmp(node->name, "ekg2") && !xstrcmp(ns, "ekg2:prefs")) { /* our private struct, containing `full` configuration of ekg2 */ + if (!xstrcmp(node->name, "ekg2") && !xstrcmp(ns, "ekg2:prefs")) { /* our priv_data struct, containing `full` configuration of ekg2 */ for (child = node->children; child; child = child->next) { char *cname = jabber_unescape(child->name); char *cvalue = jabber_unescape(child->data); @@ -339,24 +339,24 @@ xmlnode_t *temp; book->type = JABBER_BOOKMARK_CONFERENCE; - book->private.conf = xmalloc(sizeof(jabber_bookmark_conference_t)); - book->private.conf->name = jabber_unescape(jabber_attr(child->atts, "name")); - book->private.conf->jid = jabber_unescape(jabber_attr(child->atts, "jid")); - book->private.conf->autojoin = !xstrcmp(jabber_attr(child->atts, "autojoin"), "true"); + book->priv_data.conf = xmalloc(sizeof(jabber_bookmark_conference_t)); + book->priv_data.conf->name = jabber_unescape(jabber_attr(child->atts, "name")); + book->priv_data.conf->jid = jabber_unescape(jabber_attr(child->atts, "jid")); + book->priv_data.conf->autojoin = !xstrcmp(jabber_attr(child->atts, "autojoin"), "true"); - book->private.conf->nick = jabber_unescape( (temp = xmlnode_find_child(child, "nick")) ? temp->data : NULL); - book->private.conf->pass = jabber_unescape( (temp = xmlnode_find_child(child, "password")) ? temp->data : NULL); + book->priv_data.conf->nick = jabber_unescape( (temp = xmlnode_find_child(child, "nick")) ? temp->data : NULL); + book->priv_data.conf->pass = jabber_unescape( (temp = xmlnode_find_child(child, "password")) ? temp->data : NULL); - printq("jabber_bookmark_conf", session_name(s), book->private.conf->name, book->private.conf->jid, - book->private.conf->autojoin ? "X" : " ", book->private.conf->nick, book->private.conf->pass); + printq("jabber_bookmark_conf", session_name(s), book->priv_data.conf->name, book->priv_data.conf->jid, + book->priv_data.conf->autojoin ? "X" : " ", book->priv_data.conf->nick, book->priv_data.conf->pass); } else if (!xstrcmp(child->name, "url")) { book->type = JABBER_BOOKMARK_URL; - book->private.url = xmalloc(sizeof(jabber_bookmark_url_t)); - book->private.url->name = jabber_unescape(jabber_attr(child->atts, "name")); - book->private.url->url = jabber_unescape(jabber_attr(child->atts, "url")); + book->priv_data.url = xmalloc(sizeof(jabber_bookmark_url_t)); + book->priv_data.url->name = jabber_unescape(jabber_attr(child->atts, "name")); + book->priv_data.url->url = jabber_unescape(jabber_attr(child->atts, "url")); - printq("jabber_bookmark_url", session_name(s), book->private.url->name, book->private.url->url); + printq("jabber_bookmark_url", session_name(s), book->priv_data.url->name, book->priv_data.url->url); } else { debug_error("[JABBER:IQ:PRIVATE:BOOKMARK UNKNOWNITEM=%s\n", child->name); xfree(book); book = NULL; } @@ -1028,7 +1028,7 @@ jabber_dcc_bytestream_t *b; list_t l; - b = p->private.bytestream = xmalloc(sizeof(jabber_dcc_bytestream_t)); + b = p->priv_data.bytestream = xmalloc(sizeof(jabber_dcc_bytestream_t)); b->validate = JABBER_DCC_PROTOCOL_BYTESTREAMS; if (jabber_dcc_ip && jabber_dcc) { Modified: branches/c++_renames/plugins/logs/main.c =================================================================== --- branches/c++_renames/plugins/logs/main.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/logs/main.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -1062,7 +1062,7 @@ char *text = *(va_arg(ap, char**)); int *UNUSED(isour) = va_arg(ap, int*); int *UNUSED(foryou) = va_arg(ap, int*); - int *UNUSED(private) = va_arg(ap, int*); + int *UNUSED(priv_data) = va_arg(ap, int*); char *channame = *(va_arg(ap, char**)); log_window_t *lw; Modified: branches/c++_renames/plugins/ncurses/bindings.c =================================================================== --- branches/c++_renames/plugins/ncurses/bindings.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/ncurses/bindings.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -583,7 +583,7 @@ void binding_helper_scroll(window_t *w, int offset) { ncurses_window_t *n; - if (!w || !(n = w->private)) + if (!w || !(n = w->priv_data)) return; if (offset < 0) { Modified: branches/c++_renames/plugins/ncurses/contacts.c =================================================================== --- branches/c++_renames/plugins/ncurses/contacts.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/ncurses/contacts.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -103,7 +103,7 @@ /* * userlist_dup() * - * Duplicate entry, with private set to priv. + * Duplicate entry, with priv_data set to priv. */ static inline userlist_t *userlist_dup(userlist_t *up, char *uid, char *nickname, void *priv) { @@ -117,7 +117,7 @@ * then change invidual fields? */ u->blink = up->blink; u->typing = up->typing; - u->private = priv; + u->priv_data = priv; return u; } @@ -152,7 +152,7 @@ if (!w) return -1; - n = w->private; + n = w->priv_data; if (save_pos) old_start = n->start; @@ -331,8 +331,8 @@ !xstrstr(contacts_order, get_short_status(status_t))) /* when !config_contacts_orderbystate, we need to have got this status in contacts_order anywhere. */ continue; - if (group && (!u->private || (void *) 2 != u->private)) { - userlist_t *tmp = userlist_find(u->private ? u->private : session_current, u->uid); + if (group && (!u->priv_data || (void *) 2 != u->priv_data)) { + userlist_t *tmp = userlist_find(u->priv_data ? u->priv_data : session_current, u->uid); if ((group[0]=='!' && ekg_group_member(tmp, group+1)) || (group[0]!='!' && !ekg_group_member(tmp, group))) continue; @@ -360,10 +360,10 @@ string = fstring_new_format(format_find(tmp), u->nickname, u->descr); - if (u->private == (void *) 2) - string->private = (void *) xstrdup(u->nickname); + if (u->priv_data == (void *) 2) + string->priv_data = (void *) xstrdup(u->nickname); else - string->private = (void *) saprintf("%s/%s", (u->private) ? ((session_t *) u->private)->uid : session_current->uid, u->nickname); + string->priv_data = (void *) saprintf("%s/%s", (u->priv_data) ? ((session_t *) u->priv_data)->uid : session_current->uid, u->nickname); ncurses_backlog_add(w, string); @@ -488,7 +488,7 @@ if (!w || mouse_state != EKG_BUTTON1_DOUBLE_CLICKED) return; - n = w->private; + n = w->priv_data; if (!w->nowrap) { /* here new code, should work also with w->nowrap == 1 */ @@ -512,7 +512,7 @@ return; } - command_exec_format(NULL, NULL, 0, ("/query \"%s\""), n->backlog[y]->private); + command_exec_format(NULL, NULL, 0, ("/query \"%s\""), n->backlog[y]->priv_data); return; } @@ -526,7 +526,7 @@ void ncurses_contacts_new(window_t *w) { int size = config_contacts_size + config_contacts_margin + ((contacts_frame) ? 1 : 0); - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; switch (contacts_edge) { case WF_LEFT: Modified: branches/c++_renames/plugins/ncurses/main.c =================================================================== --- branches/c++_renames/plugins/ncurses/main.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/ncurses/main.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -124,7 +124,7 @@ * Set @a tmp to ncurses_initialized [0/1]
* * @note UI_IS_INITIALIZED is used to check if we can display debug info by emiting UI_PRINT_WINDOW or not. - * It also used by other UI-PLUGINS to check if another UI-plugin is in use. [Becasuse we have only one private struct in window_t] + * It also used by other UI-PLUGINS to check if another UI-plugin is in use. [Becasuse we have only one priv_data struct in window_t] * * @param ap 1st param: (int) tmp - place to put ncurses_initialized variable. * @param data NULL @@ -152,7 +152,7 @@ window_t *w = *(va_arg(ap, window_t **)); window_t *wc; - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; if (config_mark_on_window_change) command_exec(NULL, NULL, "/mark -1", 1); @@ -191,13 +191,13 @@ ncurses_window_t *n; int bottom = 0, prev_count, count = 0; - if (!(n = w->private)) { + if (!(n = w->priv_data)) { /* BUGFIX, cause @ ui-window-print handler (not ncurses plugin one, ncurses plugin one is called last cause of 0 prio) * plugin may call print_window() */ ncurses_window_new(w); - if (!(n = w->private)) { - debug("ncurses_ui_window_print() IInd CC still not w->private, quitting...\n"); + if (!(n = w->priv_data)) { + debug("ncurses_ui_window_print() IInd CC still not w->priv_data, quitting...\n"); return -1; } } @@ -268,7 +268,7 @@ static QUERY(ncurses_ui_window_target_changed) { window_t *w = *(va_arg(ap, window_t **)); - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; char *tmp; xfree(n->prompt); @@ -375,7 +375,7 @@ window_t *w; for (w = windows; w; w = w->next) { - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; if (w->target && !xstrcasecmp(w->target, oldname)) { xfree(w->target); @@ -470,7 +470,7 @@ if (!(w = window_find_sa(NULL, "__lastlog", 1))) w = window_new("__lastlog", NULL, 1001); - n = w->private; + n = w->priv_data; if (!n || !n->handle_redraw) { debug_error("ncurses_ui_window_lastlog() BAD __lastlog wnd?\n"); @@ -629,7 +629,7 @@ fprintf(f, "---------- Window %s (id:%d) dump. ----------\n", window_target(w), w->id); - n = w->private; + n = w->priv_data; for (i = n->backlog_size; i; i--) { fstring_t *backlog = n->backlog[i-1]; Modified: branches/c++_renames/plugins/ncurses/mouse.c =================================================================== --- branches/c++_renames/plugins/ncurses/mouse.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/ncurses/mouse.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -142,7 +142,7 @@ break; } - n = w->private; + n = w->priv_data; /* debug("window id:%d y %d height %d\n", w->id, w->top, w->height); */ if (n->handle_mouse) n->handle_mouse(x - w->left, y - w->top, mouse_flag); Modified: branches/c++_renames/plugins/ncurses/old.c =================================================================== --- branches/c++_renames/plugins/ncurses/old.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/ncurses/old.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -481,7 +481,7 @@ int ncurses_backlog_add(window_t *w, fstring_t *str) { int i, removed = 0; - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; if (!w) return 0; @@ -583,7 +583,7 @@ int render_timestamp = (config_timestamp && config_timestamp_show && config_timestamp[0]); ncurses_window_t *n; - if (!w || !(n = w->private)) + if (!w || !(n = w->priv_data)) return 0; /* przy pełnym przebudowaniu ilości linii nie muszą się koniecznie @@ -768,7 +768,7 @@ height = 1; for (w = windows; w; w = w->next) { - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; int old_width = w->width; if (!n) @@ -845,7 +845,7 @@ if (top > stdscr->_maxy) top = stdscr->_maxy; for (w = windows; w; w = w->next) { - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; int delta; if (!n || w->floating) @@ -971,7 +971,7 @@ if (match_arg(params[0], 'a', ("all"), 2)) { for (w = windows; w; w = w->next) { if (!w->floating && (w->act != 2)) { - n = w->private; + n = w->priv_data; n->last_red_line = time(0); n->redraw = 1; } @@ -985,7 +985,7 @@ w = window_current; if (w && !w->floating && (w->act != 2)) { - n = w->private; + n = w->priv_data; n->last_red_line = time(0); n->redraw = 1; } @@ -998,7 +998,7 @@ */ static void draw_thin_red_line(window_t *w, int y) { - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; int x; int attr = color_pair(COLOR_RED, COLOR_BLACK) | A_BOLD | A_ALTCHARSET; unsigned char ch = (unsigned char) ncurses_fixchar((CHAR_T) ACS_HLINE, &attr); @@ -1018,7 +1018,7 @@ void ncurses_redraw(window_t *w) { int x, y, left, top, height, width, fix_trl; - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; int dtrl = 0; /* dtrl -- draw thin red line * 0 - not on this page or line already drawn * 1 - mayby on this page, we'll see later @@ -1212,7 +1212,7 @@ */ void ncurses_clear(window_t *w, int full) { - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; w->more = 0; if (!full) { @@ -1261,8 +1261,8 @@ { window_t *w; - if (window_current && window_current->private /* !window_current->floating */) { - ncurses_window_t *n = window_current->private; + if (window_current && window_current->priv_data /* !window_current->floating */) { + ncurses_window_t *n = window_current->priv_data; if (n->redraw) ncurses_redraw(window_current); @@ -1272,7 +1272,7 @@ } for (w = windows; w; w = w->next) { - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; if (!w->floating || w->hide) continue; @@ -1807,7 +1807,7 @@ */ int ncurses_window_kill(window_t *w) { - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; if (!n) return -1; @@ -1818,7 +1818,7 @@ xfree(n->prompt_real); delwin(n->window); xfree(n); - w->private = NULL; + w->priv_data = NULL; // ncurses_resize(); @@ -2709,7 +2709,7 @@ config_backlog_size = ncurses_screen_height; for (w = windows; w; w = w->next) { - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; int i; if (n->backlog_size <= config_backlog_size) @@ -2762,7 +2762,7 @@ else header = format_find("lastlog_title"); - if (!w || !(n = w->private)) + if (!w || !(n = w->priv_data)) return items; if (config_lastlog_noitems) /* always add header */ @@ -2818,7 +2818,7 @@ dup->prompt_empty = n->backlog[i]->prompt_empty; dup->margin_left = n->backlog[i]->margin_left; /* org. window for example if we would like user allow move under that line with mouse and double-click.. or whatever */ -/* dup->private = (void *) w; */ +/* dup->priv_data = (void *) w; */ ncurses_backlog_add(lastlog_w, dup); items++; @@ -2840,7 +2840,7 @@ if (!w) w = window_find_sa(NULL, "__lastlog", 1); if (!w) return -1; - n = w->private; + n = w->priv_data; old_start = n->start; ncurses_clear(w, 1); @@ -2882,7 +2882,7 @@ #define lastlog_frame WF_TOP #define lastlog_wrap 0 - ncurses_window_t *n = w->private; + ncurses_window_t *n = w->priv_data; int size = config_lastlog_size + lastlog_margin + ((lastlog_frame) ? 1 : 0); switch (lastlog_edge) { @@ -2923,10 +2923,10 @@ { ncurses_window_t *n; - if (w->private) + if (w->priv_data) return 0; - w->private = n = xmalloc(sizeof(ncurses_window_t)); + w->priv_data = n = xmalloc(sizeof(ncurses_window_t)); if (!xstrcmp(w->target, "__contacts")) { ncurses_contacts_new(w); Modified: branches/c++_renames/plugins/ncurses/old.h =================================================================== --- branches/c++_renames/plugins/ncurses/old.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/ncurses/old.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -21,7 +21,7 @@ #define LINE_MAXLEN 1000 /* rozmiar linii */ -#define ncurses_current ((ncurses_window_t *) window_current->private) +#define ncurses_current ((ncurses_window_t *) window_current->priv_data) void update_statusbar(int commit); Modified: branches/c++_renames/plugins/oss/oss.c =================================================================== --- branches/c++_renames/plugins/oss/oss.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/oss/oss.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -212,7 +212,7 @@ if (type == AUDIO_CONTROL_GET) { if (!aio) return NULL; - priv = aio->private; + priv = aio->priv_data; dev = priv->dev; } else { @@ -265,10 +265,10 @@ aio = xmalloc(sizeof(audio_io_t)); aio->a = &oss_audio; aio->fd = voice_fd; - aio->private = priv; + aio->priv_data = priv; } else if (type == AUDIO_CONTROL_DEINIT && aio) { - oss_private_t *priv = aio->private; + oss_private_t *priv = aio->priv_data; oss_device_free(priv->dev, way); xfree(priv); aio = NULL; Modified: branches/c++_renames/plugins/pcm/main.c =================================================================== --- branches/c++_renames/plugins/pcm/main.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/pcm/main.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -47,7 +47,7 @@ va_list ap; if (type == AUDIO_CONTROL_INIT && aco) { - pcm_private_t *priv = aco->private; + pcm_private_t *priv = aco->priv_data; audio_io_t *inp, *out; char **inpque = NULL, **outque = NULL, **tmp; /* we create array with vals... (XXX, to query only once.) */ int valid = 1; @@ -109,7 +109,7 @@ va_start(ap, aco); if (type == AUDIO_CONTROL_SET) priv = xmalloc(sizeof(pcm_private_t)); - else if (!(priv = aco->private)) return NULL; + else if (!(priv = aco->priv_data)) return NULL; while ((attr = va_arg(ap, char *))) { if (type == AUDIO_CONTROL_SET) { @@ -159,10 +159,10 @@ aco = xmalloc(sizeof(audio_codec_t)); aco->c = &pcm_codec; aco->way = 0; - aco->private = priv; + aco->priv_data = priv; } else if (type == AUDIO_CONTROL_DEINIT) { /* pcm_codec_destroy() */ if (aco) - xfree(aco->private); + xfree(aco->priv_data); aco = NULL; } else if (type == AUDIO_CONTROL_HELP) { /* pcm_codec_capabilities() */ static char *arr[] = { Modified: branches/c++_renames/plugins/perl/perl_core.c =================================================================== --- branches/c++_renames/plugins/perl/perl_core.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/perl/perl_core.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -79,7 +79,7 @@ int perl_variable_changed(script_t *scr, script_var_t *scr_var) { - PERL_HANDLER_HEADER((char *) scr_var->private); + PERL_HANDLER_HEADER((char *) scr_var->priv_data); XPUSHs(sv_2mortal(new_pv(scr_var->name)) ); XPUSHs(sv_2mortal(new_pv(scr_var->value)) ); @@ -90,7 +90,7 @@ int perl_timers(script_t *scr, script_timer_t *time, int type) { // if (type) return; - PERL_HANDLER_HEADER((char *) time->private); + PERL_HANDLER_HEADER((char *) time->priv_data); XPUSHs(sv_2mortal(newSViv(type))); XPUSHs(sv_2mortal(ekg2_bless(BLESS_TIMER, 0, time->self)) ); @@ -101,7 +101,7 @@ int perl_commands(script_t *scr, script_command_t *comm, char **params) { char *tmp; - PERL_HANDLER_HEADER((char *) comm->private); + PERL_HANDLER_HEADER((char *) comm->priv_data); XPUSHs(sv_2mortal(new_pv(comm->self->name))); tmp = array_join(params, " "); XPUSHs(sv_2mortal(new_pv(tmp))); @@ -114,7 +114,7 @@ { // if (type) return -1; - PERL_HANDLER_HEADER((char *) scr_wat->private); + PERL_HANDLER_HEADER((char *) scr_wat->priv_data); XPUSHs(sv_2mortal(newSViv(type))); XPUSHs(sv_2mortal(newSViv(fd))); if (scr_wat->self->buf) /* WATCH_READ_LINE */ @@ -133,7 +133,7 @@ int change = 1; - PERL_HANDLER_HEADER((char *) scr_que->private); + PERL_HANDLER_HEADER((char *) scr_que->priv_data); for (i=0; i < scr_que->argc; i++) { perlarg = NULL; @@ -314,11 +314,11 @@ } /* private; + PyObject *obj = (PyObject *)scr_var->priv_data; PYTHON_HANDLE_HEADER(obj, Py_BuildValue("(ss)", scr_var->name, newval)) PYTHON_HANDLE_FOOTER() return python_handle_result; @@ -175,7 +175,7 @@ int python_handle_result; PyObject * args; - PyObject *obj = (PyObject *)scr_wat->private; + PyObject *obj = (PyObject *)scr_wat->priv_data; if (scr_wat->self->buf) { args = Py_BuildValue("(Ois)", (PyObject *)scr_wat->data, type, (char *)watch); } else { @@ -189,7 +189,7 @@ int python_timers(script_t *scr, script_timer_t *time, int type) { int python_handle_result; - PyObject *obj = (PyObject *)time->private; + PyObject *obj = (PyObject *)time->priv_data; PYTHON_HANDLE_HEADER(obj, Py_BuildValue("()")) PYTHON_HANDLE_FOOTER() return python_handle_result; @@ -198,7 +198,7 @@ int python_commands(script_t *scr, script_command_t *comm, char **params) { int python_handle_result; - PyObject *obj = (PyObject *)comm->private; + PyObject *obj = (PyObject *)comm->priv_data; PYTHON_HANDLE_HEADER(obj, Py_BuildValue("(ss)", comm->self->name, params[0] ? params[0] : "")) PYTHON_HANDLE_FOOTER() return python_handle_result; @@ -245,7 +245,7 @@ } PyTuple_SetItem(argz, i, w); } - PYTHON_HANDLE_HEADER(scr_que->private, argz) + PYTHON_HANDLE_HEADER(scr_que->priv_data, argz) if (__py_r && PyTuple_Check(__py_r)) { /* __py_r - return value */ for (i=0; i < scr_que->argc; i++) { PyObject *w = PyTuple_GetItem(__py_r, i); Modified: branches/c++_renames/plugins/readline/main.c =================================================================== --- branches/c++_renames/plugins/readline/main.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/readline/main.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -90,13 +90,13 @@ static QUERY(readline_ui_window_new) { /* window_add() */ window_t *w = *(va_arg(ap, window_t **)); - w->private = xmalloc(sizeof(readline_window_t)); + w->priv_data = xmalloc(sizeof(readline_window_t)); return 0; } static QUERY(readline_ui_window_kill) { /* window_free */ window_t *w = *(va_arg(ap, window_t **)); - readline_window_t *r = w->private; + readline_window_t *r = w->priv_data; int i; for (i = 0; i < MAX_LINES_PER_SCREEN; i++) { @@ -104,7 +104,7 @@ r->line[i] = NULL; } xfree(r); - w->private = NULL; + w->priv_data = NULL; return 0; } @@ -231,7 +231,7 @@ static QUERY(readline_ui_window_clear) { int i; window_t *w = *(va_arg(ap, window_t **)); - readline_window_t *r = w->private; + readline_window_t *r = w->priv_data; for (i = 0; i < MAX_LINES_PER_SCREEN; i++) { xfree(r->line[i]); @@ -293,7 +293,7 @@ watch_add(&readline_plugin, 0, WATCH_READ, readline_watch_stdin, NULL); for (w = windows; w; w = w->next) - w->private = xmalloc(sizeof(readline_window_t)); + w->priv_data = xmalloc(sizeof(readline_window_t)); window_refresh(); rl_initialize(); Modified: branches/c++_renames/plugins/readline/ui-readline.h =================================================================== --- branches/c++_renames/plugins/readline/ui-readline.h 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/readline/ui-readline.h 2008-11-24 19:02:22 UTC (rev 4739) @@ -2,8 +2,8 @@ #include #define MAX_LINES_PER_SCREEN 300 -#define readline_current ((readline_window_t *) window_current->private) -#define readline_window(w) ((readline_window_t *) w->private) +#define readline_current ((readline_window_t *) window_current->priv_data) +#define readline_window(w) ((readline_window_t *) w->priv_data) extern int config_ctrld_quits; Modified: branches/c++_renames/plugins/remote/remote.c =================================================================== --- branches/c++_renames/plugins/remote/remote.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/remote/remote.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -492,7 +492,7 @@ req_ok = 1; for (w = windows; w; w = w->next) { - remote_window_t *n = w->private; + remote_window_t *n = w->priv_data; int from; int i; @@ -516,7 +516,7 @@ req_ok = 1; for (w = windows; w; w = w->next) { - remote_window_t *n = w->private; + remote_window_t *n = w->priv_data; int i; if (!n) @@ -531,7 +531,7 @@ } if (req_ok == 0) { /* jesli requet nie byl przetwarzany, to wysylamy caly backlog */ for (w = windows; w; w = w->next) { - remote_window_t *n = w->private; + remote_window_t *n = w->priv_data; int i; if (!n) @@ -574,7 +574,7 @@ if (w->act) remote_writefd(fd, "WINDOWINFO", itoa(w->id), "ACTIVITY", itoa(w->act), NULL); - if ((n = w->private)) { + if ((n = w->priv_data)) { if (n->last_irctopic) remote_writefd(fd, "WINDOWINFO", itoa(w->id), "IRCTOPIC", n->last_irctopic, NULL); if (n->last_irctopicby) @@ -1024,17 +1024,17 @@ static int remote_window_new(window_t *w) { remote_window_t *n; - if (w->private) + if (w->priv_data) return 0; n = xmalloc(sizeof(remote_window_t)); - w->private = n; + w->priv_data = n; return 0; } static void remote_backlog_add(window_t *w, remote_backlog_t *str) { - remote_window_t *n = w->private; + remote_window_t *n = w->priv_data; if (!w) return; @@ -1060,10 +1060,10 @@ static void remote_window_kill(window_t *w) { remote_window_t *n; - if (!(n = w->private)) + if (!(n = w->priv_data)) return; - w->private = NULL; + w->priv_data = NULL; if (n->backlog) { int i; @@ -1191,7 +1191,7 @@ if (w == window_debug) /* XXX! */ goto cleanup; - if (!(n = w->private)) { + if (!(n = w->priv_data)) { /* BUGFIX, cause @ ui-window-print handler (not ncurses plugin one, ncurses plugin one is called last cause of 0 prio) * plugin may call print_window() */ @@ -1394,10 +1394,10 @@ } /* just in case */ - if (!(window_current->private)) + if (!(window_current->priv_data)) remote_window_new(window_current); - r = window_current->private; + r = window_current->priv_data; irctopic = irctopicby = ircmode = NULL; query_emit_id(NULL, IRC_TOPIC, &irctopic, &irctopicby, &ircmode); Modified: branches/c++_renames/plugins/ruby/ruby_ekg.c =================================================================== --- branches/c++_renames/plugins/ruby/ruby_ekg.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/ruby/ruby_ekg.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -25,7 +25,7 @@ static int ruby_finalize_wrapper(); static int ruby_load(script_t *scr); static int ruby_unload(script_t *scr); -static int ruby_bind_free(script_t *scr, void *data, int type, void *private, ...); +static int ruby_bind_free(script_t *scr, void *data, int type, void *priv_data, ...); static int ruby_query(script_t *scr, script_query_t *scr_que, void *args[]); static int ruby_commands(script_t *scr, script_command_t *comm, char **params); static int ruby_timers(script_t *scr, script_timer_t *time, int type); @@ -81,7 +81,7 @@ scr = last_scr; last_scr = NULL; - scr->private = (void *) self; + scr->priv_data = (void *) self; ruby_script_theme_init(scr); @@ -307,7 +307,7 @@ char *err = ruby_geterror("ruby_load() "); print("script_error", err); xfree(err); - last_scr = scr->private = NULL; + last_scr = scr->priv_data = NULL; return -1; } @@ -317,7 +317,7 @@ char *err = ruby_geterror("ruby_init() "); print("script_error", err); xfree(err); - last_scr = scr->private = NULL; + last_scr = scr->priv_data = NULL; return -1; } @@ -331,9 +331,9 @@ static int ruby_unload(script_t *scr) { int error = 0; - if (!scr->private) return 0; + if (!scr->priv_data) return 0; - rb_protect(ruby_deinit_wrapper, (VALUE) scr->private, &error); + rb_protect(ruby_deinit_wrapper, (VALUE) scr->priv_data, &error); if (error) { char *err = ruby_geterror("ruby_deinit() "); @@ -344,7 +344,7 @@ return 0; } -static int ruby_bind_free(script_t *scr, void *data, /* niby to jest ale kiedys nie bedzie.. nie uzywac */ int type, void *private, ...) { +static int ruby_bind_free(script_t *scr, void *data, /* niby to jest ale kiedys nie bedzie.. nie uzywac */ int type, void *priv_data, ...) { return 0; } @@ -422,8 +422,8 @@ } } - ruby_query.class = (VALUE) scr->private; - ruby_query.func = scr_que->private; + ruby_query.class = (VALUE) scr->priv_data; + ruby_query.func = scr_que->priv_data; ruby_query.argc = scr_que->argc; ruby_query.argv = argv; @@ -443,8 +443,8 @@ for (i=0; i < argc; i++) argv[i] = rb_str_new2(params[0]); - ruby_command.class = (VALUE) scr->private; - ruby_command.func = comm->private; + ruby_command.class = (VALUE) scr->priv_data; + ruby_command.func = comm->priv_data; ruby_command.argc = argc; ruby_command.argv = argv; @@ -463,8 +463,8 @@ argv[1] = INT2FIX(fd); /* XXX, temporary we pass fd instad of T_FILE */ argv[2] = INT2FIX(watch); - ruby_watch.class = (VALUE) scr->private; - ruby_watch.func = scr_wat->private; + ruby_watch.class = (VALUE) scr->priv_data; + ruby_watch.func = scr_wat->priv_data; ruby_watch.argc = 3; ruby_watch.argv = argv; @@ -479,8 +479,8 @@ argv[0] = rb_str_new2(scr_var->name); argv[1] = rb_str_new2(what); - ruby_variable.class = (VALUE) scr->private; - ruby_variable.func = scr_var->private; + ruby_variable.class = (VALUE) scr->priv_data; + ruby_variable.func = scr_var->priv_data; ruby_variable.argc = 2; ruby_variable.argv = argv; @@ -491,8 +491,8 @@ static int ruby_timers(script_t *scr, script_timer_t *time, int type) { ruby_helper_t ruby_timer; - ruby_timer.class = (VALUE) scr->private; - ruby_timer.func = time->private; + ruby_timer.class = (VALUE) scr->priv_data; + ruby_timer.func = time->priv_data; ruby_timer.argc = 0; ruby_timer.argv = NULL; @@ -503,7 +503,7 @@ static int ruby_script_theme_init(script_t *scr) { ruby_helper_t ruby_theme; - ruby_theme.class = (VALUE) scr->private; + ruby_theme.class = (VALUE) scr->priv_data; ruby_theme.func = "theme_init"; ruby_theme.argc = 0; ruby_theme.argv = NULL; Modified: branches/c++_renames/plugins/sim/simlite.c =================================================================== --- branches/c++_renames/plugins/sim/simlite.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/sim/simlite.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -397,7 +397,7 @@ unsigned char bf_key[16]; /* klucz symetryczny Blowfisha */ unsigned char bf_key_rsa[128]; /* symetryczny szyfrowany RSA */ BIO *mbio = NULL, *cbio = NULL, *bbio = NULL; - RSA *private = NULL; + RSA *private_key = NULL; unsigned char *buf = NULL, *data; char *res = NULL; int len; @@ -410,7 +410,7 @@ } /* wczytaj klucz prywatny */ - if (!(private = sim_key_read(0, uid))) { + if (!(private_key = sim_key_read(0, uid))) { sim_errno = SIM_ERROR_PRIVATE; goto cleanup; } @@ -427,7 +427,7 @@ goto cleanup; } - if (RSA_private_decrypt(sizeof(bf_key_rsa), bf_key_rsa, bf_key, private, RSA_PKCS1_OAEP_PADDING) == -1) { + if (RSA_private_decrypt(sizeof(bf_key_rsa), bf_key_rsa, bf_key, private_key, RSA_PKCS1_OAEP_PADDING) == -1) { sim_errno = SIM_ERROR_RSA; goto cleanup; } @@ -493,8 +493,8 @@ BIO_free(mbio); if (bbio) BIO_free(bbio); - if (private) - RSA_free(private); + if (private_key) + RSA_free(private_key); if (buf) free(buf); return ekg_cp_to_locale(res); /* XXX, what if message isn't encoded in cp-1250? */ Modified: branches/c++_renames/plugins/xosd/xosd.c =================================================================== --- branches/c++_renames/plugins/xosd/xosd.c 2008-11-24 18:49:18 UTC (rev 4738) +++ branches/c++_renames/plugins/xosd/xosd.c 2008-11-24 19:02:22 UTC (rev 4739) @@ -252,7 +252,7 @@ char *text = *(va_arg(ap, char**)); int isour = *(va_arg(ap, int*)); int foryou = *(va_arg(ap, int*)); - int private = *(va_arg(ap, int*)); + int priv_data = *(va_arg(ap, int*)); char *channame = *(va_arg(ap, char**)); session_t *s; @@ -267,7 +267,7 @@ if (!foryou || isour) return 0; - if (private) + if (priv_data) msgLine1 = format_string(format_find("xosd_new_message_line_1"), uid); else msgLine1 = format_string(format_find("xosd_new_message_irc"), uid, channame); From svn w toxygen.net Mon Nov 24 20:10:49 2008 From: svn w toxygen.net (SVN commit) Date: Mon, 24 Nov 2008 20:10:49 +0100 (CET) Subject: [ekg2-commit] r4740 - in branches/c++_renames: ekg plugins/python: branches/c++_renames/ekg/msgqueue.c branches/c++_renames/ekg/msgqueue.h branches/c++_renames/ekg/protocol.c branches/c++_renames/ekg/protocol.h branches/c++_renames/ekg/queries.h branches/c++_renames/ekg/scripts.c branches/c++_renames/plugins/python/doc.xml Message-ID: <20081124191049.730C917B1F@toxygen.net> Author: porridge Date: 2008-11-24 20:10:48 +0100 (Mon, 24 Nov 2008) New Revision: 4740 Modified: branches/c++_renames/ekg/msgqueue.c branches/c++_renames/ekg/msgqueue.h branches/c++_renames/ekg/protocol.c branches/c++_renames/ekg/protocol.h branches/c++_renames/ekg/queries.h branches/c++_renames/ekg/scripts.c branches/c++_renames/plugins/python/doc.xml Log: Renamed "class" to "klass" in most places. It still might not be strictly necessary in all places, but I thought it's better for consistency. Modified: branches/c++_renames/ekg/msgqueue.c =================================================================== --- branches/c++_renames/ekg/msgqueue.c 2008-11-24 19:02:22 UTC (rev 4739) +++ branches/c++_renames/ekg/msgqueue.c 2008-11-24 19:10:48 UTC (rev 4740) @@ -63,7 +63,7 @@ * * 0/-1 */ -int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t class) +int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t klass) { msg_queue_t *m = xmalloc(sizeof(msg_queue_t)); @@ -72,7 +72,7 @@ m->message = xstrdup(message); m->seq = xstrdup(seq); m->time = time(NULL); - m->class = class; + m->klass = klass; msgs_queue_add(m); return 0; @@ -166,14 +166,14 @@ continue; } - switch (m->class) { + switch (m->klass) { case EKG_MSGCLASS_SENT_CHAT: cmd = "/chat \"%s\" %s"; break; case EKG_MSGCLASS_SENT: break; default: - debug_error("msg_queue_flush(), unsupported message class in query: %d\n", m->class); + debug_error("msg_queue_flush(), unsupported message klass in query: %d\n", m->klass); } command_exec_format(NULL, s, 1, cmd, m->rcpts, m->message); @@ -233,7 +233,7 @@ continue; chmod(fn, 0600); - fprintf(f, "v2\n%s\n%s\n%ld\n%s\n%d\n%s", m->session, m->rcpts, m->time, m->seq, m->class, m->message); + fprintf(f, "v2\n%s\n%s\n%ld\n%s\n%d\n%s", m->session, m->rcpts, m->time, m->seq, m->klass, m->message); fclose(f); } @@ -326,9 +326,9 @@ continue; } - m.class = atoi(buf); + m.klass = atoi(buf); } else - m.class = EKG_MSGCLASS_SENT; + m.klass = EKG_MSGCLASS_SENT; msg = string_init(NULL); Modified: branches/c++_renames/ekg/msgqueue.h =================================================================== --- branches/c++_renames/ekg/msgqueue.h 2008-11-24 19:02:22 UTC (rev 4739) +++ branches/c++_renames/ekg/msgqueue.h 2008-11-24 19:10:48 UTC (rev 4740) @@ -40,12 +40,12 @@ char *seq; /* numer sekwencyjny */ time_t time; /* czas wysłania */ unsigned int mark : 1; /* if added during cleanup */ - msgclass_t class; + msgclass_t klass; } msg_queue_t; extern msg_queue_t *msgs_queue; -int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t class); +int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t klass); void msgs_queue_destroy(); int msg_queue_count_session(const char *uid); int msg_queue_remove_uid(const char *uid); Modified: branches/c++_renames/ekg/protocol.c =================================================================== --- branches/c++_renames/ekg/protocol.c 2008-11-24 19:02:22 UTC (rev 4739) +++ branches/c++_renames/ekg/protocol.c 2008-11-24 19:10:48 UTC (rev 4740) @@ -504,7 +504,7 @@ * * zwraca target */ -char *message_print(const char *session, const char *sender, const char **rcpts, const char *__text, const uint32_t *format, time_t sent, int class, const char *seq, int dobeep, int secure) +char *message_print(const char *session, const char *sender, const char **rcpts, const char *__text, const uint32_t *format, time_t sent, int klass, const char *seq, int dobeep, int secure) { char *class_str, timestamp[100], *text = xstrdup(__text); char *securestr = NULL; @@ -514,17 +514,17 @@ struct conference *c = NULL; int empty_theme = 0, is_me = 0, to_me = 1, activity = 0, separate = 0; - if (class & EKG_MSGCLASS_NOT2US) { + if (klass & EKG_MSGCLASS_NOT2US) { to_me = 0; - class &= ~EKG_MSGCLASS_NOT2US; + klass &= ~EKG_MSGCLASS_NOT2US; } - if (class & EKG_NO_THEMEBIT) { + if (klass & EKG_NO_THEMEBIT) { empty_theme = 1; - class &= ~EKG_NO_THEMEBIT; + klass &= ~EKG_NO_THEMEBIT; } - switch (class) { + switch (klass) { case EKG_MSGCLASS_SENT: case EKG_MSGCLASS_SENT_CHAT: if (/*config_display_me && */ !xstrncmp(text, "/me ", 4)) { @@ -553,8 +553,8 @@ target = (rcpts) ? rcpts[0] : NULL; break; default: - if (class != EKG_MSGCLASS_MESSAGE) - debug("[message_print] got unexpected class = %d\n", class); + if (klass != EKG_MSGCLASS_MESSAGE) + debug("[message_print] got unexpected klass = %d\n", klass); class_str = "message"; } @@ -636,7 +636,7 @@ { int recipients_count = array_count((char **) rcpts); - if ((class < EKG_MSGCLASS_SENT) && recipients_count > 0) { + if ((klass < EKG_MSGCLASS_SENT) && recipients_count > 0) { c = conference_find_by_uids(s, sender, rcpts, recipients_count, 0); if (!c) { @@ -671,7 +671,7 @@ /* XXX: I personally think this should be moved outta here * I don't think that beeping should be considered as 'printing' */ /* daj znać dźwiękiem i muzyczką */ - if (class == EKG_MSGCLASS_CHAT) { + if (klass == EKG_MSGCLASS_CHAT) { if (config_beep && config_beep_chat && dobeep) query_emit_id(NULL, UI_BEEP); @@ -679,20 +679,20 @@ if (config_sound_chat_file && dobeep) play_sound(config_sound_chat_file); - } else if (class == EKG_MSGCLASS_MESSAGE) { + } else if (klass == EKG_MSGCLASS_MESSAGE) { if (config_beep && config_beep_msg && dobeep) query_emit_id(NULL, UI_BEEP); if (config_sound_msg_file && dobeep) play_sound(config_sound_msg_file); - } else if (class == EKG_MSGCLASS_SYSTEM && config_sound_sysmsg_file) + } else if (klass == EKG_MSGCLASS_SYSTEM && config_sound_sysmsg_file) play_sound(config_sound_sysmsg_file); - if (config_last & 3 && (class < EKG_MSGCLASS_SENT)) + if (config_last & 3 && (klass < EKG_MSGCLASS_SENT)) last_add(0, sender, now, sent, text); - user = (class < EKG_MSGCLASS_SENT) ? format_user(s, sender) : session_format_n(sender); + user = (klass < EKG_MSGCLASS_SENT) ? format_user(s, sender) : session_format_n(sender); if (config_emoticons && text) { char *tmp = emoticon_expand(text); @@ -706,11 +706,11 @@ if (secure) securestr = format_string(format_find("secure")); - if (class == EKG_MSGCLASS_LOG || class == EKG_MSGCLASS_SENT_LOG) + if (klass == EKG_MSGCLASS_LOG || klass == EKG_MSGCLASS_SENT_LOG) separate = 1; - if ( (class == EKG_MSGCLASS_CHAT || class == EKG_MSGCLASS_SENT_CHAT) || - (!(config_make_window & 4) && (class == EKG_MSGCLASS_MESSAGE || class == EKG_MSGCLASS_SENT)) ) { + if ( (klass == EKG_MSGCLASS_CHAT || klass == EKG_MSGCLASS_SENT_CHAT) || + (!(config_make_window & 4) && (klass == EKG_MSGCLASS_MESSAGE || klass == EKG_MSGCLASS_SENT)) ) { activity = to_me ? EKG_WINACT_IMPORTANT : EKG_WINACT_MSG; separate = 1; } @@ -718,10 +718,10 @@ print_window(target, s, activity, separate, class_str, user, timestamp, (is_me ? text+4 : text), /* XXX, get_uid() get_nickname() */ - (class >= EKG_MSGCLASS_SENT ? + (klass >= EKG_MSGCLASS_SENT ? (is_me && config_nickname ? config_nickname : session_alias_uid(s)) : get_nickname(s, sender)), - (class >= EKG_MSGCLASS_SENT ? s->uid : get_uid(s, sender)), + (klass >= EKG_MSGCLASS_SENT ? s->uid : get_uid(s, sender)), (secure ? securestr : "")); xfree(text); @@ -740,7 +740,7 @@ char *text = *(va_arg(ap, char**)); uint32_t *format= *(va_arg(ap, uint32_t**)); time_t sent = *(va_arg(ap, time_t*)); - int class = *(va_arg(ap, int*)); + int klass = *(va_arg(ap, int*)); char *seq = *(va_arg(ap, char**)); int dobeep = *(va_arg(ap, int*)); int secure = *(va_arg(ap, int*)); @@ -755,7 +755,7 @@ return -1; /* display blinking */ - if (config_display_blinking && userlist && (class < EKG_MSGCLASS_SENT) && (!rcpts || !rcpts[0])) { + if (config_display_blinking && userlist && (klass < EKG_MSGCLASS_SENT) && (!rcpts || !rcpts[0])) { int oldstate = userlist->blink; if (config_make_window && xstrcmp(get_uid(session_class, window_current->target), get_uid(session_class, uid))) @@ -777,11 +777,11 @@ query_emit_id(NULL, USERLIST_CHANGED, &session, &uid); } - if (class & EKG_NO_THEMEBIT) { - class &= ~EKG_NO_THEMEBIT; + if (klass & EKG_NO_THEMEBIT) { + klass &= ~EKG_NO_THEMEBIT; empty_theme = 1; } - our_msg = (class >= EKG_MSGCLASS_SENT); + our_msg = (klass >= EKG_MSGCLASS_SENT); /* there is no need to decode our messages */ if (!our_msg && !empty_theme) { /* empty_theme + decrpyt? i don't think so... */ @@ -804,15 +804,15 @@ } if (our_msg) query_emit_id(NULL, PROTOCOL_MESSAGE_SENT, &session, &(rcpts[0]), &text); - else query_emit_id(NULL, PROTOCOL_MESSAGE_RECEIVED, &session, &uid, &rcpts, &text, &format, &sent, &class, &seq, &secure); + else query_emit_id(NULL, PROTOCOL_MESSAGE_RECEIVED, &session, &uid, &rcpts, &text, &format, &sent, &klass, &seq, &secure); - query_emit_id(NULL, PROTOCOL_MESSAGE_POST, &session, &uid, &rcpts, &text, &format, &sent, &class, &seq, &secure); + query_emit_id(NULL, PROTOCOL_MESSAGE_POST, &session, &uid, &rcpts, &text, &format, &sent, &klass, &seq, &secure); /* show it ! */ if (!(our_msg && !config_display_sent)) { if (empty_theme) - class |= EKG_NO_THEMEBIT; - if (!(target = message_print(session, uid, (const char**) rcpts, text, format, sent, class, seq, dobeep, secure))) + klass |= EKG_NO_THEMEBIT; + if (!(target = message_print(session, uid, (const char**) rcpts, text, format, sent, klass, seq, dobeep, secure))) return -1; } @@ -849,8 +849,8 @@ return 0; } -int protocol_message_emit(const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int class, const char *seq, int dobeep, int secure) { - return query_emit_id_ro(NULL, PROTOCOL_MESSAGE, &(s->uid), &uid, &rcpts, &text, &format, &sent, &class, &seq, &dobeep, &secure); +int protocol_message_emit(const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int klass, const char *seq, int dobeep, int secure) { + return query_emit_id_ro(NULL, PROTOCOL_MESSAGE, &(s->uid), &uid, &rcpts, &text, &format, &sent, &klass, &seq, &dobeep, &secure); } /** Modified: branches/c++_renames/ekg/protocol.h =================================================================== --- branches/c++_renames/ekg/protocol.h 2008-11-24 19:02:22 UTC (rev 4739) +++ branches/c++_renames/ekg/protocol.h 2008-11-24 19:10:48 UTC (rev 4740) @@ -88,12 +88,12 @@ void protocol_init(); char *message_print(const char *session, const char *sender, const char **rcpts, const char *text, const uint32_t *format, - time_t sent, int class, const char *seq, int dobeep, int secure); + time_t sent, int klass, const char *seq, int dobeep, int secure); int protocol_connected_emit(const session_t *s); int protocol_disconnected_emit(const session_t *s, const char *reason, int type); int protocol_message_ack_emit(const session_t *s, const char *rcpt, const char *seq, int status); -int protocol_message_emit(const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int class, const char *seq, int dobeep, int secure); +int protocol_message_emit(const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int klass, const char *seq, int dobeep, int secure); int protocol_status_emit(const session_t *s, const char *uid, int status, char *descr, time_t when); int protocol_xstate_emit(const session_t *s, const char *uid, int state, int offstate); Modified: branches/c++_renames/ekg/queries.h =================================================================== --- branches/c++_renames/ekg/queries.h 2008-11-24 19:02:22 UTC (rev 4739) +++ branches/c++_renames/ekg/queries.h 2008-11-24 19:10:48 UTC (rev 4740) @@ -157,7 +157,7 @@ QUERY_ARG_CHARPP, /* rcpts */ QUERY_ARG_UINT, /* uint32_t */ /* format */ QUERY_ARG_UINT, /* time_t */ /* sent */ - QUERY_ARG_INT, /* class */ + QUERY_ARG_INT, /* klass */ QUERY_ARG_CHARP, /* seq */ QUERY_ARG_INT, /* secure */ QUERY_ARG_END } }, @@ -168,7 +168,7 @@ QUERY_ARG_CHARPP, /* rcpts */ QUERY_ARG_UINT, /* uint32_t */ /* format */ QUERY_ARG_UINT, /* time_t */ /* sent */ - QUERY_ARG_INT, /* class */ + QUERY_ARG_INT, /* klass */ QUERY_ARG_CHARP, /* seq */ QUERY_ARG_INT, /* secure */ QUERY_ARG_END } }, @@ -311,7 +311,7 @@ QUERY_ARG_CHARP, /* text */ QUERY_ARG_UINT, /* uint32 */ /* format */ QUERY_ARG_UINT, /* time_t */ /* sent */ - QUERY_ARG_INT, /* class */ + QUERY_ARG_INT, /* klass */ QUERY_ARG_CHARP, /* seq */ QUERY_ARG_INT, /* dobeep */ QUERY_ARG_INT, /* secure */ Modified: branches/c++_renames/ekg/scripts.c =================================================================== --- branches/c++_renames/ekg/scripts.c 2008-11-24 19:02:22 UTC (rev 4739) +++ branches/c++_renames/ekg/scripts.c 2008-11-24 19:10:48 UTC (rev 4740) @@ -783,9 +783,9 @@ case 3: case 4: case 5: /* scripts protocol-message, protocol-message-post, protocol-message-received (v 1.0) - - ts (session, uid, class, text, sent_time, ignore_level) - - vs (session, uid, rcpts, text, format, sent, class, seq, secure) [protocol-message-post, protocol-message-recv] - - vs (session, uid, rcpts, text, format, sent, class, seq, dobeep, secure) [protocol-message] + - ts (session, uid, klass, text, sent_time, ignore_level) + - vs (session, uid, rcpts, text, format, sent, klass, seq, secure) [protocol-message-post, protocol-message-recv] + - vs (session, uid, rcpts, text, format, sent, klass, seq, dobeep, secure) [protocol-message] */ { temp->argc = 6; @@ -793,7 +793,7 @@ temp->argv_type[0] = QUERY_ARG_CHARP; /* session, OK */ temp->argv_type[1] = QUERY_ARG_CHARP; /* uid, OK */ - temp->argv_type[2] = QUERY_ARG_INT; /* class, N_OK, BAD POS */ + temp->argv_type[2] = QUERY_ARG_INT; /* klass, N_OK, BAD POS */ args[2] = args2[6]; temp->argv_type[3] = QUERY_ARG_CHARP; /* text, OK */ Modified: branches/c++_renames/plugins/python/doc.xml =================================================================== --- branches/c++_renames/plugins/python/doc.xml 2008-11-24 19:02:22 UTC (rev 4739) +++ branches/c++_renames/plugins/python/doc.xml 2008-11-24 19:10:48 UTC (rev 4740) @@ -729,7 +729,7 @@ protocol-message-received - Argumenty: session, id, class, text, time, ignore_level + Argumenty: session, id, klass, text, time, ignore_level Wywoływana gdy ekg otrzymuje wiadomość. From svn w toxygen.net Wed Nov 26 20:04:25 2008 From: svn w toxygen.net (SVN commit) Date: Wed, 26 Nov 2008 20:04:25 +0100 (CET) Subject: [ekg2-commit] r4741 - in branches/c++_renames: ekg plugins/python: branches/c++_renames/ekg/msgqueue.c branches/c++_renames/ekg/msgqueue.h branches/c++_renames/ekg/protocol.c branches/c++_renames/ekg/protocol.h branches/c++_renames/ekg/queries.h branches/c++_renames/ekg/scripts.c branches/c++_renames/plugins/python/doc.xml Message-ID: <20081126190425.C1DA117B1F@toxygen.net> Author: porridge Date: 2008-11-26 20:04:24 +0100 (Wed, 26 Nov 2008) New Revision: 4741 Modified: branches/c++_renames/ekg/msgqueue.c branches/c++_renames/ekg/msgqueue.h branches/c++_renames/ekg/protocol.c branches/c++_renames/ekg/protocol.h branches/c++_renames/ekg/queries.h branches/c++_renames/ekg/scripts.c branches/c++_renames/plugins/python/doc.xml Log: Changed "klass" to "mclass" as suggested by darkjames Modified: branches/c++_renames/ekg/msgqueue.c =================================================================== --- branches/c++_renames/ekg/msgqueue.c 2008-11-24 19:10:48 UTC (rev 4740) +++ branches/c++_renames/ekg/msgqueue.c 2008-11-26 19:04:24 UTC (rev 4741) @@ -63,7 +63,7 @@ * * 0/-1 */ -int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t klass) +int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t mclass) { msg_queue_t *m = xmalloc(sizeof(msg_queue_t)); @@ -72,7 +72,7 @@ m->message = xstrdup(message); m->seq = xstrdup(seq); m->time = time(NULL); - m->klass = klass; + m->mclass = mclass; msgs_queue_add(m); return 0; @@ -166,14 +166,14 @@ continue; } - switch (m->klass) { + switch (m->mclass) { case EKG_MSGCLASS_SENT_CHAT: cmd = "/chat \"%s\" %s"; break; case EKG_MSGCLASS_SENT: break; default: - debug_error("msg_queue_flush(), unsupported message klass in query: %d\n", m->klass); + debug_error("msg_queue_flush(), unsupported message mclass in query: %d\n", m->mclass); } command_exec_format(NULL, s, 1, cmd, m->rcpts, m->message); @@ -233,7 +233,7 @@ continue; chmod(fn, 0600); - fprintf(f, "v2\n%s\n%s\n%ld\n%s\n%d\n%s", m->session, m->rcpts, m->time, m->seq, m->klass, m->message); + fprintf(f, "v2\n%s\n%s\n%ld\n%s\n%d\n%s", m->session, m->rcpts, m->time, m->seq, m->mclass, m->message); fclose(f); } @@ -326,9 +326,9 @@ continue; } - m.klass = atoi(buf); + m.mclass = atoi(buf); } else - m.klass = EKG_MSGCLASS_SENT; + m.mclass = EKG_MSGCLASS_SENT; msg = string_init(NULL); Modified: branches/c++_renames/ekg/msgqueue.h =================================================================== --- branches/c++_renames/ekg/msgqueue.h 2008-11-24 19:10:48 UTC (rev 4740) +++ branches/c++_renames/ekg/msgqueue.h 2008-11-26 19:04:24 UTC (rev 4741) @@ -40,12 +40,12 @@ char *seq; /* numer sekwencyjny */ time_t time; /* czas wysłania */ unsigned int mark : 1; /* if added during cleanup */ - msgclass_t klass; + msgclass_t mclass; } msg_queue_t; extern msg_queue_t *msgs_queue; -int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t klass); +int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t mclass); void msgs_queue_destroy(); int msg_queue_count_session(const char *uid); int msg_queue_remove_uid(const char *uid); Modified: branches/c++_renames/ekg/protocol.c =================================================================== --- branches/c++_renames/ekg/protocol.c 2008-11-24 19:10:48 UTC (rev 4740) +++ branches/c++_renames/ekg/protocol.c 2008-11-26 19:04:24 UTC (rev 4741) @@ -504,7 +504,7 @@ * * zwraca target */ -char *message_print(const char *session, const char *sender, const char **rcpts, const char *__text, const uint32_t *format, time_t sent, int klass, const char *seq, int dobeep, int secure) +char *message_print(const char *session, const char *sender, const char **rcpts, const char *__text, const uint32_t *format, time_t sent, int mclass, const char *seq, int dobeep, int secure) { char *class_str, timestamp[100], *text = xstrdup(__text); char *securestr = NULL; @@ -514,17 +514,17 @@ struct conference *c = NULL; int empty_theme = 0, is_me = 0, to_me = 1, activity = 0, separate = 0; - if (klass & EKG_MSGCLASS_NOT2US) { + if (mclass & EKG_MSGCLASS_NOT2US) { to_me = 0; - klass &= ~EKG_MSGCLASS_NOT2US; + mclass &= ~EKG_MSGCLASS_NOT2US; } - if (klass & EKG_NO_THEMEBIT) { + if (mclass & EKG_NO_THEMEBIT) { empty_theme = 1; - klass &= ~EKG_NO_THEMEBIT; + mclass &= ~EKG_NO_THEMEBIT; } - switch (klass) { + switch (mclass) { case EKG_MSGCLASS_SENT: case EKG_MSGCLASS_SENT_CHAT: if (/*config_display_me && */ !xstrncmp(text, "/me ", 4)) { @@ -553,8 +553,8 @@ target = (rcpts) ? rcpts[0] : NULL; break; default: - if (klass != EKG_MSGCLASS_MESSAGE) - debug("[message_print] got unexpected klass = %d\n", klass); + if (mclass != EKG_MSGCLASS_MESSAGE) + debug("[message_print] got unexpected mclass = %d\n", mclass); class_str = "message"; } @@ -636,7 +636,7 @@ { int recipients_count = array_count((char **) rcpts); - if ((klass < EKG_MSGCLASS_SENT) && recipients_count > 0) { + if ((mclass < EKG_MSGCLASS_SENT) && recipients_count > 0) { c = conference_find_by_uids(s, sender, rcpts, recipients_count, 0); if (!c) { @@ -671,7 +671,7 @@ /* XXX: I personally think this should be moved outta here * I don't think that beeping should be considered as 'printing' */ /* daj znać dźwiękiem i muzyczką */ - if (klass == EKG_MSGCLASS_CHAT) { + if (mclass == EKG_MSGCLASS_CHAT) { if (config_beep && config_beep_chat && dobeep) query_emit_id(NULL, UI_BEEP); @@ -679,20 +679,20 @@ if (config_sound_chat_file && dobeep) play_sound(config_sound_chat_file); - } else if (klass == EKG_MSGCLASS_MESSAGE) { + } else if (mclass == EKG_MSGCLASS_MESSAGE) { if (config_beep && config_beep_msg && dobeep) query_emit_id(NULL, UI_BEEP); if (config_sound_msg_file && dobeep) play_sound(config_sound_msg_file); - } else if (klass == EKG_MSGCLASS_SYSTEM && config_sound_sysmsg_file) + } else if (mclass == EKG_MSGCLASS_SYSTEM && config_sound_sysmsg_file) play_sound(config_sound_sysmsg_file); - if (config_last & 3 && (klass < EKG_MSGCLASS_SENT)) + if (config_last & 3 && (mclass < EKG_MSGCLASS_SENT)) last_add(0, sender, now, sent, text); - user = (klass < EKG_MSGCLASS_SENT) ? format_user(s, sender) : session_format_n(sender); + user = (mclass < EKG_MSGCLASS_SENT) ? format_user(s, sender) : session_format_n(sender); if (config_emoticons && text) { char *tmp = emoticon_expand(text); @@ -706,11 +706,11 @@ if (secure) securestr = format_string(format_find("secure")); - if (klass == EKG_MSGCLASS_LOG || klass == EKG_MSGCLASS_SENT_LOG) + if (mclass == EKG_MSGCLASS_LOG || mclass == EKG_MSGCLASS_SENT_LOG) separate = 1; - if ( (klass == EKG_MSGCLASS_CHAT || klass == EKG_MSGCLASS_SENT_CHAT) || - (!(config_make_window & 4) && (klass == EKG_MSGCLASS_MESSAGE || klass == EKG_MSGCLASS_SENT)) ) { + if ( (mclass == EKG_MSGCLASS_CHAT || mclass == EKG_MSGCLASS_SENT_CHAT) || + (!(config_make_window & 4) && (mclass == EKG_MSGCLASS_MESSAGE || mclass == EKG_MSGCLASS_SENT)) ) { activity = to_me ? EKG_WINACT_IMPORTANT : EKG_WINACT_MSG; separate = 1; } @@ -718,10 +718,10 @@ print_window(target, s, activity, separate, class_str, user, timestamp, (is_me ? text+4 : text), /* XXX, get_uid() get_nickname() */ - (klass >= EKG_MSGCLASS_SENT ? + (mclass >= EKG_MSGCLASS_SENT ? (is_me && config_nickname ? config_nickname : session_alias_uid(s)) : get_nickname(s, sender)), - (klass >= EKG_MSGCLASS_SENT ? s->uid : get_uid(s, sender)), + (mclass >= EKG_MSGCLASS_SENT ? s->uid : get_uid(s, sender)), (secure ? securestr : "")); xfree(text); @@ -740,7 +740,7 @@ char *text = *(va_arg(ap, char**)); uint32_t *format= *(va_arg(ap, uint32_t**)); time_t sent = *(va_arg(ap, time_t*)); - int klass = *(va_arg(ap, int*)); + int mclass = *(va_arg(ap, int*)); char *seq = *(va_arg(ap, char**)); int dobeep = *(va_arg(ap, int*)); int secure = *(va_arg(ap, int*)); @@ -755,7 +755,7 @@ return -1; /* display blinking */ - if (config_display_blinking && userlist && (klass < EKG_MSGCLASS_SENT) && (!rcpts || !rcpts[0])) { + if (config_display_blinking && userlist && (mclass < EKG_MSGCLASS_SENT) && (!rcpts || !rcpts[0])) { int oldstate = userlist->blink; if (config_make_window && xstrcmp(get_uid(session_class, window_current->target), get_uid(session_class, uid))) @@ -777,11 +777,11 @@ query_emit_id(NULL, USERLIST_CHANGED, &session, &uid); } - if (klass & EKG_NO_THEMEBIT) { - klass &= ~EKG_NO_THEMEBIT; + if (mclass & EKG_NO_THEMEBIT) { + mclass &= ~EKG_NO_THEMEBIT; empty_theme = 1; } - our_msg = (klass >= EKG_MSGCLASS_SENT); + our_msg = (mclass >= EKG_MSGCLASS_SENT); /* there is no need to decode our messages */ if (!our_msg && !empty_theme) { /* empty_theme + decrpyt? i don't think so... */ @@ -804,15 +804,15 @@ } if (our_msg) query_emit_id(NULL, PROTOCOL_MESSAGE_SENT, &session, &(rcpts[0]), &text); - else query_emit_id(NULL, PROTOCOL_MESSAGE_RECEIVED, &session, &uid, &rcpts, &text, &format, &sent, &klass, &seq, &secure); + else query_emit_id(NULL, PROTOCOL_MESSAGE_RECEIVED, &session, &uid, &rcpts, &text, &format, &sent, &mclass, &seq, &secure); - query_emit_id(NULL, PROTOCOL_MESSAGE_POST, &session, &uid, &rcpts, &text, &format, &sent, &klass, &seq, &secure); + query_emit_id(NULL, PROTOCOL_MESSAGE_POST, &session, &uid, &rcpts, &text, &format, &sent, &mclass, &seq, &secure); /* show it ! */ if (!(our_msg && !config_display_sent)) { if (empty_theme) - klass |= EKG_NO_THEMEBIT; - if (!(target = message_print(session, uid, (const char**) rcpts, text, format, sent, klass, seq, dobeep, secure))) + mclass |= EKG_NO_THEMEBIT; + if (!(target = message_print(session, uid, (const char**) rcpts, text, format, sent, mclass, seq, dobeep, secure))) return -1; } @@ -849,8 +849,8 @@ return 0; } -int protocol_message_emit(const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int klass, const char *seq, int dobeep, int secure) { - return query_emit_id_ro(NULL, PROTOCOL_MESSAGE, &(s->uid), &uid, &rcpts, &text, &format, &sent, &klass, &seq, &dobeep, &secure); +int protocol_message_emit(const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int mclass, const char *seq, int dobeep, int secure) { + return query_emit_id_ro(NULL, PROTOCOL_MESSAGE, &(s->uid), &uid, &rcpts, &text, &format, &sent, &mclass, &seq, &dobeep, &secure); } /** Modified: branches/c++_renames/ekg/protocol.h =================================================================== --- branches/c++_renames/ekg/protocol.h 2008-11-24 19:10:48 UTC (rev 4740) +++ branches/c++_renames/ekg/protocol.h 2008-11-26 19:04:24 UTC (rev 4741) @@ -88,12 +88,12 @@ void protocol_init(); char *message_print(const char *session, const char *sender, const char **rcpts, const char *text, const uint32_t *format, - time_t sent, int klass, const char *seq, int dobeep, int secure); + time_t sent, int mclass, const char *seq, int dobeep, int secure); int protocol_connected_emit(const session_t *s); int protocol_disconnected_emit(const session_t *s, const char *reason, int type); int protocol_message_ack_emit(const session_t *s, const char *rcpt, const char *seq, int status); -int protocol_message_emit(const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int klass, const char *seq, int dobeep, int secure); +int protocol_message_emit(const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int mclass, const char *seq, int dobeep, int secure); int protocol_status_emit(const session_t *s, const char *uid, int status, char *descr, time_t when); int protocol_xstate_emit(const session_t *s, const char *uid, int state, int offstate); Modified: branches/c++_renames/ekg/queries.h =================================================================== --- branches/c++_renames/ekg/queries.h 2008-11-24 19:10:48 UTC (rev 4740) +++ branches/c++_renames/ekg/queries.h 2008-11-26 19:04:24 UTC (rev 4741) @@ -157,7 +157,7 @@ QUERY_ARG_CHARPP, /* rcpts */ QUERY_ARG_UINT, /* uint32_t */ /* format */ QUERY_ARG_UINT, /* time_t */ /* sent */ - QUERY_ARG_INT, /* klass */ + QUERY_ARG_INT, /* mclass */ QUERY_ARG_CHARP, /* seq */ QUERY_ARG_INT, /* secure */ QUERY_ARG_END } }, @@ -168,7 +168,7 @@ QUERY_ARG_CHARPP, /* rcpts */ QUERY_ARG_UINT, /* uint32_t */ /* format */ QUERY_ARG_UINT, /* time_t */ /* sent */ - QUERY_ARG_INT, /* klass */ + QUERY_ARG_INT, /* mclass */ QUERY_ARG_CHARP, /* seq */ QUERY_ARG_INT, /* secure */ QUERY_ARG_END } }, @@ -311,7 +311,7 @@ QUERY_ARG_CHARP, /* text */ QUERY_ARG_UINT, /* uint32 */ /* format */ QUERY_ARG_UINT, /* time_t */ /* sent */ - QUERY_ARG_INT, /* klass */ + QUERY_ARG_INT, /* mclass */ QUERY_ARG_CHARP, /* seq */ QUERY_ARG_INT, /* dobeep */ QUERY_ARG_INT, /* secure */ Modified: branches/c++_renames/ekg/scripts.c =================================================================== --- branches/c++_renames/ekg/scripts.c 2008-11-24 19:10:48 UTC (rev 4740) +++ branches/c++_renames/ekg/scripts.c 2008-11-26 19:04:24 UTC (rev 4741) @@ -783,9 +783,9 @@ case 3: case 4: case 5: /* scripts protocol-message, protocol-message-post, protocol-message-received (v 1.0) - - ts (session, uid, klass, text, sent_time, ignore_level) - - vs (session, uid, rcpts, text, format, sent, klass, seq, secure) [protocol-message-post, protocol-message-recv] - - vs (session, uid, rcpts, text, format, sent, klass, seq, dobeep, secure) [protocol-message] + - ts (session, uid, mclass, text, sent_time, ignore_level) + - vs (session, uid, rcpts, text, format, sent, mclass, seq, secure) [protocol-message-post, protocol-message-recv] + - vs (session, uid, rcpts, text, format, sent, mclass, seq, dobeep, secure) [protocol-message] */ { temp->argc = 6; @@ -793,7 +793,7 @@ temp->argv_type[0] = QUERY_ARG_CHARP; /* session, OK */ temp->argv_type[1] = QUERY_ARG_CHARP; /* uid, OK */ - temp->argv_type[2] = QUERY_ARG_INT; /* klass, N_OK, BAD POS */ + temp->argv_type[2] = QUERY_ARG_INT; /* mclass, N_OK, BAD POS */ args[2] = args2[6]; temp->argv_type[3] = QUERY_ARG_CHARP; /* text, OK */ Modified: branches/c++_renames/plugins/python/doc.xml =================================================================== --- branches/c++_renames/plugins/python/doc.xml 2008-11-24 19:10:48 UTC (rev 4740) +++ branches/c++_renames/plugins/python/doc.xml 2008-11-26 19:04:24 UTC (rev 4741) @@ -729,7 +729,7 @@ protocol-message-received - Argumenty: session, id, klass, text, time, ignore_level + Argumenty: session, id, mclass, text, time, ignore_level Wywoływana gdy ekg otrzymuje wiadomość. From svn w toxygen.net Wed Nov 26 20:52:19 2008 From: svn w toxygen.net (SVN commit) Date: Wed, 26 Nov 2008 20:52:19 +0100 (CET) Subject: [ekg2-commit] r4742 - in branches/c++_renames: ekg plugins/irc: branches/c++_renames/ekg/dynstuff.c branches/c++_renames/ekg/dynstuff.h branches/c++_renames/ekg/dynstuff_inline.h branches/c++_renames/plugins/irc/people.c branches/c++_renames/plugins/irc/people.h Message-ID: <20081126195220.1638017B1F@toxygen.net> Author: porridge Date: 2008-11-26 20:52:19 +0100 (Wed, 26 Nov 2008) New Revision: 4742 Modified: branches/c++_renames/ekg/dynstuff.c branches/c++_renames/ekg/dynstuff.h branches/c++_renames/ekg/dynstuff_inline.h branches/c++_renames/plugins/irc/people.c branches/c++_renames/plugins/irc/people.h Log: Rename 'new' to 'new_' or 'new_nick', depending on the context. This is so that c++ compilers can parse our headers. Modified: branches/c++_renames/ekg/dynstuff.c =================================================================== --- branches/c++_renames/ekg/dynstuff.c 2008-11-26 19:04:24 UTC (rev 4741) +++ branches/c++_renames/ekg/dynstuff.c 2008-11-26 19:52:19 UTC (rev 4742) @@ -44,30 +44,30 @@ */ void *list_add_sorted(list_t *list, void *data, int (*comparision)(void *, void *)) { - list_t new, tmp; + list_t new_, tmp; if (!list) { errno = EFAULT; return NULL; } - new = xmalloc(sizeof(struct list)); + new_ = xmalloc(sizeof(struct list)); - new->data = data; - new->next = NULL; - /*new->prev = NULL;*/ + new_->data = data; + new_->next = NULL; + /*new_->prev = NULL;*/ if (!(tmp = *list)) { - *list = new; + *list = new_; } else { if (!comparision) { while (tmp->next) tmp = tmp->next; - tmp->next = new; + tmp->next = new_; } else { list_t prev = NULL; - while (comparision(new->data, tmp->data) > 0) { + while (comparision(new_->data, tmp->data) > 0) { prev = tmp; tmp = tmp->next; if (!tmp) @@ -75,16 +75,16 @@ } if (!prev) { - new->next = *list; - *list = new; + new_->next = *list; + *list = new_; } else { - prev->next = new; - new->next = tmp; + prev->next = new_; + new_->next = tmp; } } } - return new->data; + return new_->data; } /** @@ -99,20 +99,20 @@ void *list_add_beginning(list_t *list, void *data) { - list_t new; + list_t new_; if (!list) { errno = EFAULT; return NULL; } - new = xmalloc(sizeof(struct list)); - new->next = *list; - *list = new; + new_ = xmalloc(sizeof(struct list)); + new_->next = *list; + *list = new_; - new->data = data; + new_->data = data; - return new->data; + return new_->data; } @@ -133,7 +133,7 @@ return list_add_sorted(list, data, NULL); } -void *list_add_sorted3(list_t *list, list_t new, int (*comparision)(void *, void *)) +void *list_add_sorted3(list_t *list, list_t new_, int (*comparision)(void *, void *)) { list_t tmp; @@ -142,18 +142,18 @@ return NULL; } - new->next = NULL; + new_->next = NULL; if (!(tmp = *list)) { - *list = new; + *list = new_; } else { if (!comparision) { while (tmp->next) tmp = tmp->next; - tmp->next = new; + tmp->next = new_; } else { list_t prev = NULL; - while (comparision(new, tmp) > 0) { + while (comparision(new_, tmp) > 0) { prev = tmp; tmp = tmp->next; if (!tmp) @@ -161,35 +161,35 @@ } if (!prev) { - new->next = *list; - *list = new; + new_->next = *list; + *list = new_; } else { - prev->next = new; - new->next = tmp; + prev->next = new_; + new_->next = tmp; } } } - return new; + return new_; } -void *list_add_beginning3(list_t *list, list_t new) +void *list_add_beginning3(list_t *list, list_t new_) { if (!list) { errno = EFAULT; return NULL; } - new->next = *list; - *list = new; + new_->next = *list; + *list = new_; - return new; + return new_; } -void *list_add3(list_t *list, list_t new) +void *list_add3(list_t *list, list_t new_) { - return list_add_sorted3(list, new, NULL); + return list_add_sorted3(list, new_, NULL); } /** Modified: branches/c++_renames/ekg/dynstuff.h =================================================================== --- branches/c++_renames/ekg/dynstuff.h 2008-11-26 19:04:24 UTC (rev 4741) +++ branches/c++_renames/ekg/dynstuff.h 2008-11-26 19:52:19 UTC (rev 4742) @@ -100,9 +100,9 @@ void *list_add_beginning(list_t *list, void *data); void *list_add_sorted(list_t *list, void *data, int (*comparision)(void *, void *)); -void *list_add3(list_t *list, list_t new); -void *list_add_beginning3(list_t *list, list_t new); -void *list_add_sorted3(list_t *list, list_t new, int (*comparision)(void *, void *)); +void *list_add3(list_t *list, list_t new_); +void *list_add_beginning3(list_t *list, list_t new_); +void *list_add_sorted3(list_t *list, list_t new_, int (*comparision)(void *, void *)); int list_count(list_t list); Modified: branches/c++_renames/ekg/dynstuff_inline.h =================================================================== --- branches/c++_renames/ekg/dynstuff_inline.h 2008-11-26 19:04:24 UTC (rev 4741) +++ branches/c++_renames/ekg/dynstuff_inline.h 2008-11-26 19:52:19 UTC (rev 4742) @@ -16,13 +16,13 @@ #if DYNSTUFF_USE_LIST3 #define __DYNSTUFF_LIST_ADD(lista, typ, __notused) \ - void lista##_add(typ *new) { list_add3((list_t *) (void *) &lista, (list_t) new); } + void lista##_add(typ *new_) { list_add3((list_t *) (void *) &lista, (list_t) new_); } #define __DYNSTUFF_LIST_ADD_BEGINNING(lista, typ, __notused) \ - void lista##_add(typ *new) { list_add_beginning3((list_t *) (void *) &lista, (list_t) new); } + void lista##_add(typ *new_) { list_add_beginning3((list_t *) (void *) &lista, (list_t) new_); } #define __DYNSTUFF_LIST_ADD_SORTED(lista, typ, comparision) \ - void lista##_add(typ *new) { list_add_sorted3((list_t *) (void *) &lista, (list_t) new, (void *) comparision); } + void lista##_add(typ *new_) { list_add_sorted3((list_t *) (void *) &lista, (list_t) new_, (void *) comparision); } #define __DYNSTUFF_LIST_REMOVE_SAFE(lista, typ, free_func) \ void lista##_remove(typ *elem) { list_remove3((list_t *) (void *) &lista, (list_t) elem, (void *) free_func); } @@ -42,35 +42,35 @@ #else #define __DYNSTUFF_LIST_ADD(lista, typ, __notused) \ - void lista##_add(typ *new) { \ - new->next = NULL; \ + void lista##_add(typ *new_) { \ + new_->next = NULL; \ if (!lista) { \ - lista = new; \ + lista = new_; \ } else { \ typ *tmp = lista; \ \ while (tmp->next) \ tmp = tmp->next; \ - tmp->next = new; \ + tmp->next = new_; \ } \ } #define __DYNSTUFF_LIST_ADD_BEGINNING(lista, typ, __notused) \ - void lista##_add(typ *new) { \ - new->next = lista; \ - lista = new; \ + void lista##_add(typ *new_) { \ + new_->next = lista; \ + lista = new_; \ } #define __DYNSTUFF_LIST_ADD_SORTED(lista, typ, comparision) \ - void lista##_add(typ *new) { \ - new->next = NULL; \ + void lista##_add(typ *new_) { \ + new_->next = NULL; \ if (!lista) { \ - lista = new; \ + lista = new_; \ } else { \ typ *tmp = lista; \ typ *prev = NULL; \ \ - while (comparision(new, tmp) > 0) { \ + while (comparision(new_, tmp) > 0) { \ prev = tmp; \ tmp = tmp->next; \ if (!tmp) \ @@ -78,11 +78,11 @@ } \ \ if (!prev) { \ - new->next = lista; \ - lista = new; \ + new_->next = lista; \ + lista = new_; \ } else { \ - prev->next = new; \ - new->next = tmp; \ + prev->next = new_; \ + new_->next = tmp; \ } \ } \ } @@ -191,13 +191,13 @@ #if DYNSTUFF_USE_LIST3 #define __DYNSTUFF_ADD(prefix, typ, __notused) \ - void prefix##_add(typ **lista, typ *new) { list_add3((list_t *) lista, (list_t) new); } + void prefix##_add(typ **lista, typ *new_) { list_add3((list_t *) lista, (list_t) new_); } #define __DYNSTUFF_ADD_BEGINNING(prefix, typ, __notused) \ - void prefix##_add(typ **lista, typ *new) { list_add_beginning3((list_t *) lista, (list_t) new); } + void prefix##_add(typ **lista, typ *new_) { list_add_beginning3((list_t *) lista, (list_t) new_); } #define __DYNSTUFF_ADD_SORTED(prefix, typ, comparision) \ - void prefix##_add(typ **lista, typ *new) { list_add_sorted3((list_t *) lista, (list_t) new, (void *) comparision); } + void prefix##_add(typ **lista, typ *new_) { list_add_sorted3((list_t *) lista, (list_t) new_, (void *) comparision); } #define __DYNSTUFF_REMOVE_SAFE(prefix, typ, free_func) \ void prefix##_remove(typ **lista, typ *elem) { \ @@ -229,36 +229,36 @@ /* XXX, checkit */ #define __DYNSTUFF_ADD(prefix, typ, __notused) \ - void prefix##_add(typ **lista, typ *new) { \ + void prefix##_add(typ **lista, typ *new_) { \ typ *tmp = *lista; \ \ - new->next = NULL; \ + new_->next = NULL; \ if (!(tmp = *lista)) { \ - *lista = new; \ + *lista = new_; \ } else { \ while (tmp->next) \ tmp = tmp->next; \ - tmp->next = new; \ + tmp->next = new_; \ } \ } #define __DYNSTUFF_ADD_BEGINNING(prefix, typ, __notused) \ - void prefix##_add(typ **lista, typ *new) { \ - new->next = *lista; \ - *lista = new; \ + void prefix##_add(typ **lista, typ *new_) { \ + new_->next = *lista; \ + *lista = new_; \ } #define __DYNSTUFF_ADD_SORTED(prefix, typ, comparision) \ - void prefix##_add(typ **lista, typ *new) { \ + void prefix##_add(typ **lista, typ *new_) { \ typ *tmp; \ \ - new->next = NULL; \ + new_->next = NULL; \ if (!(tmp = *lista)) { \ - *lista = new; \ + *lista = new_; \ } else { \ typ *prev = NULL; \ \ - while (comparision(new, tmp) > 0) { \ + while (comparision(new_, tmp) > 0) { \ prev = tmp; \ tmp = tmp->next; \ if (!tmp) \ @@ -266,11 +266,11 @@ } \ \ if (!prev) { \ - new->next = *lista; \ - *lista = new; \ + new_->next = *lista; \ + *lista = new_; \ } else { \ - prev->next = new; \ - new->next = tmp; \ + prev->next = new_; \ + new_->next = tmp; \ } \ } \ } Modified: branches/c++_renames/plugins/irc/people.c =================================================================== --- branches/c++_renames/plugins/irc/people.c 2008-11-26 19:04:24 UTC (rev 4741) +++ branches/c++_renames/plugins/irc/people.c 2008-11-26 19:52:19 UTC (rev 4742) @@ -566,14 +566,14 @@ * * @param s - current session structure * @param j - irc priv_data structure of current session - * @param old - old nickname of user without 'irc:' + * @param old_nick - old nickname of user without 'irc:' * prefix, and WITHOUT '@%+' prefix - * @param new - new nickname of user without 'irc:' + * @param new_nick - new nickname of user without 'irc:' * prefix, and WITHOUT '@%+' prefix * * @return 0 */ -int irc_nick_change(session_t *s, irc_private_t *j, char *old, char *new) +int irc_nick_change(session_t *s, irc_private_t *j, char *old_nick, char *new_nick) { userlist_t *ulist, *newul; list_t i; @@ -581,9 +581,9 @@ people_t *per; people_chan_t *pch; window_t *w; - char *t1, *t2 = irc_uid(new); + char *t1, *t2 = irc_uid(new_nick); - if (!(per = irc_find_person(j->people, old))) { + if (!(per = irc_find_person(j->people, old_nick))) { debug_error("irc_nick_change() person not found?\n"); xfree(t2); return 0; @@ -611,8 +611,8 @@ pch = (people_chan_t *)i->data; w = window_find_s(s, pch->chanp->name); - if (w && (ulist = userlist_find_u(&(w->userlist), old))) { - newul = userlist_add_u(&(w->userlist), t2, new); + if (w && (ulist = userlist_find_u(&(w->userlist), old_nick))) { + newul = userlist_add_u(&(w->userlist), t2, new_nick); newul->status = ulist->status; userlist_remove_u(&(w->userlist), ulist); /* XXX dj, userlist_replace() */ @@ -634,11 +634,11 @@ /* if person who changed nick had longest nick, * update longest_nick variable */ - if (xstrlen(new) > pch->chanp->longest_nick) + if (xstrlen(new_nick) > pch->chanp->longest_nick) { - pch->chanp->longest_nick = xstrlen(new); + pch->chanp->longest_nick = xstrlen(new_nick); nickpad_string_create(pch->chanp); - } else if (xstrlen(old) == pch->chanp->longest_nick) + } else if (xstrlen(old_nick) == pch->chanp->longest_nick) update_longest_nick (pch->chanp); } Modified: branches/c++_renames/plugins/irc/people.h =================================================================== --- branches/c++_renames/plugins/irc/people.h 2008-11-26 19:04:24 UTC (rev 4741) +++ branches/c++_renames/plugins/irc/people.h 2008-11-26 19:52:19 UTC (rev 4742) @@ -42,7 +42,7 @@ channel_t *irc_add_channel(session_t *s, irc_private_t *j, char *name, window_t *win); -int irc_nick_change(session_t *s, irc_private_t *j, char *old, char *new); +int irc_nick_change(session_t *s, irc_private_t *j, char *old_nick, char *new_nick); int irc_nick_prefix(irc_private_t *j, people_chan_t *ch, int irc_color); int irc_color_in_contacts(char *modes, int mode, userlist_t *ul);