Index: msgqueue.h
===================================================================
--- msgqueue.h (revision 4699)
+++ msgqueue.h (working copy)
@@ -36,12 +36,20 @@
char *seq; /* numer sekwencyjny */
time_t time; /* czas wys�ania */
unsigned int mark : 1; /* if added during cleanup */
+#if defined(__cplusplus)
+ msgclass_t __class__;
+#else
msgclass_t class;
+#endif
} 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);
+#if defined(__cplusplus)
+ int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t __class__);
+#else
+ int msg_queue_add(const char *session, const char *rcpts, const char *message, const char *seq, msgclass_t class);
+#endif
void msgs_queue_destroy();
int msg_queue_count_session(const char *uid);
int msg_queue_remove_uid(const char *uid);
Index: themes.h
===================================================================
--- themes.h (revision 4699)
+++ themes.h (working copy)
@@ -45,7 +45,11 @@
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) */
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private; /* can be helpfull */
+#endif
} fstring_t;
#define print(x...) print_window_w(NULL, EKG_WINACT_JUNK, x)
Index: scripts.h
===================================================================
--- scripts.h (revision 4699)
+++ scripts.h (working copy)
@@ -28,7 +28,11 @@
void *lang;
char *name;
char *path;
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private;
+#endif
int inited;
} script_t;
extern script_t *scripts;
@@ -37,13 +41,21 @@
script_t *scr;
struct timer *self;
int removed;
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private;
+#endif
} script_timer_t;
typedef struct {
script_t *scr;
plugin_t *self;
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private;
+#endif
} script_plugin_t;
typedef struct {
@@ -52,7 +64,11 @@
char *name;
char *value;
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private;
+#endif
} script_var_t;
typedef struct {
@@ -60,14 +76,22 @@
query_t *self;
int argc;
int argv_type[MAX_ARGS];
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private;
+#endif
int hack;
} script_query_t;
typedef struct {
script_t *scr;
command_t *self;
- void *private;
+#if defined(__cplusplus)
+ void *__private__;
+#else
+ void *private;
+#endif
} script_command_t;
typedef struct {
@@ -75,7 +99,11 @@
watch_t *self;
int removed;
void *data;
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private;
+#endif
} script_watch_t;
typedef int (scriptlang_initialize_t)();
@@ -109,8 +137,11 @@
script_handler_timer_t *script_handler_timer;
script_handler_var_t *script_handler_var;
script_handler_watch_t *script_handler_watch;
-
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private;
+#endif
} scriptlang_t;
extern scriptlang_t *scriptlang;
@@ -159,10 +190,14 @@
script_handler_var : x##_variable_changed,\
script_handler_watch : x##_watches,\
}
+#if defined(__cplusplus)
+ #define script_private_get(s) (s->__private__)
+ #define script_private_set(s, p) (s->__private__ = p)
+#else
+ #define script_private_get(s) (s->private)
+ #define script_private_set(s, p) (s->private = p)
+#endif
-#define script_private_get(s) (s->private)
-#define script_private_set(s, p) (s->private = p)
-
#ifndef EKG2_WIN32_NOFUNCTION
int script_unload_lang(scriptlang_t *s);
Index: windows.h
===================================================================
--- windows.h (revision 4699)
+++ windows.h (working copy)
@@ -77,7 +77,11 @@
struct userlist *userlist; /* sometimes window may require separate userlist */
window_lastlog_t *lastlog; /* prywatne informacje lastloga */
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private; /* prywatne informacje ui */
+#endif
} window_t;
typedef enum {
Index: protocol.h
===================================================================
--- protocol.h (revision 4699)
+++ protocol.h (working copy)
@@ -83,13 +83,22 @@
#ifndef EKG2_WIN32_NOFUNCTION
void protocol_init();
+#if defined(__cplusplus)
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);
+#else
+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);
+#endif
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);
+#if defined(__cplusplus)
+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);
+#else
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);
+#endif
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);
Index: userlist.h
===================================================================
--- userlist.h (revision 4699)
+++ userlist.h (working copy)
@@ -72,7 +72,11 @@
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 */
+#if defined(__cplusplus)
+ void *__private__;
+#else
+ void *private; /**<Alternate private data, used by ncurses plugin */
+#endif
private_data_t *priv_list; /* New user private data */
} userlist_t;
@@ -113,7 +117,11 @@
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] */
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private; /**< priv, like u->private [private data info/struct] */
+#endif
} ekg_resource_t;
/**
Index: stuff.h
===================================================================
--- stuff.h (revision 4699)
+++ stuff.h (working copy)
@@ -61,11 +61,19 @@
plugin_t *plugin; /* obs�uguj�cy plugin */
char *name; /* nazwa, wy�wietlana przy /exec */
child_handler_t handler; /* zak�ad pogrzebowy */
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private; /* dane procesu */
+#endif
} 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);
+#if defined(__cplusplus)
+ child_t *child_add(plugin_t *plugin, pid_t pid, const char *name, child_handler_t handler, void *__private__);
+#else
+ child_t *child_add(plugin_t *plugin, pid_t pid, const char *name, child_handler_t handler, void *private);
+#endif
child_t *children_removei(child_t *c);
void children_destroy(void);
#endif
@@ -120,7 +128,11 @@
char *session;
char *name;
struct userlist *participants;
+#if defined(__cplusplus)
+ void *__private__;
+#else
void *private;
+#endif
} newconference_t;
struct buffer {
@@ -319,7 +331,10 @@
char *xstrmid(const char *str, int start, int length);
void xstrtr(char *text, char from, char to);
char color_map(unsigned char r, unsigned char g, unsigned char b);
-char *strcasestr(const char *haystack, const char *needle);
+#if defined(__cplusplus)
+#else
+ char *strcasestr(const char *haystack, const char *needle);
+#endif
int msg_all(session_t *s, const char *function, const char *what);
int say_it(const char *str);
char *split_line(char **ptr);