[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src account.c,1.13,1.14 account.h,1.8,1.9 acc
From: |
Philip S Tellis <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src account.c,1.13,1.14 account.h,1.8,1.9 account_parser.y,1.3,1.4 add_contact_window.c,1.15,1.16 add_contact_window.h,1.7,1.8 away_window.c,1.11,1.12 chat_room.c,1.37,1.38 chat_room.h,1.10,1.11 chat_window.c,1.32,1.33 contact.h,1.4,1.5 contact_parser.y,1.6,1.7 contactlist.c,1.3,1.4 dialog.c,1.16,1.17 edit_account_window.c,1.10,1.11 edit_contact_window.c,1.9,1.10 edit_local_accounts.c,1.2,1.3 file_select.c,1.4,1.5 globals.h,1.7,1.8 gtk_eb_html.c,1.8,1.9 llist.c,1.2,1.3 prefs.c,1.23,1.24 service.c,1.8,1.9 service.h,1.10,1.11 smileys.c,1.11,1.12 smileys.h,1.4,1.5 status.c,1.32,1.33 util.c,1.25,1.26 util.h,1.14,1.15 |
Date: |
Fri, 24 Jan 2003 08:34:45 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv13526/src
Modified Files:
account.c account.h account_parser.y add_contact_window.c
add_contact_window.h away_window.c chat_room.c chat_room.h
chat_window.c contact.h contact_parser.y contactlist.c
dialog.c edit_account_window.c edit_contact_window.c
edit_local_accounts.c file_select.c globals.h gtk_eb_html.c
llist.c prefs.c service.c service.h smileys.c smileys.h
status.c util.c util.h
Log Message:
changed GList to LList in many places. please test.
Index: account.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- account.c 24 Jan 2003 00:29:13 -0000 1.13
+++ account.c 24 Jan 2003 13:34:41 -0000 1.14
@@ -34,7 +34,7 @@
{
FILE * fp;
char buff2[1024];
- GList * l1;
+ LList * l1;
/*
* The contact list is a 3 dimensional linked list, at the top
@@ -75,9 +75,9 @@
{
FILE * fp;
char buff2[1024];
- GList * l1;
- GList * l2;
- GList * l3;
+ LList * l1;
+ LList * l2;
+ LList * l3;
/*
* The contact list is a 3 dimensional linked list, at the top
@@ -157,7 +157,7 @@
char buff2[1024];
extern int contactparse();
extern FILE * contactin;
- GList *cts = NULL;
+ LList *cts = NULL;
snprintf(buff2, 1024, "%scontacts",config_dir);
if(!(fp = fopen(buff2,"r")))
Index: account.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- account.h 20 Jan 2003 12:33:44 -0000 1.8
+++ account.h 24 Jan 2003 13:34:41 -0000 1.9
@@ -27,7 +27,8 @@
#ifndef __ACCOUNT_H__
#define __ACCOUNT_H__
-#include <glib.h>
+#include <glib.h> /* Remove this eventually */
+#include "llist.h"
struct contact;
@@ -38,7 +39,7 @@
typedef struct _grouplist
{
char name[255];
- GList * members;
+ LList * members;
void * list_item; /* GtkWidget */
void * tree; /* GtkWidget */
void * label; /* GtkWidget */
@@ -55,7 +56,7 @@
void * status; /* GtkWidget */
void * pix; /* GtkWidget */
int icon_handler;
- gboolean online;
+ int online;
int status_handler;
struct _info_window * infowindow;
} eb_account;
@@ -65,8 +66,8 @@
int service_id;
char *handle;
char alias[255];
- gboolean connected;
- gboolean connecting;
+ int connected;
+ int connecting;
void * status_button; /* GtkWidget */
GSList * status_menu;
void *protocol_local_account_data;
Index: account_parser.y
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account_parser.y,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- account_parser.y 16 Jan 2003 09:51:04 -0000 1.3
+++ account_parser.y 24 Jan 2003 13:34:41 -0000 1.4
@@ -20,7 +20,8 @@
%}
%union {
- GList * vals;
+ LList * vals;
+ GList * gvals;
value_pair * val;
gchar * string;
eb_local_account * acnt;
@@ -30,7 +31,7 @@
%token <string> STRING
%type <vals> account_list
%type <acnt> account
-%type <vals> value_list
+%type <gvals> value_list
%type <val> key_pair
%%
@@ -42,7 +43,7 @@
account account_list
{
if($1) {
- $$ = g_list_append( $2, $1 );
+ $$ = l_list_append( $2, $1 );
eb_debug(DBG_CORE, "Adding account %s\n",
$1->handle);
} else {
$$=$2;
Index: add_contact_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/add_contact_window.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- add_contact_window.c 21 Jan 2003 01:11:01 -0000 1.15
+++ add_contact_window.c 24 Jan 2003 13:34:41 -0000 1.16
@@ -65,9 +65,9 @@
* with this information
*/
-static GList * get_contacts(gchar *group)
+static LList * get_contacts(gchar *group)
{
- GList *node = NULL, *newlist = NULL;
+ LList *node = NULL, *newlist = NULL;
grouplist *g;
g = find_grouplist_by_name(group);
@@ -76,7 +76,7 @@
node = g->members;
while(node) {
- newlist = g_list_insert_sorted(newlist,
+ newlist = l_list_insert_sorted(newlist,
((struct contact *)node->data)->nick,
strcasecmp_glist);
node = node->next;
@@ -85,14 +85,14 @@
return newlist;
}
-GList * get_all_contacts()
+LList * get_all_contacts()
{
- GList *node = get_groups();
- GList *newlist = NULL;
+ LList *node = get_groups();
+ LList *newlist = NULL;
while(node) {
- GList * g = get_contacts(node->data);
- newlist = g_list_concat(newlist, g);
+ LList * g = get_contacts(node->data);
+ newlist = l_list_concat(newlist, g);
node = node->next;
}
@@ -103,9 +103,9 @@
* this gets a list of all accounts associated with a contact
*/
-static GList * get_eb_accounts(gchar *contact)
+static LList * get_eb_accounts(gchar *contact)
{
- GList *node = NULL, *newlist = NULL;
+ LList *node = NULL, *newlist = NULL;
struct contact * c;
c = find_contact_by_nick(contact);
@@ -114,24 +114,24 @@
node = c->accounts;
while(node) {
- newlist = g_list_append(newlist, ((eb_account *)node->data));
+ newlist = l_list_append(newlist, ((eb_account *)node->data));
node = node->next;
}
return newlist;
}
-GList * get_all_accounts(int serviceid)
+LList * get_all_accounts(int serviceid)
{
- GList *node = get_all_contacts();
- GList *newlist = NULL;
+ LList *node = get_all_contacts();
+ LList *newlist = NULL;
while(node) {
- GList * g = get_eb_accounts(((struct
contact*)node->data)->nick);
+ LList * g = get_eb_accounts(((struct
contact*)node->data)->nick);
while (g) {
eb_account *ac = (eb_account *)g->data;
if (ac->service_id == serviceid)
- newlist = g_list_append(newlist, ac->handle);
+ newlist = l_list_append(newlist, ac->handle);
g = g->next;
}
node = node->next;
@@ -142,7 +142,7 @@
static void dif_group(GtkEditable *editable, gpointer user_data)
{
- GList * list = get_contacts(COMBO_TEXT(group_name));
+ GList * list =
llist_to_glist(get_contacts(COMBO_TEXT(group_name)), 1);
gtk_signal_handler_block(GTK_OBJECT(GTK_COMBO(contact_name)->entry),
contact_input_handler);
gtk_combo_set_popdown_strings(GTK_COMBO(contact_name), list);
@@ -208,7 +208,7 @@
}
add_account(con->nick, ea);
- if (g_list_length(con->accounts) == 0)
+ if (l_list_length(con->accounts) == 0)
remove_contact(con);
update_contact_list ();
write_contact_list();
@@ -299,7 +299,7 @@
/*List of available groups*/
group_name = gtk_combo_new();
- list = get_groups();
+ list = llist_to_glist(get_groups(), 1);
gtk_combo_set_popdown_strings(GTK_COMBO(group_name), list );
if(strlen(COMBO_TEXT(group_name)) == 0) {
@@ -333,7 +333,7 @@
/*List of available contacts*/
contact_name = gtk_combo_new();
- list = get_all_contacts();
+ list = llist_to_glist(get_all_contacts(), 1);
gtk_combo_set_popdown_strings(GTK_COMBO(contact_name), list );
if(cont != NULL)
gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(contact_name)->entry), cont->nick);
Index: add_contact_window.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/add_contact_window.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- add_contact_window.h 20 Jan 2003 20:33:18 -0000 1.7
+++ add_contact_window.h 24 Jan 2003 13:34:41 -0000 1.8
@@ -35,8 +35,8 @@
void edit_account_window_new( eb_account * ea );
void add_unknown_account_window_new( eb_account * ea );
void edit_group_window_new( grouplist * g);
-GList * get_all_accounts(int service);
-GList * get_all_contacts();
+LList * get_all_accounts(int service);
+LList * get_all_contacts();
#ifdef __cplusplus
}
#endif
Index: away_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/away_window.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- away_window.c 20 Jan 2003 12:33:44 -0000 1.11
+++ away_window.c 24 Jan 2003 13:34:41 -0000 1.12
@@ -56,7 +56,7 @@
static GtkWidget *title = NULL;
static GtkWidget *save_later = NULL;
-static GList *away_messages = NULL;
+static LList *away_messages = NULL;
static gint away_open = 0;
@@ -65,12 +65,12 @@
static void destroy_away()
{
- GList * list;
+ LList * list;
eb_local_account * ela = NULL;
is_away = 0;
- for (list = accounts; list; list = g_list_next(list)) {
+ for (list = accounts; list; list = list->next) {
ela = list->data;
/* Only change state for those accounts which are connected */
if(ela->connected)
@@ -111,7 +111,7 @@
if (!g_strncasecmp(buff, "<AWAY_MESSAGE>",
strlen("<AWAY_MESSAGE>"))) {
my_away = g_new0(away, 1);
} else if (!g_strncasecmp( buff, "</AWAY_MESSAGE>",
strlen("</AWAY_MESSAGE>"))) {
- away_messages = g_list_append(away_messages, my_away);
+ away_messages = l_list_append(away_messages, my_away);
} else if (!g_strncasecmp(buff, "<TITLE>", strlen("<TITLE>"))) {
reading_title=TRUE;
} else if (!g_strncasecmp(buff, "</TITLE>",
strlen("</TITLE>"))) {
@@ -138,7 +138,7 @@
{
GList * l;
GtkWidget * label;
- GList * away_list = away_messages;
+ LList * away_list = away_messages;
away * my_away = NULL;
l = gtk_container_children(GTK_CONTAINER(away_menu));
@@ -181,7 +181,7 @@
void write_away_messages()
{
- GList * away_list = away_messages;
+ LList * away_list = away_messages;
FILE *fp;
char buff2[2048];
away * my_away;
@@ -241,7 +241,7 @@
strncpy(my_away->title, a_title->str, strlen(a_title->str));
my_away->message = g_string_new(NULL);
g_string_append(my_away->message, a_message->str);
- away_messages = g_list_append(away_messages, my_away);
+ away_messages = l_list_append(away_messages, my_away);
write_away_messages();
build_away_menu();
}
@@ -406,7 +406,7 @@
static void show_away(GtkWidget *w, gchar *a_message)
{
- GList * list;
+ LList * list;
eb_local_account * ela = NULL;
if (!is_away) {
@@ -457,7 +457,7 @@
gtk_widget_show(awaybox);
is_away = 1;
- for (list = accounts; list; list = g_list_next(list)) {
+ for (list = accounts; list; list = list->next) {
ela = list->data;
/* Only change state for those accounts which are connected */
if(ela->connected)
Index: chat_room.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- chat_room.c 24 Jan 2003 00:29:13 -0000 1.37
+++ chat_room.c 24 Jan 2003 13:34:41 -0000 1.38
@@ -42,9 +42,9 @@
#include "pixmaps/smiley_button.xpm"
-GList * chat_rooms = NULL;
+LList * chat_rooms = NULL;
-static GList * get_contacts( eb_chat_room * room );
+static LList * get_contacts( eb_chat_room * room );
static void handle_focus(GtkWidget *widget, GdkEventFocus * event, gpointer
userdata);
static void eb_chat_room_update_window_title(eb_chat_room *ecb, gboolean
new_message);
@@ -59,8 +59,8 @@
if(ecr->this_msg_in_history)
{
- GList * node=NULL;
- GList * node2=NULL;
+ LList * node=NULL;
+ LList * node2=NULL;
for(node=ecr->history; node!=NULL ; node=node->next)
{
@@ -70,7 +70,7 @@
node2->data=strdup(text);
ecr->this_msg_in_history=0;
} else {
- ecr->history=g_list_append(ecr->history, strdup(text));
+ ecr->history=l_list_append(ecr->history, strdup(text));
ecr->hist_pos=NULL;
}
@@ -84,7 +84,7 @@
static void send_typing_status(eb_chat_room *cr)
{
time_t now=time(NULL);
- /*GList *others;*/
+ /*LList *others;*/
if(!iGetLocalPref("do_send_typing_notify"))
return;
@@ -130,7 +130,7 @@
if(cr->hist_pos==NULL)
{
char * s;
- GList * node;
+ LList * node;
s= gtk_editable_get_chars(GTK_EDITABLE (cr->entry), 0, -1);
@@ -141,7 +141,7 @@
if(strlen(s)>0)
{
- cr->history=g_list_append(cr->history, strdup(s));
+ cr->history=l_list_append(cr->history, strdup(s));
//cr->hist_pos=cr->history->next;
g_free(s); // that strdup() followed by g_free() looks stupid, but
it isn't
// - strdup() uses vanilla malloc(), and the destroy
code uses
@@ -155,7 +155,7 @@
cr->hist_pos=cr->hist_pos->prev;
if(cr->hist_pos==NULL)
{
- GList * node;
+ LList * node;
eb_debug(DBG_CORE,"history Wrapped!\n");
for(node=cr->history; node!=NULL ; node=node->next)
{
@@ -245,9 +245,7 @@
GList * list;
if( !room || room->invite_window_is_open )
- {
return;
- }
room->invite_window = gtk_window_new(GTK_WINDOW_DIALOG);
gtk_window_set_position(GTK_WINDOW(room->invite_window),
GTK_WIN_POS_MOUSE);
@@ -259,8 +257,9 @@
gtk_widget_show(label);
room->invite_buddy = gtk_combo_new();
- list = get_contacts(room);
+ list = llist_to_glist(get_contacts(room), 1);
gtk_combo_set_popdown_strings(GTK_COMBO(room->invite_buddy), list);
+ g_list_free(list);
gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(room->invite_buddy)->entry), "");
gtk_container_add(GTK_CONTAINER(box2), room->invite_buddy);
gtk_widget_show(room->invite_buddy);
@@ -499,13 +498,13 @@
{
eb_chat_room * ecr = data;
RUN_SERVICE(ecr->chat_room_account)->leave_chat_room(ecr);
- chat_rooms = g_list_remove(chat_rooms, data);
+ chat_rooms = l_list_remove(chat_rooms, data);
g_free(ecr);
}
-static GList * find_chat_room_buddy( eb_chat_room * room, gchar * user )
+static LList * find_chat_room_buddy( eb_chat_room * room, gchar * user )
{
- GList * node;
+ LList * node;
for( node = room->fellows; node; node = node->next)
{
eb_chat_room_buddy * ecrb = node->data;
@@ -519,7 +518,7 @@
static void eb_chat_room_refresh_list(eb_chat_room * room )
{
- GList * node;
+ LList * node;
gtk_clist_clear(GTK_CLIST(room->online));
for( node = room->fellows; node; node = node->next )
@@ -539,7 +538,7 @@
{
eb_chat_room_buddy * ecrb = NULL;
gchar *buf;
- GList *t;
+ LList *t;
ecrb = g_new0(eb_chat_room_buddy, 1 );
strcpy( ecrb->alias, alias);
strcpy( ecrb->handle, handle );
@@ -553,14 +552,14 @@
eb_chat_room_show_3rdperson(room, buf);
g_free(buf);
- room->fellows = g_list_append(room->fellows, ecrb);
+ room->fellows = l_list_append(room->fellows, ecrb);
eb_chat_room_refresh_list(room);
}
void eb_chat_room_buddy_leave( eb_chat_room * room, gchar * handle )
{
- GList * node = find_chat_room_buddy(room, handle);
+ LList * node = find_chat_room_buddy(room, handle);
gchar *buf;
buf = g_strdup_printf(_("<i>%s has left the chat</i>"), handle);
@@ -572,7 +571,7 @@
eb_chat_room_buddy * ecrb = node->data;
eb_account *ea = find_account_by_handle(ecrb->handle,
room->service_id);
eb_chat_room_display_status (ea, NULL);
- room->fellows = g_list_remove(room->fellows, ecrb);
+ room->fellows = l_list_remove(room->fellows, ecrb);
g_free(ecrb);
}
eb_chat_room_refresh_list(room);
@@ -611,7 +610,7 @@
if( ecb )
{
ecb->service_id = service;
- chat_rooms = g_list_append(chat_rooms, ecb);
+ chat_rooms = l_list_append(chat_rooms, ecb);
eb_chat_room_update_window_title(ecb, FALSE);
}
}
@@ -648,7 +647,7 @@
}
else
{
- GList *walk;
+ LList *walk;
eb_account *acc = NULL;
gchar * color;
time_t t;
@@ -677,7 +676,7 @@
acc = NULL;
}
if (acc && chat_room->typing_fellows) {
- chat_room->typing_fellows =
g_list_remove(chat_room->typing_fellows,acc);
+ chat_room->typing_fellows =
l_list_remove(chat_room->typing_fellows,acc);
eb_chat_room_display_status (acc, NULL);
}
eb_chat_room_update_window_title(chat_room, TRUE);
@@ -761,8 +760,8 @@
if(chat_room->connected)
return;
- if (!g_list_find(chat_rooms, chat_room))
- chat_rooms = g_list_append(chat_rooms, chat_room);
+ if (!l_list_find(chat_rooms, chat_room))
+ chat_rooms = l_list_append(chat_rooms, chat_room);
/*otherwise we are going to make ourselves a gui right here*/
@@ -1029,9 +1028,9 @@
}
-static GList * get_group_contacts(gchar *group, eb_chat_room * room)
+static LList * get_group_contacts(gchar *group, eb_chat_room * room)
{
- GList *node = NULL, *newlist = NULL, *accounts = NULL;
+ LList *node = NULL, *newlist = NULL, *accounts = NULL;
grouplist *g;
g = find_grouplist_by_name(group);
@@ -1046,7 +1045,7 @@
while (accounts) {
if( ((struct account *)accounts->data)->service_id ==
room->service_id
&& ((struct account *)accounts->data)->online) {
- newlist = g_list_append(newlist, ((struct
account *)accounts->data)->handle);
+ newlist = l_list_append(newlist, ((struct
account *)accounts->data)->handle);
}
accounts = accounts->next;
}
@@ -1056,14 +1055,14 @@
return newlist;
}
-static GList * get_contacts(eb_chat_room * room)
+static LList * get_contacts(eb_chat_room * room)
{
- GList *node = groups;
- GList *newlist = NULL;
+ LList *node = groups;
+ LList *newlist = NULL;
while(node)
{
- GList * g = get_group_contacts(node->data, room);
- newlist = g_list_concat(newlist, g);
+ LList * g = get_group_contacts(node->data, room);
+ newlist = l_list_concat(newlist, g);
node = node->next;
}
return newlist;
@@ -1071,21 +1070,23 @@
void eb_chat_room_display_status (eb_account *remote, char *message)
{
- GList *rooms = NULL, *walk = NULL;
+ LList *rooms = NULL;
if (!iGetLocalPref("do_typing_notify"))
return;
rooms = find_chatrooms_with_remote_account(remote);
- for (walk = rooms; walk && walk->data; walk = walk->next) {
- eb_chat_room *ecr = walk->data;
+ for (; rooms && rooms->data; rooms = rooms->next) {
+
+ eb_chat_room *ecr = rooms->data;
gchar *tmp = NULL;
gchar *typing = NULL, *typing_old = NULL;
- GList *walk2 = NULL;
+ LList *walk2 = NULL;
+
if (message && !strcmp(_("typing..."), message)) {
- if (!ecr->typing_fellows ||
!g_list_find(ecr->typing_fellows, remote))
- ecr->typing_fellows =
g_list_append(ecr->typing_fellows, remote);
+ if (!ecr->typing_fellows ||
!l_list_find(ecr->typing_fellows, remote))
+ ecr->typing_fellows =
l_list_append(ecr->typing_fellows, remote);
} else if (ecr->typing_fellows) {
- ecr->typing_fellows =
g_list_remove(ecr->typing_fellows, remote);
+ ecr->typing_fellows =
l_list_remove(ecr->typing_fellows, remote);
}
for (walk2 = ecr->typing_fellows; walk2 && walk2->data; walk2 =
walk2->next) {
Index: chat_room.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- chat_room.h 20 Jan 2003 18:09:44 -0000 1.10
+++ chat_room.h 24 Jan 2003 13:34:41 -0000 1.11
@@ -30,16 +30,16 @@
typedef struct _eb_chat_room_buddy
{
- gchar alias[255];
- gchar handle[255];
+ char alias[255];
+ char handle[255];
} eb_chat_room_buddy;
typedef struct _eb_chat_room
{
- gboolean connected; /* are we currently in this chat room */
- gchar id[255]; /* who are we? */
+ int connected; /* are we currently in this chat room */
+ char id[255]; /* who are we? */
int service_id;
- gchar room_name[1024]; /* what is this chat room called */
+ char room_name[1024]; /* what is this chat room called */
GtkWidget * window;
GtkWidget * conversation;
GtkWidget * entry;
@@ -47,26 +47,26 @@
GtkWidget *smiley_button;
GtkWidget *smiley_window;
GtkWidget * status_label;
- GList *typing_fellows;
- GList * history;
- GList * hist_pos;
+ LList * typing_fellows;
+ LList * history;
+ LList * hist_pos;
int this_msg_in_history;
- GList * fellows; /* who is in the chat room */
+ LList * fellows; /* who is in the chat room */
eb_local_account * chat_room_account; /* who are we talking as? */
void *protocol_local_chat_room_data; /* For protocol-specific storage */
/* sound stuff */
- gboolean sound_enabled;
- gboolean send_enabled;
- gboolean first_enabled;
- gboolean receive_enabled;
- gboolean first_message;
+ int sound_enabled;
+ int send_enabled;
+ int first_enabled;
+ int receive_enabled;
+ int first_message;
/*
* the folloing data members is for the invite window gui
* since each chat room may spawn an invite window
*/
- gboolean invite_window_is_open;
+ int invite_window_is_open;
GtkWidget * invite_window;
GtkWidget * invite_buddy;
GtkWidget * invite_message;
@@ -79,12 +79,12 @@
#endif
void eb_join_chat_room( eb_chat_room * chat_room );
-void eb_chat_room_show_3rdperson( eb_chat_room * chat_room, gchar * message);
-void eb_chat_room_show_message( eb_chat_room * chat_room, gchar * user, gchar
* message );
-void eb_start_chat_room( gint service, gchar * name );
-void eb_chat_room_buddy_arrive( eb_chat_room * room, gchar * alias, gchar *
handle );
-void eb_chat_room_buddy_leave( eb_chat_room * room, gchar * handle );
-gboolean eb_chat_room_buddy_connected( eb_chat_room * room, gchar * user );
+void eb_chat_room_show_3rdperson( eb_chat_room * chat_room, char * message);
+void eb_chat_room_show_message( eb_chat_room * chat_room, char * user, char *
message );
+void eb_start_chat_room( int service, char * name );
+void eb_chat_room_buddy_arrive( eb_chat_room * room, char * alias, char *
handle );
+void eb_chat_room_buddy_leave( eb_chat_room * room, char * handle );
+int eb_chat_room_buddy_connected( eb_chat_room * room, char * user );
void open_join_chat_window();
char* next_chatroom_name();
void eb_chat_room_display_status (eb_account *remote, char *message);
Index: chat_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_window.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- chat_window.c 24 Jan 2003 10:37:17 -0000 1.32
+++ chat_window.c 24 Jan 2003 13:34:41 -0000 1.33
@@ -86,8 +86,8 @@
static void eb_update_window_title(chat_window * cw, gboolean new_message);
static void eb_update_window_title_to_tab(int tab, gboolean new_message);
-GList *outgoing_message_filters=NULL;
-GList *incoming_message_filters=NULL;
+LList *outgoing_message_filters=NULL;
+LList *incoming_message_filters=NULL;
/*
Recodes source text with iconv() and puts it in translated_text
@@ -215,7 +215,8 @@
static void end_conversation(chat_window* cw)
{
- GList * node;
+ LList * node;
+ GList * node2;
/* cw->window=NULL; */
@@ -237,9 +238,9 @@
RUN_SERVICE(ea)->terminate_chat(ea);
}
- for(node=cw->history; node!=NULL; node=node->next) {
- free(node->data);
- node->data=NULL;
+ for(node2=cw->history; node2!=NULL; node2=node2->next) {
+ free(node2->data);
+ node2->data=NULL;
}
g_list_free(cw->history);
@@ -375,7 +376,7 @@
gchar * temp_message;
struct tm * cur_time;
time_t t;
- GList * filter_walk;
+ LList * filter_walk;
#ifdef HAVE_ICONV_H
/* 'BUF_SIZE*2' e.g. for 'Latin-x' to 'UTF-8',
which is 1-byte to 2-byte recoding */
@@ -458,7 +459,7 @@
if(text==NULL)
return; /* Urgh, no cleanup, but it does it on
strlen(text)==0 too */
- filter_walk=g_list_next(filter_walk);
+ filter_walk=filter_walk->next;
}
eb_debug(DBG_CORE, "Finished outgoing filters\n");
@@ -806,7 +807,7 @@
/*Add Plugin Menus*/
md = GetPref(EB_CHAT_WINDOW_MENU);
if(md) {
- for(list = md->menu_items; list; list =
g_list_next(list) ) {
+ for(list = md->menu_items; list; list = list->next ) {
ecd=ebmContactData_new();
ecd->contact=cw->contact->nick;
mid=(menu_item_data *)list->data;
@@ -965,8 +966,8 @@
static void chat_notebook_switch_callback(GtkNotebook *notebook,
GtkNotebookPage *page, gint page_num, gpointer user_data)
{
/* find the contact for the page we just switched to and turn off their
talking penguin icon */
- GList * l1;
- GList * l2;
+ LList * l1;
+ LList * l2;
struct contact* c;
for(l1 = groups; l1; l1=l1->next ) {
@@ -987,8 +988,8 @@
static chat_window* find_tabbed_chat_window()
{
- GList * l1;
- GList * l2;
+ LList * l1;
+ LList * l2;
struct contact* c;
for(l1 = groups; l1; l1=l1->next ) {
@@ -1004,8 +1005,8 @@
static chat_window *find_tabbed_chat_window_index (int current_page)
{
- GList *l1;
- GList *l2;
+ LList *l1;
+ LList *l2;
struct contact *c;
chat_window *notebook_window = find_tabbed_chat_window ();
@@ -1076,7 +1077,7 @@
gchar buff2[BUF_SIZE];
struct tm * cur_time;
time_t t;
- GList * filter_walk;
+ LList * filter_walk;
gchar * message, *temp_message;
gboolean firstmsg = FALSE; /* init to false so only play if
* first msg is one received rather
@@ -1113,7 +1114,7 @@
if(message==NULL)
return; /* Nothing to clean up (I think...) */
- filter_walk=g_list_next(filter_walk);
+ filter_walk=filter_walk->next;
}
eb_debug(DBG_CORE, "Finished incoming filters\n");
Index: contact.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contact.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- contact.h 16 Jan 2003 13:11:01 -0000 1.4
+++ contact.h 24 Jan 2003 13:34:41 -0000 1.5
@@ -35,7 +35,7 @@
gchar nick[255];
gchar language[3];
trigger_struct trigger;
- GList *accounts;
+ LList *accounts;
gboolean expanded;
gint online;
gboolean send_offline;
Index: contact_parser.y
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contact_parser.y,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- contact_parser.y 20 Jan 2003 12:33:45 -0000 1.6
+++ contact_parser.y 24 Jan 2003 13:34:41 -0000 1.7
@@ -21,7 +21,8 @@
%}
%union {
- GList * vals;
+ LList * vals;
+ GList * gvals;
value_pair * val;
grouplist * grp;
gchar * string;
@@ -37,7 +38,7 @@
%type <cntct> contact
%type <vals> account_list
%type <acnt> account
-%type <vals> value_list
+%type <gvals> value_list
%type <val> key_pair
%%
@@ -46,7 +47,7 @@
;
group_list:
- group group_list { $$ = g_list_prepend( $2, $1 ); }
+ group group_list { $$ = l_list_prepend( $2, $1 ); }
| EPSILON { $$ = 0; }
;
@@ -66,7 +67,7 @@
;
contact_list:
- contact contact_list { $$ = g_list_prepend( $2, $1 ); }
+ contact contact_list { $$ = l_list_prepend( $2, $1 ); }
| EPSILON { $$ = 0; }
;
@@ -126,7 +127,7 @@
;
account_list:
- account account_list{ $$ = g_list_prepend( $2, $1 ); }
+ account account_list{ $$ = l_list_prepend( $2, $1 ); }
| EPSILON { $$ = 0; }
;
Index: contactlist.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/contactlist.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- contactlist.c 16 Jan 2003 13:11:01 -0000 1.3
+++ contactlist.c 24 Jan 2003 13:34:41 -0000 1.4
@@ -23,8 +23,8 @@
* contactlist.c
*/
-#include <glib.h>
+#include "llist.h"
-GList *groups;
-GList *accounts;
+LList *groups;
+LList *accounts;
Index: dialog.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/dialog.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- dialog.c 24 Jan 2003 00:29:13 -0000 1.16
+++ dialog.c 24 Jan 2003 13:34:41 -0000 1.17
@@ -226,7 +226,7 @@
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_window)->vbox),
label, FALSE, FALSE, 5);
- /* Convert the **list to a GList */
+ /* Convert the **list to a LList */
clist = gtk_clist_new(1); /* Only 1 column */
gtk_clist_set_selection_mode(GTK_CLIST(clist), GTK_SELECTION_SINGLE);
gtk_clist_set_column_width (GTK_CLIST(clist), 0, 200);
Index: edit_account_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/edit_account_window.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- edit_account_window.c 24 Jan 2003 11:44:05 -0000 1.10
+++ edit_account_window.c 24 Jan 2003 13:34:41 -0000 1.11
@@ -67,7 +67,7 @@
else
move_account(con, account);
- if (g_list_length(con->accounts) == 0)
+ if (l_list_length(con->accounts) == 0)
remove_contact(con);
update_contact_list();
@@ -80,9 +80,9 @@
return strcasecmp((const char *)a, (const char *)b);
}
-static GList * get_contacts(gchar * group)
+static LList * get_contacts(gchar * group)
{
- GList * node = NULL, *newlist = NULL;
+ LList * node = NULL, *newlist = NULL;
grouplist * g;
g = find_grouplist_by_name(group);
@@ -91,7 +91,7 @@
node = g->members;
while(node) {
- newlist = g_list_insert_sorted(newlist, ((struct contact
*)node->data)->nick, strcasecmp_glist);
+ newlist = l_list_insert_sorted(newlist, ((struct contact
*)node->data)->nick, strcasecmp_glist);
node = node->next;
}
@@ -101,7 +101,7 @@
static void group_changed(GtkEditable *editable, gpointer user_data)
{
- GList * list = get_contacts(COMBO_TEXT(group));
+ GList * list = llist_to_glist(get_contacts(COMBO_TEXT(group)), 1);
gtk_combo_set_popdown_strings(GTK_COMBO(nick), list );
g_list_free(list);
@@ -154,7 +154,7 @@
gtk_widget_show(hbox);
group = gtk_combo_new();
- list = get_groups();
+ list = llist_to_glist(get_groups(), 1);
gtk_combo_set_popdown_strings(GTK_COMBO(group), list);
g_list_free(list);
@@ -174,7 +174,7 @@
gtk_widget_show(hbox);
nick = gtk_combo_new();
- list = get_contacts(COMBO_TEXT(group));
+ list = llist_to_glist(get_contacts(COMBO_TEXT(group)), 1);
gtk_combo_set_popdown_strings(GTK_COMBO(nick), list);
g_list_free(list);
gtk_table_attach(GTK_TABLE(table), nick, 1, 2, 1, 2,
GTK_EXPAND, GTK_EXPAND, 0, 0);
Index: edit_contact_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/edit_contact_window.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- edit_contact_window.c 24 Jan 2003 11:44:05 -0000 1.9
+++ edit_contact_window.c 24 Jan 2003 13:34:41 -0000 1.10
@@ -128,7 +128,7 @@
gtk_widget_show(hbox);
group_list = gtk_combo_new();
- list = get_groups();
+ list = llist_to_glist(get_groups(), 1);
gtk_combo_set_popdown_strings(GTK_COMBO(group_list), list );
g_list_free(list);
gtk_table_attach(GTK_TABLE(table), group_list, 1, 2, 1, 2,
Index: edit_local_accounts.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/edit_local_accounts.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- edit_local_accounts.c 24 Jan 2003 05:25:34 -0000 1.2
+++ edit_local_accounts.c 24 Jan 2003 13:34:41 -0000 1.3
@@ -68,7 +68,7 @@
static void read_contacts()
{
account_row text;
- GList * node;
+ LList * node;
for (node = accounts; node; node = node->next) {
eb_local_account * ela = node->data;
@@ -216,7 +216,7 @@
int id;
gboolean had_accounts=(accounts != NULL);
GList *pairs=NULL;
- GList *existing_accounts = NULL, *new_accounts = NULL, *acc_walk =
NULL, *to_remove = NULL;
+ LList *existing_accounts = NULL, *new_accounts = NULL, *acc_walk =
NULL, *to_remove = NULL;
eb_local_account *ela=NULL;
if (gtk_entry_get_text(GTK_ENTRY(username)) != NULL
@@ -248,7 +248,7 @@
fprintf(fp, "<ACCOUNT %s>\n", service);
value_pair_print_values(config, fp, 1);
fprintf(fp, "</ACCOUNT>\n");
- existing_accounts = g_list_append(existing_accounts,
ela);
+ existing_accounts = l_list_append(existing_accounts,
ela);
} else {
GList * config = NULL;
eb_debug(DBG_CORE, "Adding new account %s service
%s\n", user, service);
@@ -261,7 +261,7 @@
// Is this an account for which a module is not
loaded?
if (ela->service_id==-1)
ela->service_id=id;
- new_accounts = g_list_append(new_accounts, ela);
+ new_accounts = l_list_append(new_accounts, ela);
config =
eb_services[id].sc->write_local_config(ela);
fprintf(fp, "<ACCOUNT %s>\n", service);
value_pair_print_values(config, fp, 1);
@@ -277,25 +277,25 @@
acc_walk = accounts;
if (acc_walk) {
while(acc_walk != NULL && acc_walk->data != NULL) {
- if (!g_list_find(existing_accounts, acc_walk->data)) {
+ if (!l_list_find(existing_accounts, acc_walk->data)) {
eb_local_account *removed = (eb_local_account
*)(acc_walk->data);
/* removed account */
if (removed && removed->connected
&& RUN_SERVICE(removed)->logout != NULL)
RUN_SERVICE(removed)->logout(removed);
- to_remove = g_list_append(to_remove,
acc_walk->data);
+ to_remove = l_list_append(to_remove,
acc_walk->data);
}
acc_walk = acc_walk->next;
}
for (acc_walk = to_remove; acc_walk && acc_walk->data;
acc_walk=acc_walk->next)
- accounts = g_list_remove(accounts,acc_walk->data);
- g_list_free(to_remove);
+ accounts = l_list_remove(accounts,acc_walk->data);
+ l_list_free(to_remove);
}
acc_walk = new_accounts;
if (acc_walk) {
while(acc_walk != NULL) {
- accounts = g_list_append(accounts,acc_walk->data);
+ accounts = l_list_append(accounts,acc_walk->data);
acc_walk = acc_walk->next;
}
}
Index: file_select.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/file_select.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- file_select.c 16 Jan 2003 13:11:01 -0000 1.4
+++ file_select.c 24 Jan 2003 13:34:41 -0000 1.5
@@ -25,8 +25,6 @@
#include <unistd.h>
#include <string.h>
-#include <glib.h>
-#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "file_select.h"
Index: globals.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/globals.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- globals.h 16 Jan 2003 13:11:01 -0000 1.7
+++ globals.h 24 Jan 2003 13:34:41 -0000 1.8
@@ -28,15 +28,16 @@
#define __GLOBALS_H__
#include <glib.h>
+#include "llist.h"
#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
#define extern __declspec(dllimport)
#endif
-extern GList *groups;
-extern GList *accounts;
-extern GList *chat_rooms;
-extern GList *away_messages;
+extern LList *groups;
+extern LList *accounts;
+extern LList *chat_rooms;
+extern LList *away_messages;
extern gint is_away;
Index: gtk_eb_html.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/gtk_eb_html.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- gtk_eb_html.c 23 Jan 2003 23:07:21 -0000 1.8
+++ gtk_eb_html.c 24 Jan 2003 13:34:41 -0000 1.9
@@ -761,7 +761,7 @@
char tmp_sname[64];
GdkPixmap *icon;
GdkBitmap *mask;
- GList * slist=smileys;
+ LList * slist=smileys;
smiley * smile;
parm += strlen("name=");
Index: llist.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/llist.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- llist.c 24 Jan 2003 10:14:30 -0000 1.2
+++ llist.c 24 Jan 2003 13:34:41 -0000 1.3
@@ -54,6 +54,8 @@
LList *n = malloc(sizeof(LList));
n->next = list;
+ n->prev = NULL;
+ n->data = data;
list->prev = n;
return n;
Index: prefs.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/prefs.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- prefs.c 22 Jan 2003 07:26:35 -0000 1.23
+++ prefs.c 24 Jan 2003 13:34:41 -0000 1.24
@@ -1288,7 +1288,7 @@
void reload_service_accounts(int service_id)
{
- GList * node = accounts;
+ LList * node = accounts;
GList * account_pairs;
eb_local_account *oela=NULL, *nela=NULL;
char buff[256], buff2[1024];
Index: service.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/service.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- service.c 24 Jan 2003 05:25:34 -0000 1.8
+++ service.c 24 Jan 2003 13:34:41 -0000 1.9
@@ -143,7 +143,7 @@
{
/* Are we idle? If so, not anymore */
if (is_idle > 0) {
- GList * node;
+ LList * node;
is_idle = 0;
for (node = accounts; node; node = node->next ) {
if (((eb_local_account *)(node->data))->connected
@@ -160,7 +160,7 @@
static int report_idle(void * data)
{
- GList * node;
+ LList * node;
if (!is_idle)
return FALSE;
@@ -200,7 +200,7 @@
if ((idle_time >= 600) && sendIdleTime) {
if (is_idle == 0) {
- GList * node;
+ LList * node;
idle_reporter = eb_timeout_add(60000, report_idle,
NULL);
for (node = accounts; node; node = node->next ) {
if (((eb_local_account *)node->data)->connected
Index: service.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/service.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- service.h 24 Jan 2003 05:25:34 -0000 1.10
+++ service.h 24 Jan 2003 13:34:41 -0000 1.11
@@ -196,9 +196,9 @@
so you can just return a static variable if you want */
- /* This requests a GList of protocol-specific smilies (type
protocol_smiley, see
+ /* This requests a LList of protocol-specific smilies (type
protocol_smiley, see
smileys.h */
- GList * (*get_smileys)(void);
+ LList * (*get_smileys)(void);
/* This returns the color associated with this protocol (in HTML form,
so for example AIM is "#000088" */
Index: smileys.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/smileys.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- smileys.c 24 Jan 2003 00:29:13 -0000 1.11
+++ smileys.c 24 Jan 2003 13:34:41 -0000 1.12
@@ -88,13 +88,13 @@
NULL
};
-GList *smileys=NULL;
-static GList *default_smileys = NULL;
+LList *smileys=NULL;
+static LList *default_smileys = NULL;
-static GList *_eb_smileys=NULL;
+static LList *_eb_smileys=NULL;
-/* someone figure out how to do this with GList * const */
-GList * eb_smileys(void)
+/* someone figure out how to do this with LList * const */
+LList * eb_smileys(void)
{
return _eb_smileys;
}
@@ -194,12 +194,12 @@
default_smileys=add_protocol_smiley(default_smileys, ":'(", "cry");
}
-gchar * eb_smilify(gchar * text, GList * protocol_smileys)
+gchar * eb_smilify(gchar * text, LList * protocol_smileys)
{
int ipos=0;
int found;
int i;
- GList * l=protocol_smileys;
+ LList * l=protocol_smileys;
GString * newstr;
char * result;
@@ -266,39 +266,39 @@
return result;
}
-GList * eb_default_smileys(void)
+LList * eb_default_smileys(void)
{
return default_smileys;
}
-GList * add_protocol_smiley(GList * list, char * text, char * name)
+LList * add_protocol_smiley(LList * list, char * text, char * name)
{
protocol_smiley * psmile;
psmile=g_new0(protocol_smiley, 1);
strcpy(psmile->text, text);
strcpy(psmile->name, name);
- return g_list_append(list, psmile);
+ return l_list_append(list, psmile);
}
-GList * add_smiley(GList * list, char * name, gchar ** data)
+LList * add_smiley(LList * list, char * name, gchar ** data)
{
smiley * psmile;
psmile=g_new0(smiley, 1);
strcpy(psmile->name, name);
psmile->pixmap=data;
- return g_list_append(list, psmile);
+ return l_list_append(list, psmile);
}
smiley * get_smiley_by_name(char * name) {
smiley * psmile;
- GList * l = smileys;
+ LList * l = smileys;
while(l != NULL) {
psmile = (smiley *)(l->data);
if(!strcmp(psmile->name,name))
return psmile;
- l=g_list_next(l);
+ l=l->next;
}
return NULL;
}
@@ -337,7 +337,7 @@
void show_smileys_cb (smiley_callback_data *data) {
eb_local_account *account;
- GList *smileys = NULL;
+ LList *smileys = NULL;
protocol_smiley * msmiley = NULL;
GtkWidget * smileys_table = NULL;
GtkWidget * button = NULL;
@@ -345,7 +345,7 @@
GdkPixmap *icon;
GdkBitmap *mask;
GtkWidget *smiley_window;
- GList *done = NULL;
+ LList *done = NULL;
int len = 0, real_len = 0, x=-1, y=0;
int win_w=0, win_h=0, w, h;
int win_x, win_y;
@@ -374,14 +374,14 @@
smileys = RUN_SERVICE(account)->get_smileys();
else
return;
- len = g_list_length(smileys);
+ len = l_list_length(smileys);
smileys_table = gtk_table_new(5,len/5 +((len%5==0)?1:2),TRUE);
- for(;smileys;smileys=g_list_next(smileys)) {
- GList * l;
+ for(;smileys;smileys=smileys->next) {
+ LList * l;
gboolean already_done = FALSE;
smiley * dsmile = NULL;
msmiley = (smileys->data);
- for(l=done; l; l=g_list_next(l)) {
+ for(l=done; l; l=l->next) {
if(!strcmp((char*)l->data, msmiley->name)) {
already_done = TRUE;
break;
@@ -391,7 +391,7 @@
if(already_done)
continue;
- done = g_list_append(done, msmiley->name);
+ done = l_list_append(done, msmiley->name);
dsmile = get_smiley_by_name(msmiley->name);
if(dsmile != NULL) {
@@ -431,7 +431,7 @@
}
}
- g_list_free(done);
+ l_list_free(done);
done = NULL;
gtk_table_resize(GTK_TABLE(smileys_table), 5,real_len/5
+((real_len%5==0)?0:1));
Index: smileys.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/smileys.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- smileys.h 21 Jan 2003 05:31:19 -0000 1.4
+++ smileys.h 24 Jan 2003 13:34:41 -0000 1.5
@@ -1,6 +1,7 @@
#ifndef __SMILEYS_H_
#define __SMILEYS_H_
+#include "llist.h"
#include "chat_window.h"
#include "chat_room.h"
@@ -22,9 +23,9 @@
typedef struct smiley_struct smiley;
#if defined(__MINGW32__) && defined(__IN_PLUGIN__)
-__declspec(dllimport) GList *smileys;
+__declspec(dllimport) LList *smileys;
#else
-extern GList *smileys;
+extern LList *smileys;
#endif
#ifdef __cplusplus
@@ -32,16 +33,16 @@
#endif
void init_smileys(void);
-gchar * eb_smilify(gchar * text, GList * protocol_smileys);
+gchar * eb_smilify(gchar * text, LList * protocol_smileys);
-GList * eb_default_smileys(void);
+LList * eb_default_smileys(void);
-GList * add_smiley(GList * list, char * name, gchar ** data);
+LList * add_smiley(LList * list, char * name, gchar ** data);
-GList * add_protocol_smiley(GList * list, char * text, char * name);
+LList * add_protocol_smiley(LList * list, char * text, char * name);
-/* someone figure out how to do this with GList * const */
-GList * eb_smileys(void);
+/* someone figure out how to do this with LList * const */
+LList * eb_smileys(void);
smiley * get_smiley_by_name(char * name);
Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- status.c 24 Jan 2003 05:25:34 -0000 1.32
+++ status.c 24 Jan 2003 13:34:41 -0000 1.33
@@ -96,7 +96,7 @@
GdkEvent *event,
gpointer data )
{
- GList * node = accounts;
+ LList * node = accounts;
gchar *userrc = NULL;
while(node) {
if(node->data && ((eb_local_account*)(node->data))->connected)
@@ -292,7 +292,7 @@
static GtkWidget *make_info_menu(struct contact *c, int *nb)
{
- GList *iterator;
+ LList *iterator;
GtkWidget *InfoMenu = gtk_menu_new();
GtkWidget *button;
char *buff = NULL;
@@ -389,7 +389,7 @@
md = GetPref(EB_CONTACT_MENU);
if(md) {
- for(list = md->menu_items; list; list = g_list_next(list) ) {
+ for(list = md->menu_items; list; list = list->next ) {
ecd=ebmContactData_new();
ecd->contact=conn->nick;
mid=(menu_item_data *)list->data;
@@ -550,7 +550,7 @@
void eb_sign_on_all()
{
- GList *node = accounts ;
+ LList *node = accounts ;
while(node) {
eb_local_account *ac = (eb_local_account*)(node->data);
if (!ac->connected)
@@ -561,7 +561,7 @@
void eb_sign_off_all()
{
- GList *node = accounts ;
+ LList *node = accounts ;
while(node) {
eb_local_account *ac = (eb_local_account*)(node->data);
if (ac && ac->connected)
@@ -574,7 +574,7 @@
static gint get_contact_position( struct contact * ec)
{
gint i=0;
- GList *l;
+ LList *l;
for (l = ec->group->members; l && (l->data != ec); l=l->next) {
struct contact * contact = l->data;
@@ -587,7 +587,7 @@
static gint get_account_position( eb_account * ea)
{
gint i=0;
- GList *l;
+ LList *l;
for (l = ea->account_contact->accounts; l && (l->data != ea);
l=l->next) {
eb_account * account = l->data;
@@ -600,9 +600,9 @@
/* General purpose update Contact List */
void update_contact_list ()
{
- GList * grps;
- GList * contacts;
- GList * accounts;
+ LList * grps;
+ LList * contacts;
+ LList * accounts;
grouplist * grp;
struct contact * con;
@@ -680,7 +680,7 @@
it from the buddy list. */
void add_contact_and_accounts(struct contact * c)
{
- GList *l;
+ LList *l;
for (l = c->accounts; l; l = l->next) {
eb_account * ea = l->data;
if ((status_show == 0) || (status_show == 1) || ea->online) {
@@ -917,7 +917,7 @@
/* hides a group on the buddy list */
void remove_group_line( grouplist * eg)
{
- GList * contacts;
+ LList * contacts;
if (!eg->list_item)
return;
@@ -940,7 +940,7 @@
process */
void remove_contact_line( struct contact * ec)
{
- GList * accounts;
+ LList * accounts;
if (!ec->list_item)
return;
@@ -986,7 +986,7 @@
(removes the logoff icon and hides the contact if necessary) */
static gint hide_contact(struct contact * ec)
{
- GList * l;
+ LList * l;
if (ec->icon_handler == -1)
return FALSE;
@@ -1038,7 +1038,7 @@
GdkPixmap * pm;
GdkBitmap * bm;
eb_account * ea = NULL;
- GList * l;
+ LList * l;
int width, height;
int width2, height2;
int width3, height3;
@@ -1390,7 +1390,7 @@
/* Generates the contact list tree (should only be called once) */
static GtkWidget* MakeContactList()
{
- GList * l1;
+ LList * l1;
contact_window = gtk_scrolled_window_new(NULL, NULL);
contact_list = gtk_tree_new();
@@ -1516,7 +1516,7 @@
md = GetPref(EB_PROFILE_MENU);
if(md) {
- for(list = md->menu_items; list; list = g_list_next(list) ) {
+ for(list = md->menu_items; list; list = list->next ) {
mid=(menu_item_data *)list->data;
label = gtk_menu_item_new_with_label(mid->label);
gtk_menu_append(GTK_MENU(profile_menu), label);
@@ -1548,7 +1548,7 @@
md = GetPref(EB_IMPORT_MENU);
if(md) {
- for(list = md->menu_items; list; list = g_list_next(list) ) {
+ for(list = md->menu_items; list; list = list->next ) {
mid=(menu_item_data *)list->data;
eb_debug(DBG_CORE, "adding import item: %s\n",
mid->label);
label = gtk_menu_item_new_with_label(mid->label);
@@ -1568,12 +1568,12 @@
GtkWidget * set_status_submenuitem = v_set_status_submenuitem;
GtkWidget *label;
GtkWidget * account_menu = gtk_menu_new();
- GList *list=NULL;
+ LList *list=NULL;
label = gtk_tearoff_menu_item_new();
gtk_menu_append(GTK_MENU(account_menu), label);
gtk_widget_show(label);
- for(list = accounts; list; list = g_list_next(list) ) {
+ for(list = accounts; list; list = list->next ) {
label = MakeStatusMenu(list->data);
((eb_local_account*)(list->data))->status_button = label;
gtk_menu_append(GTK_MENU(account_menu), label);
@@ -1765,7 +1765,7 @@
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
gtk_widget_show(hbox);
- eb_debug(DBG_CORE, "%d\n", g_list_length(accounts));
+ eb_debug(DBG_CORE, "%d\n", l_list_length(accounts));
MakeContactList();
gtk_widget_show(contact_window);
gtk_box_pack_start(GTK_BOX(vbox),contact_window,TRUE,TRUE,0);
Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- util.c 24 Jan 2003 08:01:50 -0000 1.25
+++ util.c 24 Jan 2003 13:34:41 -0000 1.26
@@ -150,7 +150,7 @@
* if it has anything else, then it can't be a domain name
*/
-static gint is_valid_domain( gchar * name )
+static int is_valid_domain( char * name )
{
int i;
int dot_count = 0;
@@ -181,7 +181,7 @@
char * escape_string(char * input)
{
GString * temp_result = g_string_sized_new(2048);
- gchar * result;
+ char * result;
int ipos = 0;
for(ipos=0;input[ipos];ipos++) {
if(input[ipos] == '\n')
@@ -202,7 +202,7 @@
}
char * unescape_string(char * input)
{
- gchar * result = g_malloc0(strlen(input)+1);
+ char * result = g_malloc0(strlen(input)+1);
int ipos=0, opos=0;
while(input[ipos]) {
char c = input[ipos++];
@@ -228,7 +228,7 @@
}
/* this function will be used to determine if a given token is a link */
-static gint is_link( gchar * token )
+static int is_link( char * token )
{
int i;
int len = strlen(token);
@@ -383,11 +383,11 @@
g_string_free(g2,TRUE);
}
-gchar * linkify( gchar * input )
+char * linkify( char * input )
{
int i = 0;
int len = strlen(input);
- gchar * result;
+ char * result;
GString * temp_result;
GString * temp = NULL;
@@ -412,10 +412,10 @@
return result;
}
-gchar * convert_eol (gchar * text)
+char * convert_eol (char * text)
{
- gchar * temp;
- gchar **data=NULL;
+ char * temp;
+ char **data=NULL;
int i;
if (strstr (text, "\r\n") != NULL)
@@ -436,7 +436,7 @@
*/
eb_local_account * find_local_account_for_remote( eb_account *remote, gboolean
online )
{
- static GList * node = NULL;
+ static LList * node = NULL;
static eb_account *last_remote=NULL;
/* If this is a normal call, start at the top and give the first,
otherwise continue where we left off */
@@ -468,9 +468,9 @@
}
eb_local_account * find_suitable_local_account( eb_local_account * first,
- gint second )
+ int second )
{
- GList * node;
+ LList * node;
GList * states;
/*The last state in the list of states will be the OFFLINE state*
@@ -508,7 +508,7 @@
eb_account * can_offline_message( struct contact * con )
{
- GList * node;
+ LList * node;
for(node = con->accounts; node; node=node->next) {
eb_account * ea = (eb_account*)node->data;
@@ -521,7 +521,7 @@
eb_account * find_suitable_remote_account( eb_account * first,
struct contact * rest )
{
- GList * node;
+ LList * node;
eb_account * possibility = NULL;
if( first && eb_services[first->service_id].sc->query_connected(first) )
@@ -543,21 +543,21 @@
eb_account * find_suitable_file_transfer_account( eb_account * first,
struct contact * rest )
{
- GList * node;
+ LList * node;
eb_account * possibility = NULL;
if ( first == NULL )
return NULL;
if( first && eb_services[first->service_id].sc->query_connected(first)
- && eb_services[first->service_id].file_transfer )
+ && eb_services[first->service_id].file_transfer )
return first;
for(node = rest->accounts; node; node=node->next) {
eb_account * ea = (eb_account*)node->data;
if( eb_services[ea->service_id].sc->query_connected(ea)
- && eb_services[first->service_id].file_transfer ) {
+ && eb_services[first->service_id].file_transfer
) {
if(ea->service_id == rest->default_chatb )
return ea;
else
@@ -567,9 +567,9 @@
return possibility;
}
-eb_chat_room * find_chat_room_by_id( gchar * id )
+eb_chat_room * find_chat_room_by_id( char * id )
{
- GList * node = chat_rooms;
+ LList * node = chat_rooms;
for( node= chat_rooms; node; node=node->next) {
eb_chat_room * ecr = node->data;
eb_debug(DBG_CORE, "Comparing %s to %s\n", id, ecr->id );
@@ -580,9 +580,9 @@
}
-eb_chat_room * find_chat_room_by_name( gchar * name, gint service_id )
+eb_chat_room * find_chat_room_by_name( char * name, int service_id )
{
- GList * node = chat_rooms;
+ LList * node = chat_rooms;
for( node= chat_rooms; node && node->data; node=node->next) {
eb_chat_room * ecr = node->data;
if(!strcmp(name, ecr->room_name) &&
(ecr->chat_room_account->service_id == service_id) )
@@ -592,22 +592,22 @@
}
-GList * find_chatrooms_with_remote_account(eb_account *remote)
+LList * find_chatrooms_with_remote_account(eb_account *remote)
{
- GList * node = NULL;
- GList * result = NULL;
+ LList * node = NULL;
+ LList * result = NULL;
for (node = chat_rooms; node && node->data; node = node->next) {
eb_chat_room *ecr = node->data;
if (ecr && remote->service_id == ecr->service_id) {
- GList *others = NULL;
- gboolean found = FALSE;
+ LList *others = NULL;
+ int found = FALSE;
for (others = ecr->fellows;
others && others->data && !found;
others = others->next) {
eb_chat_room_buddy *ecrb = others->data;
if(!strcmp(remote->handle, ecrb->handle)) {
found = TRUE;
- result = g_list_append(result, ecr);
+ result = l_list_append(result, ecr);
eb_debug(DBG_CORE, "Found %s in
%s\n",remote->handle, ecr->room_name);
}
}
@@ -616,9 +616,9 @@
return result;
}
-grouplist * find_grouplist_by_name(gchar * name)
+grouplist * find_grouplist_by_name(char * name)
{
- GList * l1;
+ LList * l1;
if (name == NULL)
return NULL;
@@ -630,10 +630,10 @@
return NULL;
}
-grouplist * find_grouplist_by_nick(gchar * nick)
+grouplist * find_grouplist_by_nick(char * nick)
{
- GList * l1;
- GList * l2;
+ LList * l1;
+ LList * l2;
if (nick == NULL)
return NULL;
@@ -648,11 +648,11 @@
}
-struct contact * find_contact_by_handle( gchar * handle )
+struct contact * find_contact_by_handle( char * handle )
{
- GList * l1;
- GList * l2;
- GList * l3;
+ LList * l1;
+ LList * l2;
+ LList * l3;
if (handle == NULL)
return NULL;
@@ -669,10 +669,10 @@
return NULL;
}
-struct contact * find_contact_by_nick( gchar * nick )
+struct contact * find_contact_by_nick( char * nick )
{
- GList * l1;
- GList * l2;
+ LList * l1;
+ LList * l2;
if (nick == NULL)
return NULL;
@@ -686,9 +686,9 @@
return NULL;
}
-struct contact * find_contact_in_group_by_nick( gchar * nick , grouplist *gl )
+struct contact * find_contact_in_group_by_nick( char * nick , grouplist *gl )
{
- GList * l;
+ LList * l;
if (nick == NULL || gl == NULL)
return NULL;
@@ -725,11 +725,11 @@
return buf;
}
-void refresh_service_contacts(gint type)
+void refresh_service_contacts(int type)
{
- GList * l1;
- GList * l2;
- GList * l3;
+ LList * l1;
+ LList * l2;
+ LList * l3;
GList * config=NULL;
struct contact *con=NULL;
@@ -763,11 +763,11 @@
return;
}
-eb_account * find_account_by_handle( gchar * handle, gint type )
+eb_account * find_account_by_handle( char * handle, int type )
{
- GList * l1;
- GList * l2;
- GList * l3;
+ LList * l1;
+ LList * l2;
+ LList * l3;
if (handle == NULL)
return NULL;
@@ -788,9 +788,9 @@
return NULL;
}
-eb_local_account * find_local_account_by_handle( gchar * handle, gint type)
+eb_local_account * find_local_account_by_handle( char * handle, int type)
{
- GList * l1;
+ LList * l1;
if (handle == NULL)
return NULL;
@@ -803,7 +803,7 @@
return NULL;
}
-void strip_html(gchar * text)
+void strip_html(char * text)
{
int i, j;
int visible = 1;
@@ -878,12 +878,12 @@
buddy_logoff(a);
remove_account_line(a);
- c->accounts = g_list_remove(c->accounts, a);
+ c->accounts = l_list_remove(c->accounts, a);
RUN_SERVICE(a)->del_user(a);
g_free(a);
- if (!g_list_length(c->accounts)) {
+ if (!l_list_length(c->accounts)) {
remove_contact(c);
return 0; /* so if coming from remove_contact
don't try again to remove_contact_line()
@@ -899,23 +899,23 @@
if(c->chatwindow)
gtk_widget_destroy(c->chatwindow->window);
- while(c->accounts && g_list_length(c->accounts))
+ while(c->accounts && l_list_length(c->accounts))
if (!remove_account(c->accounts->data))
return;
remove_contact_line(c);
- g->members = g_list_remove(g->members, c);
+ g->members = l_list_remove(g->members, c);
g_free(c);
}
void remove_group( grouplist * g )
{
- GList *node = NULL;
+ LList *node = NULL;
while(g->members)
remove_contact(g->members->data);
remove_group_line(g);
- groups = g_list_remove(groups,g);
+ groups = l_list_remove(groups,g);
for( node = accounts; node; node = node->next ) {
eb_local_account * ela = (eb_local_account *)(node->data);
@@ -928,15 +928,15 @@
g_free(g);
}
-void add_group( gchar * name )
+void add_group( char * name )
{
- GList *node = NULL;
+ LList *node = NULL;
grouplist g, *eg;
strncpy(g.name, name,255);
g.members = NULL;
g.list_item = NULL;
- groups = g_list_append( groups, eg = g_memdup(&g, sizeof(grouplist)));
+ groups = l_list_append( groups, eg = g_memdup(&g, sizeof(grouplist)));
add_group_line(eg);
for( node = accounts; node; node = node->next ) {
@@ -951,9 +951,9 @@
write_contact_list();
}
-void rename_group( grouplist *current_group, gchar * new_name )
+void rename_group( grouplist *current_group, char * new_name )
{
- GList *node = NULL;
+ LList *node = NULL;
char oldname[NAME_MAX];
strcpy (oldname, current_group->name);
@@ -974,13 +974,13 @@
}
-static gint contact_cmp(gconstpointer a, gconstpointer b)
+static int contact_cmp(const void * a, const void * b)
{
const struct contact *ca=a, *cb=b;
return strcasecmp(ca->nick, cb->nick);
}
-struct contact * add_new_contact( gchar * group, gchar * con, gint type )
+struct contact * add_new_contact( char * group, char * con, int type )
{
grouplist * g = find_grouplist_by_name( group);
struct contact * c = g_new0( struct contact, 1);
@@ -991,13 +991,13 @@
c->default_chatb = c->default_filetransb = type;
if(g) {
- g->members = g_list_insert_sorted(g->members, c, contact_cmp);
+ g->members = l_list_insert_sorted(g->members, c, contact_cmp);
c->group = g;
}
return c;
}
-static void add_account_verbose( gchar * contact, eb_account * account,
gboolean verbosity )
+static void add_account_verbose( char * contact, eb_account * account,
gboolean verbosity )
{
struct contact * c = find_contact_by_nick( contact );
eb_account * ea = find_account_by_handle(account->handle,
account->service_id);
@@ -1009,13 +1009,13 @@
if(!strcasecmp(ea->account_contact->nick, _("Unknown"))) {
struct contact * c2 = ea->account_contact;
remove_account(ea);
- if(g_list_length(c2->accounts) == 0)
+ if(l_list_length(c2->accounts) == 0)
remove_contact(c2);
} else {
char buff[2048];
g_snprintf(buff, 2048, _("The account already exists on
your\ncontact list at the following location\nGroup: %s\nContact: %s\nPlease
delete this account before\nadding it elsewhere."),
ea->account_contact->group->name, ea->account_contact->nick );
- if( c && g_list_length(c->accounts) == 0)
+ if( c && l_list_length(c->accounts) == 0)
remove_contact(c);
if(verbosity)
do_error_dialog(buff, _("Error: account
exists"));
@@ -1023,7 +1023,7 @@
}
}
if (c) {
- c->accounts = g_list_append( c->accounts, account );
+ c->accounts = l_list_append( c->accounts, account );
account->account_contact = c;
RUN_SERVICE(account)->add_user(account);
@@ -1035,16 +1035,16 @@
add_unknown(account);
}
-void add_account_silent ( gchar * contact, eb_account * account )
+void add_account_silent ( char * contact, eb_account * account )
{
add_account_verbose(contact, account, FALSE);
}
-void add_account( gchar * contact, eb_account * account )
+void add_account( char * contact, eb_account * account )
{
add_account_verbose(contact, account, TRUE);
}
-static void add_contact( gchar * group, struct contact * user )
+static void add_contact( char * group, struct contact * user )
{
grouplist * grp = find_grouplist_by_name(group);
@@ -1056,7 +1056,7 @@
printf("Error adding group :(\n");
return;
}
- grp->members = g_list_insert_sorted(grp->members, user, contact_cmp);
+ grp->members = l_list_insert_sorted(grp->members, user, contact_cmp);
user->group = grp;
}
@@ -1065,7 +1065,7 @@
struct contact * con = g_new0(struct contact, 1);
strncpy(con->nick, ea->handle, 255);
- con->accounts = g_list_append( con->accounts, ea );
+ con->accounts = l_list_append( con->accounts, ea );
con->default_chatb = ea->service_id;
con->default_filetransb = ea->service_id;
ea->account_contact = con;
@@ -1076,7 +1076,7 @@
write_contact_list();
}
-void add_unknown_with_name( eb_account * ea, gchar * name )
+void add_unknown_with_name( eb_account * ea, char * name )
{
add_unknown(ea);
@@ -1088,7 +1088,7 @@
write_contact_list();
}
-static void handle_group_change(eb_account *ea, gchar *og, gchar *ng)
+static void handle_group_change(eb_account *ea, char *og, char *ng)
{
/* if the groups are same, do nothing */
if(!strcasecmp(ng, og))
@@ -1115,18 +1115,18 @@
void move_account (struct contact * con, eb_account *ea)
{
struct contact *c = ea->account_contact;
- gchar * new_group = con->group->name;
- gchar *old_group = c->group->name;
+ char * new_group = con->group->name;
+ char *old_group = c->group->name;
handle_group_change(ea, old_group, new_group);
- c->accounts = g_list_remove(c->accounts, ea);
+ c->accounts = l_list_remove(c->accounts, ea);
remove_account_line(ea);
- if(g_list_length(c->accounts) == 0)
+ if(l_list_length(c->accounts) == 0)
remove_contact(c);
else {
- GList *l;
+ LList *l;
c->online = 0;
for(l=c->accounts; l; l=l->next)
if(((eb_account *)l->data)->online)
@@ -1137,7 +1137,7 @@
add_contact_and_accounts(c);
}
- con->accounts = g_list_append(con->accounts, ea);
+ con->accounts = l_list_append(con->accounts, ea);
ea->account_contact = con;
if(ea->online)
@@ -1146,13 +1146,13 @@
add_contact_and_accounts(con);
}
-void move_contact (gchar * group, struct contact * c)
+void move_contact (char * group, struct contact * c)
{
grouplist * g = c->group;
struct contact *con;
- GList *l = c->accounts;
+ LList *l = c->accounts;
- g->members = g_list_remove(g->members, c);
+ g->members = l_list_remove(g->members, c);
remove_contact_line(c);
g = find_grouplist_by_name(group);
@@ -1177,13 +1177,13 @@
eb_account *ea = l->data;
ea->account_contact = con;
- con->accounts = g_list_append(con->accounts, ea);
+ con->accounts = l_list_append(con->accounts, ea);
l = l->next;
}
- g_list_free(c->accounts);
+ l_list_free(c->accounts);
add_contact_and_accounts(con);
} else {
- g->members = g_list_insert_sorted(g->members, c, contact_cmp);
+ g->members = l_list_insert_sorted(g->members, c, contact_cmp);
c->group = g;
add_contact_and_accounts(c);
}
@@ -1226,7 +1226,7 @@
-void make_safe_filename(gchar *buff, gchar *name, gchar *group) {
+void make_safe_filename(char *buff, char *name, char *group) {
/* i'm pretty sure the only illegal character is '/', but maybe
* there are others i'm forgetting */
@@ -1257,17 +1257,17 @@
}
-gint gtk_notebook_get_number_pages(GtkNotebook *notebook)
+int gtk_notebook_get_number_pages(GtkNotebook *notebook)
{
- gint i = 0;
-
- for (i = 0; gtk_notebook_get_nth_page(notebook, i) != NULL; i++) {}
+ int i;
+ for (i=0; gtk_notebook_get_nth_page(notebook, i); i++)
+ ;
return i;
}
/* looks for lockfile, if found, returns the pid in the file */
/* If not, creates the file, writes our pid, and returns -1 */
-pid_t create_lock_file(gchar* fname)
+pid_t create_lock_file(char* fname)
{
pid_t ourpid = -1;
struct stat sbuff;
@@ -1323,7 +1323,7 @@
return ourpid;
}
-void delete_lock_file(gchar* fname)
+void delete_lock_file(char* fname)
{
#ifndef __MINGW32__
unlink(fname);
@@ -1367,14 +1367,14 @@
* with this information
*/
-GList * get_groups()
+LList * get_groups()
{
- GList * node = NULL;
- GList * newlist = NULL;
+ LList * node = NULL;
+ LList * newlist = NULL;
node = groups;
while(node) {
- newlist=g_list_append(newlist, ((grouplist *)node->data)->name);
+ newlist=l_list_append(newlist, ((grouplist *)node->data)->name);
node=node->next;
}
@@ -1404,7 +1404,7 @@
fclose(fp);
}
-gint contact_mgmt_flush(eb_local_account *ela)
+int contact_mgmt_flush(eb_local_account *ela)
{
FILE *queue, *temp;
char buff[NAME_MAX], queue_name[NAME_MAX], temp_name[NAME_MAX];
@@ -1466,7 +1466,7 @@
automatically re-added our deleted
account */
if (ea_recreated) {
- if
(g_list_length(ea->account_contact->accounts) == 1)
+ if
(l_list_length(ea->account_contact->accounts) == 1)
remove_contact(ea->account_contact);
else
remove_account(ea);
@@ -1488,7 +1488,7 @@
void rename_nick_log(char *oldgroup, char *oldnick, char *newgroup, char
*newnick)
{
- gchar oldnicklog[255], newnicklog[255], buff[255];
+ char oldnicklog[255], newnicklog[255], buff[255];
FILE *test = NULL;
make_safe_filename(buff, oldnick, oldgroup);
strcpy(oldnicklog, buff);
@@ -1498,7 +1498,7 @@
if ((test = fopen(newnicklog,"r")) != NULL &&
strcmp(oldnicklog,newnicklog)) {
FILE *oldfile = fopen(oldnicklog,"r");
- gchar read_buffer[4096];
+ char read_buffer[4096];
fclose(test);
test = fopen(newnicklog,"a");
@@ -1518,5 +1518,33 @@
rename(oldnicklog, newnicklog);
eb_debug(DBG_CORE,"Renamed log from %s to %s\n", oldnicklog,
newnicklog);
}
+}
+
+GList * llist_to_glist(LList * ll, int free_old)
+{
+ GList * g = NULL;
+ LList * l = ll;
+
+ for(; l; l=l->next)
+ g = g_list_append(g, l->data);
+
+ if(free_old)
+ l_list_free(ll);
+
+ return g;
+}
+
+LList * glist_to_llist(GList * gl, int free_old)
+{
+ LList * l = NULL;
+ GList * g = gl;
+
+ for(; g; g=g->next)
+ l = l_list_append(l, g->data);
+
+ if(free_old)
+ g_list_free(gl);
+
+ return l;
}
Index: util.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- util.h 24 Jan 2003 08:01:50 -0000 1.14
+++ util.h 24 Jan 2003 13:34:41 -0000 1.15
@@ -39,6 +39,9 @@
#include "contact.h"
+#if !defined(FALSE) && !defined(TRUE)
+enum {FALSE, TRUE};
+#endif
/* forward declarations */
struct _eb_chat_room;
@@ -76,14 +79,14 @@
extern "C" {
#endif
-gchar * convert_eol (gchar * input);
-gchar * linkify( gchar * input );
+char * convert_eol (char * input);
+char * linkify( char * input );
char * escape_string(char * input);
char * unescape_string(char * input);
eb_local_account * find_suitable_local_account( eb_local_account * first,
- gint second );
+ int second );
eb_local_account * find_local_account_for_remote( eb_account *remote, gboolean
online );
eb_account * can_offline_message( struct contact * con );
@@ -91,42 +94,46 @@
struct contact * rest );
eb_account * find_suitable_file_transfer_account( eb_account * first,
struct contact * rest );
-struct _eb_chat_room * find_chat_room_by_id( gchar * id );
-struct _eb_chat_room * find_chat_room_by_name( gchar * name, gint service_id );
-GList * find_chatrooms_with_remote_account(eb_account *remote);
-grouplist * find_grouplist_by_nick(gchar * nick);
-grouplist * find_grouplist_by_name(gchar * name);
-struct contact * find_contact_by_handle( gchar * handle );
-struct contact * find_contact_by_nick( gchar * nick);
-struct contact * find_contact_in_group_by_nick( gchar * nick, grouplist *gl );
-void refresh_service_contacts(gint type);
-eb_account * find_account_by_handle( gchar * handle, gint type );
-eb_local_account * find_local_account_by_handle( gchar * handle, gint type );
-void strip_html(gchar * text);
+struct _eb_chat_room * find_chat_room_by_id( char * id );
+struct _eb_chat_room * find_chat_room_by_name( char * name, int service_id );
+LList * find_chatrooms_with_remote_account(eb_account *remote);
+grouplist * find_grouplist_by_nick(char * nick);
+grouplist * find_grouplist_by_name(char * name);
+struct contact * find_contact_by_handle( char * handle );
+struct contact * find_contact_by_nick( char * nick);
+struct contact * find_contact_in_group_by_nick( char * nick, grouplist *gl );
+void refresh_service_contacts(int type);
+eb_account * find_account_by_handle( char * handle, int type );
+eb_local_account * find_local_account_by_handle( char * handle, int type );
+void strip_html(char * text);
int remove_account( eb_account * a );
void remove_contact( struct contact * c );
void rename_contact( struct contact * c, char *newname);
void remove_group( grouplist * g );
-void add_group( gchar * name );
-void rename_group( grouplist *g, gchar * new_name );
-struct contact * add_new_contact( gchar * group, gchar * con, gint type );
+void add_group( char * name );
+void rename_group( grouplist *g, char * new_name );
+struct contact * add_new_contact( char * group, char * con, int type );
void add_unknown( eb_account * ea );
-void add_unknown_with_name( eb_account * ea, gchar * name );
-void add_account( gchar * contact, eb_account * account );
-void add_account_silent( gchar * contact, eb_account * account );
+void add_unknown_with_name( eb_account * ea, char * name );
+void add_account( char * contact, eb_account * account );
+void add_account_silent( char * contact, eb_account * account );
void move_account( struct contact * c, eb_account *account );
-void move_contact( gchar * group, struct contact * c);
+void move_contact( char * group, struct contact * c);
void invite_dialog( eb_local_account * ela, char * user, char * chat_room,
void * id );
-void make_safe_filename(gchar *buff, gchar *name, gchar *group);
+void make_safe_filename(char *buff, char *name, char *group);
-pid_t create_lock_file(gchar* fname);
-void delete_lock_file(gchar* fname);
+pid_t create_lock_file(char* fname);
+void delete_lock_file(char* fname);
void eb_generic_menu_function(void *add_button, gpointer userdata);
-GList * get_groups();
+LList * get_groups();
void contact_mgmt_queue_add(eb_account *ea, int action, char *group);
-gint contact_mgmt_flush(eb_local_account *ela);
+int contact_mgmt_flush(eb_local_account *ela);
void rename_nick_log(char *oldgroup, char *oldnick, char *newgroup, char
*newnick);
+
+GList * llist_to_glist(LList * l, int free_old);
+/* free_old will free the old list after converting */
+LList * glist_to_llist(GList * g, int free_old);
#ifdef __cplusplus
} /* extern "C" */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src account.c,1.13,1.14 account.h,1.8,1.9 account_parser.y,1.3,1.4 add_contact_window.c,1.15,1.16 add_contact_window.h,1.7,1.8 away_window.c,1.11,1.12 chat_room.c,1.37,1.38 chat_room.h,1.10,1.11 chat_window.c,1.32,1.33 contact.h,1.4,1.5 contact_parser.y,1.6,1.7 contactlist.c,1.3,1.4 dialog.c,1.16,1.17 edit_account_window.c,1.10,1.11 edit_contact_window.c,1.9,1.10 edit_local_accounts.c,1.2,1.3 file_select.c,1.4,1.5 globals.h,1.7,1.8 gtk_eb_html.c,1.8,1.9 llist.c,1.2,1.3 prefs.c,1.23,1.24 service.c,1.8,1.9 service.h,1.10,1.11 smileys.c,1.11,1.12 smileys.h,1.4,1.5 status.c,1.32,1.33 util.c,1.25,1.26 util.h,1.14,1.15,
Philip S Tellis <address@hidden> <=