You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Rob F. <rob...@us...> - 2002-04-11 23:39:33
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv6259 Modified Files: ChangeLog Log Message: (19:38:54) Seanegn: Do me a favor and mention on the ChangeLog that MSN privacy works now. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.442 retrieving revision 1.443 diff -u -d -r1.442 -r1.443 --- ChangeLog 11 Apr 2002 22:40:44 -0000 1.442 +++ ChangeLog 11 Apr 2002 23:39:29 -0000 1.443 @@ -6,6 +6,7 @@ * Russian Translation Updated (thanks Grigory Bakunov) * libjabber upgraded to most recent stable version * Buddylist looks a little better + * Fixed MSN privacy settings version 0.55 (03/29/2002): * Jabber improvements (Thanks Jim Seymour) |
From: Rob F. <rob...@us...> - 2002-04-11 22:40:47
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv20603/pixmaps Modified Files: Makefile.am Added Files: arrow_down.xpm arrow_right.xpm Log Message: I molested GtkTree. --- NEW FILE: arrow_down.xpm --- /* XPM */ static char * arrow_down_xpm[] = { "11 6 3 1", " c None", ". c #000000", "+ c #FFFFFF", "...........", " .+++++++. ", " .+++++. ", " .+++. ", " .+. ", " . "}; --- NEW FILE: arrow_right.xpm --- /* XPM */ static char * arrow_right_xpm[] = { "11 11 3 1", " c None", ". c #000000", "+ c #FFFFFF", " . ", " .. ", " .+. ", " .++. ", " .+++. ", " .++++. ", " .+++. ", " .++. ", " .+. ", " .. ", " . "}; Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/Makefile.am,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- Makefile.am 19 Mar 2002 06:26:04 -0000 1.66 +++ Makefile.am 11 Apr 2002 22:40:44 -0000 1.67 @@ -6,6 +6,8 @@ admin_icon.xpm \ aimicon.xpm \ angel.xpm \ + arrow_down.xpm \ + arrow_right.xpm \ aol_icon.xpm \ available-away.xpm \ available-chat.xpm \ |
From: Rob F. <rob...@us...> - 2002-04-11 22:40:47
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv20603/src Modified Files: buddy.c Log Message: I molested GtkTree. Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.297 retrieving revision 1.298 diff -u -d -r1.297 -r1.298 --- buddy.c 29 Mar 2002 13:28:55 -0000 1.297 +++ buddy.c 11 Apr 2002 22:40:44 -0000 1.298 @@ -74,6 +74,9 @@ #include "pixmaps/group.xpm" #include "pixmaps/logout_menu.xpm" +#include "pixmaps/arrow_down.xpm" +#include "pixmaps/arrow_right.xpm" + static GtkTooltips *tips; static GtkAccelGroup *accel; static GtkWidget *editpane; @@ -90,6 +93,9 @@ void BuddyTickerLogonTimeout(gpointer data); void BuddyTickerLogoutTimeout(gpointer data); +typedef struct _GtkTreePixmaps GtkTreePixmaps; + + struct buddy_show { GtkWidget *item; GtkWidget *pix; @@ -1798,26 +1804,77 @@ return -1; } + + static struct group_show *new_group_show(char *group) { struct group_show *g = g_new0(struct group_show, 1); int pos = group_number(group); + GdkPixmap *pm; + GdkBitmap *bm; + GtkStyle *style; + GtkStyle *style2; + int j; g->name = g_strdup(group); g->item = gtk_tree_item_new(); - gtk_tree_insert(GTK_TREE(buddies), g->item, pos); + gtk_signal_connect(GTK_OBJECT(g->item), "button_press_event", GTK_SIGNAL_FUNC(handle_click_group), g); + + gtk_tree_insert(GTK_TREE(buddies), g->item, pos); + gtk_widget_show(g->item); g->label = gtk_label_new(group); gtk_misc_set_alignment(GTK_MISC(g->label), 0.0, 0.5); - gtk_container_add(GTK_CONTAINER(g->item), g->label); gtk_widget_show(g->label); + gtk_container_add(GTK_CONTAINER(g->item), g->label); + + style = gtk_style_new(); +// style->font = gdk_font_load("-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"); + + style->fg[0].red = 104 * 255; + style->fg[0].green = 20 * 255; + style->fg[0].blue = 20* 255; + + gtk_widget_set_style(GTK_WIDGET(g->label), style); + + shows = g_slist_insert(shows, g, pos); + + /* Rob does drugs - this is still evil, damn you becausse I SAID SO! */ + + pm = gdk_pixmap_create_from_xpm_d(g->item->window, + &bm, NULL, arrow_down_xpm); + + gtk_pixmap_set(GTK_PIXMAP(GTK_TREE_ITEM(g->item)->minus_pix_widget), + pm, bm); + + gdk_pixmap_unref(pm); + gdk_bitmap_unref(bm); + + pm = gdk_pixmap_create_from_xpm_d(buddies->window, + &bm, NULL, arrow_right_xpm); + + gtk_pixmap_set(GTK_PIXMAP(GTK_TREE_ITEM(g->item)->plus_pix_widget), + pm, bm); + + gdk_pixmap_unref(pm); + gdk_bitmap_unref(bm); + + style = gtk_widget_get_style(GTK_TREE_ITEM(g->item)->pixmaps_box); + style2 = gtk_widget_get_style(g->item); + style->bg[0] = style2->base[0]; + + gtk_widget_set_style(GTK_TREE_ITEM(g->item)->pixmaps_box, style); + + /* bad drugs */ + update_num_group(g); + return g; } @@ -2638,14 +2695,12 @@ notebook = gtk_notebook_new(); - - - /* Do buddy list stuff */ /* FIXME: spacing on both panes is ad hoc */ buddypane = gtk_vbox_new(FALSE, 1); buddies = gtk_tree_new(); + gtk_tree_set_view_lines(GTK_TREE(buddies), FALSE); sw = gtk_scrolled_window_new(NULL, NULL); tips = gtk_tooltips_new(); |
From: Rob F. <rob...@us...> - 2002-04-11 22:40:47
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv20603 Modified Files: ChangeLog Log Message: I molested GtkTree. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.441 retrieving revision 1.442 diff -u -d -r1.441 -r1.442 --- ChangeLog 4 Apr 2002 03:06:26 -0000 1.441 +++ ChangeLog 11 Apr 2002 22:40:44 -0000 1.442 @@ -5,6 +5,7 @@ * Shell-like send history binded to Ctrl-Up and Ctrl-Down * Russian Translation Updated (thanks Grigory Bakunov) * libjabber upgraded to most recent stable version + * Buddylist looks a little better version 0.55 (03/29/2002): * Jabber improvements (Thanks Jim Seymour) |
From: Rob F. <rob...@us...> - 2002-04-06 02:32:19
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv17899/src Modified Files: sound.c Log Message: eye before e except after sea Index: sound.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/sound.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- sound.c 17 Mar 2002 22:23:18 -0000 1.53 +++ sound.c 6 Apr 2002 02:32:16 -0000 1.54 @@ -58,8 +58,8 @@ struct sound_struct sounds[NUM_SOUNDS] = { N_("Buddy logs in"), OPT_SOUND_LOGIN, BuddyArrive, sizeof(BuddyArrive), N_("Buddy logs out"), OPT_SOUND_LOGOUT, BuddyLeave, sizeof(BuddyLeave), - N_("Message recieved"), OPT_SOUND_RECV, Receive, sizeof(Receive), - N_("Message recieved begins conversation"), OPT_SOUND_FIRST_RCV, Receive, sizeof(Receive), + N_("Message received"), OPT_SOUND_RECV, Receive, sizeof(Receive), + N_("Message received begins conversation"), OPT_SOUND_FIRST_RCV, Receive, sizeof(Receive), N_("Message sent"), OPT_SOUND_SEND, Send, sizeof(Send), N_("Person enters chat"), OPT_SOUND_CHAT_JOIN, BuddyArrive, sizeof(BuddyArrive), N_("Person leaves chat"), OPT_SOUND_CHAT_PART, BuddyLeave, sizeof(BuddyLeave), |
From: Sean E. <sea...@us...> - 2002-04-04 20:11:35
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv27801/src Modified Files: conversation.c Log Message: The words of the prophets are written on the subway walls and tenement halls. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.347 retrieving revision 1.348 diff -u -d -r1.347 -r1.348 --- conversation.c 3 Apr 2002 03:02:02 -0000 1.347 +++ conversation.c 4 Apr 2002 20:11:25 -0000 1.348 @@ -3252,11 +3252,13 @@ gdk_gc_set_clip_mask(gc, bm); gdk_gc_set_clip_origin(gc, gdk_pixbuf_frame_get_x_offset(frame) * - SCALE(c->anim)/gdk_pixbuf_get_width(scale), - gdk_pixbuf_frame_get_y_offset(frame)); + SCALE(c->anim)/gdk_pixbuf_animation_get_width(c->anim), + gdk_pixbuf_frame_get_y_offset(frame) * + SCALE(c->anim)/gdk_pixbuf_animation_get_height(c->anim)); gdk_draw_pixmap(pm, gc, src, 0, 0, gdk_pixbuf_frame_get_x_offset(frame)* - SCALE(c->anim)/gdk_pixbuf_get_width(scale), - gdk_pixbuf_frame_get_y_offset(frame),-1,-1); + SCALE(c->anim)/gdk_pixbuf_animation_get_width(c->anim), + gdk_pixbuf_frame_get_y_offset(frame) * + SCALE(c->anim)/gdk_pixbuf_animation_get_height(c->anim),-1,-1); gdk_pixmap_unref(src); if (bm) |
From: Sean E. <sea...@us...> - 2002-04-04 03:06:30
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv30506 Modified Files: ChangeLog Log Message: Upgraded libjabber Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.440 retrieving revision 1.441 diff -u -d -r1.440 -r1.441 --- ChangeLog 3 Apr 2002 14:26:18 -0000 1.440 +++ ChangeLog 4 Apr 2002 03:06:26 -0000 1.441 @@ -4,7 +4,8 @@ * German translation update (Thanks Karsten Weiss) * Shell-like send history binded to Ctrl-Up and Ctrl-Down * Russian Translation Updated (thanks Grigory Bakunov) - + * libjabber upgraded to most recent stable version + version 0.55 (03/29/2002): * Jabber improvements (Thanks Jim Seymour) * Various sound cleanups (Thanks Robert McQueen) |
From: Sean E. <sea...@us...> - 2002-04-04 03:05:01
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory usw-pr-cvs1:/tmp/cvs-serv30164/src/protocols/jabber Modified Files: Makefile.am expat.c genhash.c hashtable.c jid.c jpacket.c jutil.c pool.c pproxy.c rate.c sha.c snprintf.c socket.c str.c xmlnode.c xmlparse.c xmlrole.c xmltok.c xmltok_impl.c xmltok_ns.c xstream.c Added Files: karma.c lib.h xhash.c Log Message: Upgraded jabber to most recent stable version --- NEW FILE: karma.c --- /* -------------------------------------------------------------------------- * * License * * The contents of this file are subject to the Jabber Open Source License * Version 1.0 (the "JOSL"). You may not copy or use this file, in either * source code or executable form, except in compliance with the JOSL. You * may obtain a copy of the JOSL at http://www.jabber.org/ or at * http://www.opensource.org/. * * Software distributed under the JOSL is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the JOSL * for the specific language governing rights and limitations under the * JOSL. * * Copyrights * * Portions created by or assigned to Jabber.com, Inc. are * Copyright (c) 1999-2002 Jabber.com, Inc. All Rights Reserved. Contact * information for Jabber.com, Inc. is available at http://www.jabber.com/. * * Portions Copyright (c) 1998-1999 Jeremie Miller. * * Acknowledgements * * Special thanks to the Jabber Open Source Contributors for their * suggestions and support of Jabber. * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case * the provisions of the GPL are applicable instead of those above. If you * wish to allow use of your version of this file only under the terms of the * GPL and not to allow others to use your version of this file under the JOSL, * indicate your decision by deleting the provisions above and replace them * with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the JOSL or the GPL. * * * --------------------------------------------------------------------------*/ #include "lib.h" void karma_copy(struct karma *new, struct karma *old) { new->init = old->init; new->val = old->val; new->bytes = old->bytes; new->max = old->max; new->inc = old->inc; new->dec = old->dec; new->penalty = old->penalty; new->restore = old->restore; new->last_update = old->last_update; new->reset_meter = old->reset_meter; } struct karma *karma_new(pool p) { struct karma *new; if(p == NULL) return NULL; new = pmalloco(p, sizeof(struct karma)); new->init = 0; new->bytes = 0; new->val = KARMA_INIT; new->max = KARMA_MAX; new->inc = KARMA_INC; new->dec = KARMA_DEC; new->penalty = KARMA_PENALTY; new->restore = KARMA_RESTORE; new->last_update = 0; new->reset_meter = KARMA_RESETMETER; return new; } void karma_increment(struct karma *k) { /* set the current time, and check if we can increment */ time_t cur_time = time(NULL); int punishment_over = 0; /* only increment every KARMA_HEARTBEAT seconds */ if( ( k->last_update + KARMA_HEARTBEAT > cur_time ) && k->last_update != 0) return; /* if incrementing will raise >= 0 */ if( ( k->val < 0 ) && ( k->val + k->inc >= 0 ) ) punishment_over = 1; /* increment the karma value */ k->val += k->inc; if( k->val > k->max ) k->val = k->max; /* can only be so good */ /* lower our byte count, if we have good karma */ if( k->val > 0 ) k->bytes -= ( KARMA_READ_MAX(k->val) ); if( k->bytes < 0 ) k->bytes = 0; /* our karma has *raised* to 0 */ if( punishment_over ) /* Set Restore value and clear byte meter */ { k->val = k->restore; /* Total absolution for transgression */ if(k->reset_meter) k->bytes = 0; } /* reset out counter */ k->last_update = cur_time; } void karma_decrement(struct karma *k, long bytes_read) { /* Increment the bytes read since last since last karma_increment */ k->bytes += bytes_read; /* Check if our byte meter has exceeded the Max bytes our meter is allowed. */ if(k->bytes > KARMA_READ_MAX(k->val)) { /* Our meter has exceeded it's allowable lower our karma */ k->val -= k->dec; /* if below zero, set to penalty */ if(k->val <= 0) k->val = k->penalty; } } /* returns 0 on okay check, 1 on bad check */ int karma_check(struct karma *k,long bytes_read) { /* Check the need to increase or decrease karma */ karma_increment(k); karma_decrement(k, bytes_read); /* check its karma */ if(k->val <= 0) return 1; /* bad */ /* everything is okay */ return 0; } --- NEW FILE: lib.h --- #include <string.h> #include <stdlib.h> #include <sys/types.h> #include <stdio.h> #include <setjmp.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <signal.h> #include <syslog.h> #include <strings.h> #include <unistd.h> #include <sys/param.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <arpa/inet.h> #include <sys/time.h> #include <stdarg.h> #include <ctype.h> #include <time.h> #include "xmlparse.h" /* ** Arrange to use either varargs or stdargs */ #define MAXSHORTSTR 203 /* max short string length */ #define QUAD_T unsigned long long #ifdef __STDC__ #include <stdarg.h> # define VA_LOCAL_DECL va_list ap; # define VA_START(f) va_start(ap, f) # define VA_END va_end(ap) #else /* __STDC__ */ # include <varargs.h> # define VA_LOCAL_DECL va_list ap; # define VA_START(f) va_start(ap) # define VA_END va_end(ap) #endif /* __STDC__ */ #ifndef INCL_LIB_H #define INCL_LIB_H #ifdef __cplusplus extern "C" { #endif #ifndef HAVE_SNPRINTF extern int ap_snprintf(char *, size_t, const char *, ...); #define snprintf ap_snprintf #endif #ifndef HAVE_VSNPRINTF extern int ap_vsnprintf(char *, size_t, const char *, va_list ap); #define vsnprintf ap_vsnprintf #endif #define ZONE zonestr(__FILE__,__LINE__) char *zonestr(char *file, int line); /* --------------------------------------------------------- */ /* */ /* Pool-based memory management routines */ /* */ /* --------------------------------------------------------- */ #undef POOL_DEBUG /* flip these, this should be a prime number for top # of pools debugging #define POOL_DEBUG 40009 */ /* pheap - singular allocation of memory */ struct pheap { void *block; int size, used; }; /* pool_cleaner - callback type which is associated with a pool entry; invoked when the pool entry is free'd */ typedef void (*pool_cleaner)(void *arg); /* pfree - a linked list node which stores an allocation chunk, plus a callback */ struct pfree { pool_cleaner f; void *arg; struct pheap *heap; struct pfree *next; }; /* pool - base node for a pool. Maintains a linked list of pool entries (pfree) */ typedef struct pool_struct { int size; struct pfree *cleanup; struct pheap *heap; #ifdef POOL_DEBUG char name[8], zone[32]; int lsize; } _pool, *pool; #define pool_new() _pool_new(ZONE) #define pool_heap(i) _pool_new_heap(i,ZONE) #else } _pool, *pool; #define pool_heap(i) _pool_new_heap(i,NULL) #define pool_new() _pool_new(NULL) #endif pool _pool_new(char *zone); /* new pool :) */ pool _pool_new_heap(int size, char *zone); /* creates a new memory pool with an initial heap size */ void *pmalloc(pool p, int size); /* wrapper around malloc, takes from the pool, cleaned up automatically */ void *pmalloc_x(pool p, int size, char c); /* Wrapper around pmalloc which prefils buffer with c */ void *pmalloco(pool p, int size); /* YAPW for zeroing the block */ char *pstrdup(pool p, const char *src); /* wrapper around strdup, gains mem from pool */ void pool_stat(int full); /* print to stderr the changed pools and reset */ char *pstrdupx(pool p, const char *src); /* temp stub */ void pool_cleanup(pool p, pool_cleaner f, void *arg); /* calls f(arg) before the pool is freed during cleanup */ void pool_free(pool p); /* calls the cleanup functions, frees all the data on the pool, and deletes the pool itself */ int pool_size(pool p); /* returns total bytes allocated in this pool */ /* --------------------------------------------------------- */ /* */ /* Socket helper stuff */ /* */ /* --------------------------------------------------------- */ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif #define NETSOCKET_SERVER 0 #define NETSOCKET_CLIENT 1 #define NETSOCKET_UDP 2 #ifndef WIN32 int make_netsocket(u_short port, char *host, int type); struct in_addr *make_addr(char *host); int set_fd_close_on_exec(int fd, int flag); #endif /* --------------------------------------------------------- */ /* */ /* String management routines */ /* */ /* --------------------------------------------------------- */ char *j_strdup(const char *str); /* provides NULL safe strdup wrapper */ char *j_strcat(char *dest, char *txt); /* strcpy() clone */ int j_strcmp(const char *a, const char *b); /* provides NULL safe strcmp wrapper */ int j_strcasecmp(const char *a, const char *b); /* provides NULL safe strcasecmp wrapper */ int j_strncmp(const char *a, const char *b, int i); /* provides NULL safe strncmp wrapper */ int j_strncasecmp(const char *a, const char *b, int i); /* provides NULL safe strncasecmp wrapper */ int j_strlen(const char *a); /* provides NULL safe strlen wrapper */ int j_atoi(const char *a, int def); /* checks for NULL and uses default instead, convienence */ void str_b64decode(char *str); /* what it says */ /* --------------------------------------------------------- */ /* */ /* SHA calculations */ /* */ /* --------------------------------------------------------- */ #if (SIZEOF_INT == 4) typedef unsigned int uint32; #elif (SIZEOF_SHORT == 4) typedef unsigned short uint32; #else typedef unsigned int uint32; #endif /* HAVEUINT32 */ char *shahash(char *str); /* NOT THREAD SAFE */ void shahash_r(const char* str, char hashbuf[40]); /* USE ME */ int strprintsha(char *dest, int *hashval); /* --------------------------------------------------------- */ /* */ /* Hashtable functions */ /* */ /* --------------------------------------------------------- */ typedef struct xhn_struct { struct xhn_struct *next; const char *key; void *val; } *xhn, _xhn; typedef struct xht_struct { pool p; int prime; struct xhn_struct *zen; } *xht, _xht; xht xhash_new(int prime); void xhash_put(xht h, const char *key, void *val); void *xhash_get(xht h, const char *key); void xhash_zap(xht h, const char *key); void xhash_free(xht h); typedef void (*xhash_walker)(xht h, const char *key, void *val, void *arg); void xhash_walk(xht h, xhash_walker w, void *arg); /* --------------------------------------------------------- */ /* */ /* DEPRECIATED Hashtable functions */ /* */ /* --------------------------------------------------------- */ typedef int (*KEYHASHFUNC)(const void *key); typedef int (*KEYCOMPAREFUNC)(const void *key1, const void *key2); typedef int (*TABLEWALKFUNC)(void *user_data, const void *key, void *data); typedef void *HASHTABLE; HASHTABLE ghash_create(int buckets, KEYHASHFUNC hash, KEYCOMPAREFUNC cmp); HASHTABLE ghash_create_pool(pool p, int buckets, KEYHASHFUNC hash, KEYCOMPAREFUNC cmp); void ghash_destroy(HASHTABLE tbl); void *ghash_get(HASHTABLE tbl, const void *key); int ghash_put(HASHTABLE tbl, const void *key, void *value); int ghash_remove(HASHTABLE tbl, const void *key); int ghash_walk(HASHTABLE tbl, TABLEWALKFUNC func, void *user_data); int str_hash_code(const char *s); /* --------------------------------------------------------- */ /* */ /* XML escaping utils */ /* */ /* --------------------------------------------------------- */ char *strescape(pool p, char *buf); /* Escape <>&'" chars */ char *strunescape(pool p, char *buf); /* --------------------------------------------------------- */ /* */ /* String pools (spool) functions */ /* */ /* --------------------------------------------------------- */ struct spool_node { char *c; struct spool_node *next; }; typedef struct spool_struct { pool p; int len; struct spool_node *last; struct spool_node *first; } *spool; spool spool_new(pool p); /* create a string pool */ void spooler(spool s, ...); /* append all the char * args to the pool, terminate args with s again */ char *spool_print(spool s); /* return a big string */ void spool_add(spool s, char *str); /* add a single char to the pool */ char *spools(pool p, ...); /* wrap all the spooler stuff in one function, the happy fun ball! */ /* --------------------------------------------------------- */ /* */ /* xmlnodes - Document Object Model */ /* */ /* --------------------------------------------------------- */ #define NTYPE_TAG 0 #define NTYPE_ATTRIB 1 #define NTYPE_CDATA 2 #define NTYPE_LAST 2 #define NTYPE_UNDEF -1 /* -------------------------------------------------------------------------- Node structure. Do not use directly! Always use accessor macros and methods! -------------------------------------------------------------------------- */ typedef struct xmlnode_t { char* name; unsigned short type; char* data; int data_sz; int complete; pool p; struct xmlnode_t* parent; struct xmlnode_t* firstchild; struct xmlnode_t* lastchild; struct xmlnode_t* prev; struct xmlnode_t* next; struct xmlnode_t* firstattrib; struct xmlnode_t* lastattrib; } _xmlnode, *xmlnode; /* Node creation routines */ xmlnode xmlnode_wrap(xmlnode x,const char* wrapper); xmlnode xmlnode_new_tag(const char* name); xmlnode xmlnode_new_tag_pool(pool p, const char* name); xmlnode xmlnode_insert_tag(xmlnode parent, const char* name); xmlnode xmlnode_insert_cdata(xmlnode parent, const char* CDATA, unsigned int size); xmlnode xmlnode_insert_tag_node(xmlnode parent, xmlnode node); void xmlnode_insert_node(xmlnode parent, xmlnode node); xmlnode xmlnode_str(char *str, int len); xmlnode xmlnode_file(char *file); char* xmlnode_file_borked(char *file); /* same as _file but returns the parsing error */ xmlnode xmlnode_dup(xmlnode x); /* duplicate x */ xmlnode xmlnode_dup_pool(pool p, xmlnode x); /* Node Memory Pool */ pool xmlnode_pool(xmlnode node); xmlnode _xmlnode_new(pool p, const char *name, unsigned int type); /* Node editing */ void xmlnode_hide(xmlnode child); void xmlnode_hide_attrib(xmlnode parent, const char *name); /* Node deletion routine, also frees the node pool! */ void xmlnode_free(xmlnode node); /* Locates a child tag by name and returns it */ xmlnode xmlnode_get_tag(xmlnode parent, const char* name); char* xmlnode_get_tag_data(xmlnode parent, const char* name); /* Attribute accessors */ void xmlnode_put_attrib(xmlnode owner, const char* name, const char* value); char* xmlnode_get_attrib(xmlnode owner, const char* name); void xmlnode_put_expat_attribs(xmlnode owner, const char** atts); /* Bastard am I, but these are fun for internal use ;-) */ void xmlnode_put_vattrib(xmlnode owner, const char* name, void *value); void* xmlnode_get_vattrib(xmlnode owner, const char* name); /* Node traversal routines */ xmlnode xmlnode_get_firstattrib(xmlnode parent); xmlnode xmlnode_get_firstchild(xmlnode parent); xmlnode xmlnode_get_lastchild(xmlnode parent); xmlnode xmlnode_get_nextsibling(xmlnode sibling); xmlnode xmlnode_get_prevsibling(xmlnode sibling); xmlnode xmlnode_get_parent(xmlnode node); /* Node information routines */ char* xmlnode_get_name(xmlnode node); char* xmlnode_get_data(xmlnode node); int xmlnode_get_datasz(xmlnode node); int xmlnode_get_type(xmlnode node); int xmlnode_has_children(xmlnode node); int xmlnode_has_attribs(xmlnode node); /* Node-to-string translation */ char* xmlnode2str(xmlnode node); /* Node-to-terminated-string translation -- useful for interfacing w/ scripting langs */ char* xmlnode2tstr(xmlnode node); int xmlnode_cmp(xmlnode a, xmlnode b); /* compares a and b for equality */ int xmlnode2file(char *file, xmlnode node); /* writes node to file */ /* Expat callbacks */ void expat_startElement(void* userdata, const char* name, const char** atts); void expat_endElement(void* userdata, const char* name); void expat_charData(void* userdata, const char* s, int len); /*********************** * XSTREAM Section ***********************/ #define XSTREAM_MAXNODE 1000000 #define XSTREAM_MAXDEPTH 100 #define XSTREAM_ROOT 0 /* root element */ #define XSTREAM_NODE 1 /* normal node */ #define XSTREAM_CLOSE 2 /* closed </stream:stream> */ #define XSTREAM_ERR 4 /* parser error */ typedef void (*xstream_onNode)(int type, xmlnode x, void *arg); /* xstream event handler */ typedef struct xstream_struct { XML_Parser parser; xmlnode node; char *cdata; int cdata_len; pool p; xstream_onNode f; void *arg; int status; int depth; } *xstream, _xstream; xstream xstream_new(pool p, xstream_onNode f, void *arg); /* create a new xstream */ int xstream_eat(xstream xs, char *buff, int len); /* parse new data for this xstream, returns last XSTREAM_* status */ /* convience functions */ xmlnode xstream_header(char *namespace, char *to, char *from); char *xstream_header_char(xmlnode x); typedef struct { unsigned long H[5]; unsigned long W[80]; int lenW; unsigned long sizeHi,sizeLo; } j_SHA_CTX; void shaInit(j_SHA_CTX *ctx); void shaUpdate(j_SHA_CTX *ctx, unsigned char *dataIn, int len); void shaFinal(j_SHA_CTX *ctx, unsigned char hashout[20]); void shaBlock(unsigned char *dataIn, int len, unsigned char hashout[20]); /********** END OLD libxode.h BEGIN OLD jabber.h *************/ /* --------------------------------------------------------- */ /* */ /* JID structures & constants */ /* */ /* --------------------------------------------------------- */ #define JID_RESOURCE 1 #define JID_USER 2 #define JID_SERVER 4 typedef struct jid_struct { pool p; char* resource; char* user; char* server; char* full; struct jid_struct *next; /* for lists of jids */ } *jid; jid jid_new(pool p, char *idstr); /* Creates a jabber id from the idstr */ void jid_set(jid id, char *str, int item); /* Individually sets jid components */ char* jid_full(jid id); /* Builds a string type=user/resource@server from the jid data */ int jid_cmp(jid a, jid b); /* Compares two jid's, returns 0 for perfect match */ int jid_cmpx(jid a, jid b, int parts); /* Compares just the parts specified as JID_|JID_ */ jid jid_append(jid a, jid b); /* Appending b to a (list), no dups */ xmlnode jid_xres(jid id); /* Returns xmlnode representation of the resource?query=string */ xmlnode jid_nodescan(jid id, xmlnode x); /* Scans the children of the node for a matching jid attribute */ jid jid_user(jid a); /* returns the same jid but just of the user@host part */ /* --------------------------------------------------------- */ /* */ /* JPacket structures & constants */ /* */ /* --------------------------------------------------------- */ #define JPACKET_UNKNOWN 0x00 #define JPACKET_MESSAGE 0x01 #define JPACKET_PRESENCE 0x02 #define JPACKET_IQ 0x04 #define JPACKET_S10N 0x08 #define JPACKET__UNKNOWN 0 #define JPACKET__NONE 1 #define JPACKET__ERROR 2 #define JPACKET__CHAT 3 #define JPACKET__GROUPCHAT 4 #define JPACKET__GET 5 #define JPACKET__SET 6 #define JPACKET__RESULT 7 #define JPACKET__SUBSCRIBE 8 #define JPACKET__SUBSCRIBED 9 #define JPACKET__UNSUBSCRIBE 10 #define JPACKET__UNSUBSCRIBED 11 #define JPACKET__AVAILABLE 12 #define JPACKET__UNAVAILABLE 13 #define JPACKET__PROBE 14 #define JPACKET__HEADLINE 15 #define JPACKET__INVISIBLE 16 typedef struct jpacket_struct { unsigned char type; int subtype; int flag; void* aux1; xmlnode x; jid to; jid from; char* iqns; xmlnode iq; pool p; } *jpacket, _jpacket; jpacket jpacket_new(xmlnode x); /* Creates a jabber packet from the xmlnode */ jpacket jpacket_reset(jpacket p); /* Resets the jpacket values based on the xmlnode */ int jpacket_subtype(jpacket p); /* Returns the subtype value (looks at xmlnode for it) */ /* --------------------------------------------------------- */ /* */ /* Presence Proxy DB structures & constants */ /* */ /* --------------------------------------------------------- */ typedef struct ppdb_struct { jid id; /* entry data */ int pri; xmlnode x; struct ppdb_struct* user; /* linked list for user@server */ pool p; /* db-level data */ struct ppdb_struct* next; } _ppdb, *ppdb; ppdb ppdb_insert(ppdb db, jid id, xmlnode x); /* Inserts presence into the proxy */ xmlnode ppdb_primary(ppdb db, jid id); /* Fetches the matching primary presence for the id */ void ppdb_free(ppdb db); /* Frees the db and all entries */ xmlnode ppdb_get(ppdb db, jid id); /* Called successively to return each presence xmlnode */ /* for the id and children, returns NULL at the end */ /* --------------------------------------------------------- */ /* */ /* Simple Jabber Rate limit functions */ /* */ /* --------------------------------------------------------- */ typedef struct jlimit_struct { char *key; int start; int points; int maxt, maxp; pool p; } *jlimit, _jlimit; jlimit jlimit_new(int maxt, int maxp); void jlimit_free(jlimit r); int jlimit_check(jlimit r, char *key, int points); // #define KARMA_DEBUG // default to disable karma #define KARMA_READ_MAX(k) (abs(k)*100) /* how much you are allowed to read off the sock */ #define KARMA_INIT 5 /* internal "init" value */ #define KARMA_HEARTBEAT 2 /* seconds to register for heartbeat */ #define KARMA_MAX 10 /* total max karma you can have */ #define KARMA_INC 1 /* how much to increment every KARMA_HEARTBEAT seconds */ #define KARMA_DEC 0 /* how much to penalize for reading KARMA_READ_MAX in KARMA_HEARTBEAT seconds */ #define KARMA_PENALTY -5 /* where you go when you hit 0 karma */ #define KARMA_RESTORE 5 /* where you go when you payed your penelty or INIT */ #define KARMA_RESETMETER 0 /* Reset byte meter on restore default is falst */ struct karma { int init; /* struct initialized */ int reset_meter; /* reset the byte meter on restore */ int val; /* current karma value */ long bytes; /* total bytes read (in that time period) */ int max; /* max karma you can have */ int inc,dec; /* how much to increment/decrement */ int penalty,restore; /* what penalty (<0) or restore (>0) */ time_t last_update; /* time this was last incremented */ }; struct karma *karma_new(pool p); /* creates a new karma object, with default values */ void karma_copy(struct karma *new, struct karma *old); /* makes a copy of old in new */ void karma_increment(struct karma *k); /* inteligently increments karma */ void karma_decrement(struct karma *k, long bytes_read); /* inteligently decrements karma */ int karma_check(struct karma *k,long bytes_read); /* checks to see if we have good karma */ /* --------------------------------------------------------- */ /* */ /* Error structures & constants */ /* */ /* --------------------------------------------------------- */ typedef struct terror_struct { int code; char msg[64]; } terror; #define TERROR_BAD (terror){400,"Bad Request"} #define TERROR_AUTH (terror){401,"Unauthorized"} #define TERROR_PAY (terror){402,"Payment Required"} #define TERROR_FORBIDDEN (terror){403,"Forbidden"} #define TERROR_NOTFOUND (terror){404,"Not Found"} #define TERROR_NOTALLOWED (terror){405,"Not Allowed"} #define TERROR_NOTACCEPTABLE (terror){406,"Not Acceptable"} #define TERROR_REGISTER (terror){407,"Registration Required"} #define TERROR_REQTIMEOUT (terror){408,"Request Timeout"} #define TERROR_CONFLICT (terror){409,"Conflict"} #define TERROR_INTERNAL (terror){500,"Internal Server Error"} #define TERROR_NOTIMPL (terror){501,"Not Implemented"} #define TERROR_EXTERNAL (terror){502,"Remote Server Error"} #define TERROR_UNAVAIL (terror){503,"Service Unavailable"} #define TERROR_EXTTIMEOUT (terror){504,"Remote Server Timeout"} #define TERROR_DISCONNECTED (terror){510,"Disconnected"} /* --------------------------------------------------------- */ /* */ /* Namespace constants */ /* */ /* --------------------------------------------------------- */ #define NSCHECK(x,n) (j_strcmp(xmlnode_get_attrib(x,"xmlns"),n) == 0) #define NS_CLIENT "jabber:client" #define NS_SERVER "jabber:server" #define NS_AUTH "jabber:iq:auth" #define NS_REGISTER "jabber:iq:register" #define NS_ROSTER "jabber:iq:roster" #define NS_OFFLINE "jabber:x:offline" #define NS_AGENT "jabber:iq:agent" #define NS_AGENTS "jabber:iq:agents" #define NS_DELAY "jabber:x:delay" #define NS_VERSION "jabber:iq:version" #define NS_TIME "jabber:iq:time" #define NS_VCARD "vcard-temp" #define NS_PRIVATE "jabber:iq:private" #define NS_SEARCH "jabber:iq:search" #define NS_OOB "jabber:iq:oob" #define NS_XOOB "jabber:x:oob" #define NS_ADMIN "jabber:iq:admin" #define NS_FILTER "jabber:iq:filter" #define NS_AUTH_0K "jabber:iq:auth:0k" #define NS_BROWSE "jabber:iq:browse" #define NS_EVENT "jabber:x:event" #define NS_CONFERENCE "jabber:iq:conference" #define NS_SIGNED "jabber:x:signed" #define NS_ENCRYPTED "jabber:x:encrypted" #define NS_GATEWAY "jabber:iq:gateway" #define NS_LAST "jabber:iq:last" #define NS_ENVELOPE "jabber:x:envelope" #define NS_EXPIRE "jabber:x:expire" #define NS_XHTML "http://www.w3.org/1999/xhtml" #define NS_XDBGINSERT "jabber:xdb:ginsert" #define NS_XDBNSLIST "jabber:xdb:nslist" /* --------------------------------------------------------- */ /* */ /* JUtil functions */ /* */ /* --------------------------------------------------------- */ xmlnode jutil_presnew(int type, char *to, char *status); /* Create a skeleton presence packet */ xmlnode jutil_iqnew(int type, char *ns); /* Create a skeleton iq packet */ xmlnode jutil_msgnew(char *type, char *to, char *subj, char *body); /* Create a skeleton message packet */ xmlnode jutil_header(char* xmlns, char* server); /* Create a skeleton stream packet */ int jutil_priority(xmlnode x); /* Determine priority of this packet */ void jutil_tofrom(xmlnode x); /* Swaps to/from fields on a packet */ xmlnode jutil_iqresult(xmlnode x); /* Generate a skeleton iq/result, given a iq/query */ char* jutil_timestamp(void); /* Get stringified timestamp */ void jutil_error(xmlnode x, terror E); /* Append an <error> node to x */ void jutil_delay(xmlnode msg, char *reason); /* Append a delay packet to msg */ char* jutil_regkey(char *key, char *seed); /* pass a seed to generate a key, pass the key again to validate (returns it) */ #ifdef __cplusplus } #endif #endif /* INCL_LIB_H */ --- NEW FILE: xhash.c --- /* -------------------------------------------------------------------------- * * License * * The contents of this file are subject to the Jabber Open Source License * Version 1.0 (the "JOSL"). You may not copy or use this file, in either * source code or executable form, except in compliance with the JOSL. You * may obtain a copy of the JOSL at http://www.jabber.org/ or at * http://www.opensource.org/. * * Software distributed under the JOSL is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the JOSL * for the specific language governing rights and limitations under the * JOSL. * * Copyrights * * Portions created by or assigned to Jabber.com, Inc. are * Copyright (c) 1999-2002 Jabber.com, Inc. All Rights Reserved. Contact * information for Jabber.com, Inc. is available at http://www.jabber.com/. * * Portions Copyright (c) 1998-1999 Jeremie Miller. * * Acknowledgements * * Special thanks to the Jabber Open Source Contributors for their * suggestions and support of Jabber. * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License Version 2 or later (the "GPL"), in which case * the provisions of the GPL are applicable instead of those above. If you * wish to allow use of your version of this file only under the terms of the * GPL and not to allow others to use your version of this file under the JOSL, * indicate your decision by deleting the provisions above and replace them * with the notice and other provisions required by the GPL. If you do not * delete the provisions above, a recipient may use your version of this file * under either the JOSL or the GPL. * * * --------------------------------------------------------------------------*/ #include "lib.h" /* Generates a hash code for a string. * This function uses the ELF hashing algorithm as reprinted in * Andrew Binstock, "Hashing Rehashed," Dr. Dobb's Journal, April 1996. */ int _xhasher(const char *s) { /* ELF hash uses unsigned chars and unsigned arithmetic for portability */ const unsigned char *name = (const unsigned char *)s; unsigned long h = 0, g; while (*name) { /* do some fancy bitwanking on the string */ h = (h << 4) + (unsigned long)(*name++); if ((g = (h & 0xF0000000UL))!=0) h ^= (g >> 24); h &= ~g; } return (int)h; } xhn _xhash_node_new(xht h, int index) { xhn n; int i = index % h->prime; /* get existing empty one */ for(n = &h->zen[i]; n != NULL; n = n->next) if(n->key == NULL) return n; /* overflowing, new one! */ n = pmalloco(h->p, sizeof(_xhn)); n->next = h->zen[i].next; h->zen[i].next = n; return n; } xhn _xhash_node_get(xht h, const char *key, int index) { xhn n; int i = index % h->prime; for(n = &h->zen[i]; n != NULL; n = n->next) if(j_strcmp(key, n->key) == 0) return n; return NULL; } xht xhash_new(int prime) { xht xnew; pool p; /* log_debug(ZONE,"creating new hash table of size %d",prime); */ p = pool_heap(sizeof(_xhn)*prime + sizeof(_xht)); xnew = pmalloco(p, sizeof(_xht)); xnew->prime = prime; xnew->p = p; xnew->zen = pmalloco(p, sizeof(_xhn)*prime); /* array of xhn size of prime */ return xnew; } void xhash_put(xht h, const char *key, void *val) { int index; xhn n; if(h == NULL || key == NULL) return; index = _xhasher(key); /* if existing key, replace it */ if((n = _xhash_node_get(h, key, index)) != NULL) { /* log_debug(ZONE,"replacing %s with new val %X",key,val); */ n->key = key; n->val = val; return; } /* log_debug(ZONE,"saving %s val %X",key,val); */ /* new node */ n = _xhash_node_new(h, index); n->key = key; n->val = val; } void *xhash_get(xht h, const char *key) { xhn n; if(h == NULL || key == NULL || (n = _xhash_node_get(h, key, _xhasher(key))) == NULL) { /* log_debug(ZONE,"failed lookup of %s",key); */ return NULL; } /* log_debug(ZONE,"found %s returning %X",key,n->val); */ return n->val; } void xhash_zap(xht h, const char *key) { xhn n; if(h == NULL || key == NULL || (n = _xhash_node_get(h, key, _xhasher(key))) == NULL) return; /* log_debug(ZONE,"zapping %s",key); */ /* kill an entry by zeroing out the key */ n->key = NULL; } void xhash_free(xht h) { /* log_debug(ZONE,"hash free %X",h); */ if(h != NULL) pool_free(h->p); } void xhash_walk(xht h, xhash_walker w, void *arg) { int i; xhn n; if(h == NULL || w == NULL) return; /* log_debug(ZONE,"walking %X",h); */ for(i = 0; i < h->prime; i++) for(n = &h->zen[i]; n != NULL; n = n->next) if(n->key != NULL && n->val != NULL) (*w)(h, n->key, n->val, arg); } Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 16 Dec 2001 21:35:00 -0000 1.3 +++ Makefile.am 4 Apr 2002 03:04:56 -0000 1.4 @@ -17,8 +17,10 @@ genhash.c \ hashtable.c \ hashtable.h \ + karma.c \ iasciitab.h \ latin1tab.h \ + lib.h \ libxode.h \ nametab.h \ pool.c \ @@ -27,6 +29,7 @@ socket.c \ str.c \ utf8tab.h \ + xhash.c \ xmldef.h \ xmlnode.c \ xmlparse.c \ @@ -63,7 +66,9 @@ hashtable.c \ hashtable.h \ iasciitab.h \ + karma.c \ latin1tab.h \ + lib.h \ libxode.h \ nametab.h \ pool.c \ @@ -72,6 +77,7 @@ socket.c \ str.c \ utf8tab.h \ + xhash.c \ xmldef.h \ xmlnode.c \ xmlparse.c \ Index: expat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/expat.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- expat.c 31 Jul 2001 01:00:38 -0000 1.1 +++ expat.c 4 Apr 2002 03:04:56 -0000 1.2 @@ -1,23 +1,45 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. +/* -------------------------------------------------------------------------- * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * License * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * The contents of this file are subject to the Jabber Open Source License + * Version 1.0 (the "JOSL"). You may not copy or use this file, in either + * source code or executable form, except in compliance with the JOSL. You + * may obtain a copy of the JOSL at http://www.jabber.org/ or at + * http://www.opensource.org/. * - * Jabber - * Copyright (C) 1998-1999 The Jabber Team http://jabber.org/ - */ + * Software distributed under the JOSL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the JOSL + * for the specific language governing rights and limitations under the + * JOSL. + * + * Copyrights + * + * Portions created by or assigned to Jabber.com, Inc. are + * Copyright (c) 1999-2002 Jabber.com, Inc. All Rights Reserved. Contact + * information for Jabber.com, Inc. is available at http://www.jabber.com/. + * + * Portions Copyright (c) 1998-1999 Jeremie Miller. + * + * Acknowledgements + * + * Special thanks to the Jabber Open Source Contributors for their + * suggestions and support of Jabber. + * + * Alternatively, the contents of this file may be used under the terms of the + * GNU General Public License Version 2 or later (the "GPL"), in which case + * the provisions of the GPL are applicable instead of those above. If you + * wish to allow use of your version of this file only under the terms of the + * GPL and not to allow others to use your version of this file under the JOSL, + * indicate your decision by deleting the provisions above and replace them + * with the notice and other provisions required by the GPL. If you do not + * delete the provisions above, a recipient may use your version of this file + * under either the JOSL or the GPL. + * + * + * --------------------------------------------------------------------------*/ -#include <libxode.h> +#include "lib.h" void expat_startElement(void* userdata, const char* name, const char** atts) { @@ -128,15 +150,45 @@ return node; /* return the xmlnode x points to */ } +char* xmlnode_file_borked(char *file) +{ + XML_Parser p; + char buf[BUFSIZ]; + static char err[1024]; + int fd, len, done; + + if(NULL == file) + return "no file specified"; + + fd = open(file,O_RDONLY); + if(fd < 0) + return "unable to open file"; + + p = XML_ParserCreate(NULL); + while(1) + { + len = read(fd, buf, BUFSIZ); + done = len < BUFSIZ; + if(!XML_Parse(p, buf, len, done)) + { + snprintf(err,1023,"%s at line %d and column %d",XML_ErrorString(XML_GetErrorCode(p)),XML_GetErrorLineNumber(p),XML_GetErrorColumnNumber(p)); + XML_ParserFree(p); + close(fd); + return err; + } + } +} + int xmlnode2file(char *file, xmlnode node) { - char *doc; + char *doc, *ftmp; int fd, i; if(file == NULL || node == NULL) return -1; - fd = open(file, O_CREAT | O_WRONLY | O_TRUNC, 0600); + ftmp = spools(xmlnode_pool(node),file,".t.m.p",xmlnode_pool(node)); + fd = open(ftmp, O_CREAT | O_WRONLY | O_TRUNC, 0600); if(fd < 0) return -1; @@ -146,6 +198,12 @@ return -1; close(fd); + + if(rename(ftmp,file) < 0) + { + unlink(ftmp); + return -1; + } return 1; } Index: genhash.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/genhash.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- genhash.c 31 Jul 2001 01:00:38 -0000 1.1 +++ genhash.c 4 Apr 2002 03:04:57 -0000 1.2 @@ -1,490 +1,101 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. +/* -------------------------------------------------------------------------- * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * License * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * The contents of this file are subject to the Jabber Open Source License + * Version 1.0 (the "JOSL"). You may not copy or use this file, in either + * source code or executable form, except in compliance with the JOSL. You + * may obtain a copy of the JOSL at http://www.jabber.org/ or at + * http://www.opensource.org/. * - * Jabber - * Copyright (C) 1998-1999 The Jabber Team http://jabber.org/ - */ -#include <libxode.h> - -/***************************************************************************** - * Internal type definitions - */ - -typedef struct tagHNODE -{ - struct tagHNODE *next; /* next node in list */ - const void *key; /* key pointer */ - void *value; /* value pointer */ -} HNODE; - -#define SLAB_NUM_NODES 64 /* allocate this many nodes per slab */ - -typedef struct tagHSLAB -{ - struct tagHSLAB *next; /* next slab pointer */ - HNODE nodes[SLAB_NUM_NODES]; /* the actual nodes */ -} HSLAB; - -#define HASH_NUM_BUCKETS 509 /* should be a prime number; see Knuth */ - -typedef struct tagHASHTABLE_INTERNAL -{ - unsigned long sig1; /* first signature word */ - KEYHASHFUNC hash; /* hash function */ - KEYCOMPAREFUNC cmp; /* comparison function */ - int count; /* table entry count */ - int bcount; /* bucket count */ - HNODE **buckets; /* the hash buckets */ - unsigned long sig2; /* second signature word */ - -} HASHTABLE_INTERNAL; - -#define HASH_SIG1 0x68736148UL /* "Hash" */ -#define HASH_SIG2 0x6F627245UL /* "Erbo" */ - -#define do_hash(tb,key) ((*((tb)->hash))(key) % ((tb)->bcount)) - -static HNODE *s_free_nodes = NULL; /* free nodes list */ -static HSLAB *s_slabs = NULL; /* node slabs list */ - -/***************************************************************************** - * Internal functions - */ - -static HNODE *allocate_node( - const void *key, /* key pointer for this node */ - void *value) /* value pointer for this node */ -/* - allocate_node allocates a new hash node and fills it. Returns NULL if the - node could not be allocated. -*/ -{ - HNODE *rc; /* return from this function */ - - if (!s_free_nodes) - { /* allocate a new slabful of nodes and chain them to make a new free list */ - register int i; /* loop counter */ - HSLAB *slab = (HSLAB *)malloc(sizeof(HSLAB)); - if (!slab) - return NULL; - memset(slab,0,sizeof(HSLAB)); - slab->next = s_slabs; - for (i=0; i<(SLAB_NUM_NODES-1); i++) - slab->nodes[i].next = &(slab->nodes[i+1]); - s_free_nodes = &(slab->nodes[0]); - s_slabs = slab; - - } /* end if */ - - /* grab a node off the fron of the free list and fill it */ - rc = s_free_nodes; - s_free_nodes = rc->next; - rc->next = NULL; - rc->key = key; - rc->value = value; - return rc; - -} /* end allocate_node */ - -static void free_node( - HNODE *node) /* node to be freed */ -/* - free_node returns a hash node to the list. -*/ -{ - /* zap the node contents to avoid problems later */ - memset(node,0,sizeof(HNODE)); - - /* chain it onto the free list */ - node->next = s_free_nodes; - s_free_nodes = node; - -} /* end free_node */ - -static HNODE *find_node( - HASHTABLE_INTERNAL *tab, /* pointer to hash table */ - const void *key, /* key value to look up */ - int bucket) /* bucket number (-1 to have function compute it) */ -/* - find_node walks a hash bucket to find a node whose key matches the named key value. - Returns the node pointer, or NULL if it's not found. -*/ -{ - register HNODE *p; /* search pointer/return from this function */ - - if (bucket<0) /* compute hash value if we don't know it already */ - bucket = do_hash(tab,key); - - /* search through the bucket contents */ - for (p=tab->buckets[bucket]; p; p=p->next) - if ((*(tab->cmp))(key,p->key)==0) - return p; /* found! */ + * Software distributed under the JOSL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the JOSL + * for the specific language governing rights and limitations under the + * JOSL. + * + * Copyrights + * + * Portions created by or assigned to Jabber.com, Inc. are + * Copyright (c) 1999-2002 Jabber.com, Inc. All Rights Reserved. Contact + * information for Jabber.com, Inc. is available at http://www.jabber.com/. + * + * Portions Copyright (c) 1998-1999 Jeremie Miller. + * + * Acknowledgements + * + * Special thanks to the Jabber Open Source Contributors for their + * suggestions and support of Jabber. + * + * Alternatively, the contents of this file may be used under the terms of the + * GNU General Public License Version 2 or later (the "GPL"), in which case + * the provisions of the GPL are applicable instead of those above. If you + * wish to allow use of your version of this file only under the terms of the + * GPL and not to allow others to use your version of this file under the JOSL, + * indicate your decision by deleting the provisions above and replace them + * with the notice and other provisions required by the GPL. If you do not + * delete the provisions above, a recipient may use your version of this file + * under either the JOSL or the GPL. + * + * + * --------------------------------------------------------------------------*/ - return NULL; /* not found */ +#include "lib.h" -} /* end find_node */ +/*** stubs that hook back to new xhash */ -static HASHTABLE_INTERNAL *handle2ptr( - HASHTABLE tbl) /* hash table handle */ -/* - handle2ptr converts a hash table handle into a pointer and checks its signatures - to make sure someone's not trying to pull a whizzer on this module. -*/ +HASHTABLE ghash_create(int buckets, KEYHASHFUNC hash, KEYCOMPAREFUNC cmp) { - register HASHTABLE_INTERNAL *rc = (HASHTABLE_INTERNAL *)tbl; - if ((rc->sig1==HASH_SIG1) && (rc->sig2==HASH_SIG2)) - return rc; /* signatures match */ - else - return NULL; /* yIkes! */ + return xhash_new(buckets); } -/***************************************************************************** - * External functions - */ - -HASHTABLE ghash_create(int buckets, KEYHASHFUNC hash, KEYCOMPAREFUNC cmp) -/* - Description: - Creates a new hash table. - - Input: - Parameters: - buckets - Number of buckets to allocate for the hash table; this value - should be a prime number for maximum efficiency. - hash - Key hash code function to use. - cmp - Key comparison function to use. - - Output: - Returns: - NULL - Table could not be allocated. - Other - Handle to the new hashtable. -*/ +HASHTABLE ghash_create_pool(pool p, int buckets, KEYHASHFUNC hash, KEYCOMPAREFUNC cmp) { - HASHTABLE_INTERNAL *tab; /* new table structure */ - char *allocated; - - if (!hash || !cmp) - return NULL; /* bogus! */ - - if (buckets<=0) - buckets = HASH_NUM_BUCKETS; - - /* allocate a hash table structure */ - allocated = malloc(sizeof(HASHTABLE_INTERNAL) + (buckets * sizeof(HNODE *))); - if (!allocated) - return NULL; /* memory error */ - - /* fill the fields of the hash table */ - tab = (HASHTABLE_INTERNAL *)allocated; - allocated += sizeof(HASHTABLE_INTERNAL); - memset(tab,0,sizeof(HASHTABLE_INTERNAL)); - memset(allocated,0,buckets * sizeof(HNODE *)); - tab->sig1 = HASH_SIG1; - tab->hash = hash; - tab->cmp = cmp; - tab->bcount = buckets; - tab->buckets = (HNODE **)allocated; - tab->sig2 = HASH_SIG2; - - return (HASHTABLE)tab; /* Qa'pla! */ - -} /* end ghash_create */ + xht h = xhash_new(buckets); + pool_cleanup(p, (pool_cleaner)xhash_free, h); + return h; +} void ghash_destroy(HASHTABLE tbl) -/* - Description: - Destroys a hash table. - - Input: - Parameters: - tbl - Table to be destroyed. - - Output: - Returns: - Nothing. -*/ { - HASHTABLE_INTERNAL *tab; /* new table structure */ - int i; /* loop counter */ - HNODE *p, *p2; /* temporary pointers */ - - if (!tbl) - return; /* bogus! */ - - /* Convert the handle to a table pointer. */ - tab = handle2ptr(tbl); - if (!tab) - return; - - /* Nuke the nodes it contains. */ - for (i=0; i<tab->bcount; i++) - { /* free the contents of each bucket */ - p = tab->buckets[i]; - while (p) - { /* free each node in turn */ - p2 = p->next; - free_node(p); - p = p2; - - } /* end while */ - - } /* end for */ - - free(tab); /* bye bye now! */ - -} /* end ghash_destroy */ + xhash_free(tbl); +} void *ghash_get(HASHTABLE tbl, const void *key) -/* - Description: - Retrieves a value stored in the hash table. - - Input: - Parameters: - tbl - The hash table to look in. - key - The key value to search on. - - Output: - Returns: - NULL - Value not found. - Other - Value corresponding to the specified key. -*/ { - HASHTABLE_INTERNAL *tab; /* internal table pointer */ - HNODE *node; /* hash node */ - void *rc = NULL; /* return from this function */ - - if (!tbl || !key) - return NULL; /* bogus! */ - - /* Convert the handle to a table pointer. */ - tab = handle2ptr(tbl); - if (!tab) - return NULL; /* error */ - - /* Attempt to find the node. */ - node = find_node(tab,key,-1); - if (node) - rc = node->value; /* found it! */ - - return rc; - -} /* end ghash_get */ + return xhash_get(tbl, key); +} int ghash_put(HASHTABLE tbl, const void *key, void *value) -/* - Description: - Associates a key with a value in this hash table. - - Input: - Parameters: - tbl - Hash table to add. - key - Key to use for the value in the table. - value - Value to add for this key. - - Output: - Returns: - 1 - Success. - 0 - Failure. - - Notes: - If the specified key is already in the hashtable, its value will be replaced. -*/ { - HASHTABLE_INTERNAL *tab; /* internal table pointer */ - int bucket; /* bucket value goes into */ - HNODE *node; /* hash node */ - int rc = 1; /* return from this function */ - - if (!tbl || !key || !value) - return 0; /* bogus! */ - - /* Convert the handle to a table pointer. */ - tab = handle2ptr(tbl); - if (!tab) - return 0; /* error */ - - - /* Compute the hash bucket and try to find an existing node. */ - bucket = do_hash(tab,key); - node = find_node(tab,key,bucket); - if (!node) - { /* OK, try to allocate a new node. */ - node = allocate_node(key,value); - if (node) - { /* Chain the new node into the hash table. */ - node->next = tab->buckets[bucket]; - tab->buckets[bucket] = node; - tab->count++; - - } /* end if */ - else /* allocation error */ - rc = 0; - - } /* end if */ - else /* already in table - just reassign value */ - node->value = value; - - return rc; - -} /* end ghash_put */ + xhash_put(tbl, key, value); + return 1; +} int ghash_remove(HASHTABLE tbl, const void *key) -/* - Description: - Removes an entry from a hash table, given its key. - - Input: - Parameters: - tbl - Hash table to remove from. - key - Key of value to remove. - - Output: - Returns: - 1 - Success. - 0 - Failure; key not present in hash table. -*/ { - HASHTABLE_INTERNAL *tab; /* internal table pointer */ - int bucket; /* bucket value goes into */ - HNODE *node; /* hash node */ - register HNODE *p; /* removal pointer */ - int rc = 1; /* return from this function */ - - if (!tbl || !key) - return 0; /* bogus! */ - - /* Convert the handle to a table pointer. */ - tab = handle2ptr(tbl); - if (!tab) - return 0; /* error */ - - - /* Compute the hash bucket and try to find an existing node. */ - bucket = do_hash(tab,key); - node = find_node(tab,key,bucket); - if (node) - { /* look to unchain it from the bucket it's in */ - if (node==tab->buckets[bucket]) - tab->buckets[bucket] = node->next; /* unchain at head */ - else - { /* unchain in middle of list */ - for (p=tab->buckets[bucket]; p->next!=node; p=p->next) ; - p->next = node->next; - - } /* end else */ - - free_node(node); /* bye bye now! */ - tab->count--; - - } /* end if */ - else /* node not found */ - rc = 0; - - return rc; + xhash_zap(tbl, key); + return 1; +} -} /* end ghash_remove */ int ghash_walk(HASHTABLE tbl, TABLEWALKFUNC func, void *user_data) -/* - Description: - "Walks" through a hash table, calling a callback function for each element - stored in it. - - Input: - Parameters: - tbl - Hash table to walk. - func - Function to be called for each node. It takes three parameters, - a user data pointer, a key value pointer, and a data value pointer. - It returns 0 to stop the enumeration or 1 to keep it going. - user_data - Value to use as the first parameter for the callback - function. - - Output: - Returns: - 0 - Error occurred. - Other - Number of nodes visited up to and including the one for which - the callback function returned 0, if it did; ranges from 1 - to the number of nodes in the hashtable. -*/ { - HASHTABLE_INTERNAL *tab; /* internal table pointer */ - int i; /* loop counter */ - int running = 1; /* we're still running */ - int count = 0; /* number of nodes visited before stop node */ - register HNODE *p, *p2; /* loop pointer */ - - if (!tbl || !func) - return -1; /* bogus values! */ - - /* Convert the handle to a table pointer. */ - tab = handle2ptr(tbl); - if (!tab) - return -1; /* error */ - - - for (i=0; running && (i<tab->bcount); i++) - { /* visit the contents of each bucket */ - p = tab->buckets[i]; - while (running && p) - { /* visit each node in turn */ - p2 = p->next; - count++; - running = (*func)(user_data,p->key,p->value); - p = p2; - - } /* end while */ + int i; + xhn n; + xht h = (xht)tbl; - } /* end for */ + for(i = 0; i < h->prime; i++) + for(n = &h->zen[i]; n != NULL; n = n->next) + if(n->key != NULL && n->val != NULL) + (*func)(user_data, n->key, n->val); - return count; + return 1; +} -} /* end ghash_walk */ +int _xhasher(const char *key); int str_hash_code(const char *s) -/* - Description: - Generates a hash code for a string. This function uses the ELF hashing - algorithm as reprinted in Andrew Binstock, "Hashing Rehashed," _Dr. - Dobb's Journal_, April 1996. - - Input: - Parameters: - s - The string to be hashed. - - Output: - Returns: - A hash code for the string. -*/ { - /* ELF hash uses unsigned chars and unsigned arithmetic for portability */ - const unsigned char *name = (const unsigned char *)s; - unsigned long h = 0, g; - - if (!name) - return 0; /* anti-NULL guard not in the original */ - - while (*name) - { /* do some fancy bitwanking on the string */ - h = (h << 4) + (unsigned long)(*name++); - if ((g = (h & 0xF0000000UL))!=0) - h ^= (g >> 24); - h &= ~g; - - } /* end while */ - - return (int)h; - + return _xhasher(s); } + Index: hashtable.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/hashtable.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- hashtable.c 31 Jul 2001 01:00:38 -0000 1.1 +++ hashtable.c 4 Apr 2002 03:04:57 -0000 1.2 @@ -17,15 +17,6 @@ Contributor(s): -Alternatively, the contents of this file may be used under the terms -of the GNU General Public License (the "GPL"), in which case the -provisions of the GPL are applicable instead of those above. If you -wish to allow use of your version of this file only under the terms of -the GPL and not to allow others to use your version of this file under -the MPL, indicate your decision by deleting the provisions above and -replace them with the notice and other provisions required by the -GPL. If you do not delete the provisions above, a recipient may use -your version of this file under either the MPL or the GPL. */ #include "xmldef.h" Index: jid.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jid.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- jid.c 31 Jul 2001 01:00:38 -0000 1.1 +++ jid.c 4 Apr 2002 03:04:57 -0000 1.2 @@ -1,27 +1,49 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. +/* -------------------------------------------------------------------------- * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * License * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * The contents of this file are subject to the Jabber Open Source License + * Version 1.0 (the "JOSL"). You may not copy or use this file, in either + * source code or executable form, except in compliance with the JOSL. You + * may obtain a copy of the JOSL at http://www.jabber.org/ or at + * http://www.opensource.org/. * - * Jabber - * Copyright (C) 1998-1999 The Jabber Team http://jabber.org/ - */ + * Software distributed under the JOSL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the JOSL + * for the specific language governing rights and lim... [truncated message content] |
From: Sean E. <sea...@us...> - 2002-04-04 00:59:18
|
Update of /cvsroot/gaim/gaim/src/protocols/toc In directory usw-pr-cvs1:/tmp/cvs-serv1582/src/protocols/toc Modified Files: toc.c Log Message: Fix to make toc file transfer work with Trillian. Don't use this. Index: toc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/toc/toc.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- toc.c 28 Mar 2002 18:22:49 -0000 1.46 +++ toc.c 4 Apr 2002 00:59:12 -0000 1.47 @@ -789,9 +789,9 @@ } else if (!strcasecmp(c, "RVOUS_PROPOSE")) { char *user, *uuid, *cookie; int seq; - char *rip, *pip, *vip; + char *rip, *pip, *vip, *trillian; int port; - + user = strtok(NULL, ":"); uuid = strtok(NULL, ":"); cookie = strtok(NULL, ":"); @@ -809,11 +809,16 @@ struct ft_request *ft; for (i = 0; i < 4; i++) { - sscanf(strtok(NULL, ":"), "%d", &unk[i]); + trillian = strtok(NULL, ":"); + sscanf(trillian, "%d", &unk[i]); if (unk[i] == 10001) break; - frombase64(strtok(NULL, ":"), &messages[i], NULL); + /* Trillian likes to send an empty token as a message, rather than + no message at all. */ + if (*(trillian + strlen(trillian) +1) != ':') + frombase64(strtok(NULL, ":"), &messages[i], NULL); } + frombase64(strtok(NULL, ":"), &tmp, NULL); subtype = tmp[1]; @@ -866,7 +871,10 @@ sscanf(strtok(NULL, ":"), "%d", unk + i); if (unk[i] == 10001) break; - frombase64(strtok(NULL, ":"), &messages[i], NULL); + /* Trillian likes to send an empty token as a message, rather than + no message at all. */ + if (*(trillian + strlen(trillian) +1) != ':') + frombase64(strtok(NULL, ":"), &messages[i], NULL); } frombase64(strtok(NULL, ":"), &tmp, NULL); |
From: Rob F. <rob...@us...> - 2002-04-03 14:26:25
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv6981 Modified Files: ChangeLog Log Message: Russian Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.439 retrieving revision 1.440 diff -u -d -r1.439 -r1.440 --- ChangeLog 3 Apr 2002 05:12:33 -0000 1.439 +++ ChangeLog 3 Apr 2002 14:26:18 -0000 1.440 @@ -3,6 +3,7 @@ version 0.56: * German translation update (Thanks Karsten Weiss) * Shell-like send history binded to Ctrl-Up and Ctrl-Down + * Russian Translation Updated (thanks Grigory Bakunov) version 0.55 (03/29/2002): * Jabber improvements (Thanks Jim Seymour) |
From: Rob F. <rob...@us...> - 2002-04-03 14:26:24
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv6981/po Modified Files: ru.po Log Message: Russian Index: ru.po =================================================================== RCS file: /cvsroot/gaim/gaim/po/ru.po,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ru.po 18 Mar 2002 03:43:57 -0000 1.7 +++ ru.po 3 Apr 2002 14:26:18 -0000 1.8 @@ -5,18 +5,46 @@ msgid "" msgstr "" "Project-Id-Version: gaim 0.48\n" -"POT-Creation-Date: 2002-03-14 22:24-0800\n" -"PO-Revision-Date: 2001-11-16 13:51+0400\n" -"Last-Translator: Sergey Volozhanin <sv...@as...>\n" +"POT-Creation-Date: 2002-03-22 13:20+0300\n" +"PO-Revision-Date: 2002-03-22 14:05+0300\n" +"Last-Translator: Grigory Bakunov <bl...@as...>\n" "Language-Team: RUSSIAN <RU...@li...>\n" "MIME-Version: 1.0\n" [...3339 lines suppressed...] -#~ msgstr "ðÒÉÓÏÅÄÉÎÅÎÉÅ Ë %s\n" - -#~ msgid "Send offline message" -#~ msgstr "ïÔÐÒÁ×ÉÔØ ÓÏÏÂÝÅÎÉÅ ÞÅÒÅÚ ÓÅÒ×ÅÒ" - -#~ msgid "" -#~ "\n" -#~ "\n" -#~ "IRC: #gaim on irc.openprojects.net" -#~ msgstr "" -#~ "\n" -#~ "\n" -#~ "IRC: #gaim on irc.openprojects.net" - -#~ msgid "Help!" -#~ msgstr "ðÏÍÏÝØ!" - -#~ msgid "Use aliases instead screen name" -#~ msgstr "÷ ÚÁËÌÁÄËÁÈ ÉÓÐÏÌØÚÀÔÓÑ ÐÓÅ×ÄÏÎÉÍÙ" +msgstr "âÏÌØÛÅ ÉÎÆÏÒÍÁÃÉÉ" |
From: Sean E. <sea...@us...> - 2002-04-03 07:23:06
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv7700/src Modified Files: server.c Log Message: Bugfix. Thanks, Dennis. Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.224 retrieving revision 1.225 diff -u -d -r1.224 -r1.225 --- server.c 17 Mar 2002 04:58:38 -0000 1.224 +++ server.c 3 Apr 2002 07:23:02 -0000 1.225 @@ -877,9 +877,10 @@ b->in_room = NULL; b->id = id; b->gc = gc; + b->send_history = g_list_append(NULL, NULL); b->history = g_string_new(""); g_snprintf(b->name, 80, "%s", name); - + if ((logging_options & OPT_LOG_ALL) || find_log_info(b->name)) { FILE *fd; char *filename; |
From: Rob F. <rob...@us...> - 2002-04-03 05:12:36
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv9409 Modified Files: ChangeLog Log Message: formatting Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.438 retrieving revision 1.439 diff -u -d -r1.438 -r1.439 --- ChangeLog 3 Apr 2002 03:02:02 -0000 1.438 +++ ChangeLog 3 Apr 2002 05:12:33 -0000 1.439 @@ -3,6 +3,7 @@ version 0.56: * German translation update (Thanks Karsten Weiss) * Shell-like send history binded to Ctrl-Up and Ctrl-Down + version 0.55 (03/29/2002): * Jabber improvements (Thanks Jim Seymour) * Various sound cleanups (Thanks Robert McQueen) |
From: Sean E. <sea...@us...> - 2002-04-03 03:02:15
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv16191 Modified Files: ChangeLog Log Message: Send History Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.437 retrieving revision 1.438 diff -u -d -r1.437 -r1.438 --- ChangeLog 31 Mar 2002 15:13:12 -0000 1.437 +++ ChangeLog 3 Apr 2002 03:02:02 -0000 1.438 @@ -2,7 +2,7 @@ version 0.56: * German translation update (Thanks Karsten Weiss) - + * Shell-like send history binded to Ctrl-Up and Ctrl-Down version 0.55 (03/29/2002): * Jabber improvements (Thanks Jim Seymour) * Various sound cleanups (Thanks Robert McQueen) |
From: Sean E. <sea...@us...> - 2002-04-03 03:02:15
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv16191/src Modified Files: conversation.c ui.h Log Message: Send History Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.346 retrieving revision 1.347 diff -u -d -r1.346 -r1.347 --- conversation.c 28 Mar 2002 17:44:48 -0000 1.346 +++ conversation.c 3 Apr 2002 03:02:02 -0000 1.347 @@ -183,6 +183,7 @@ if (connections) c->gc = (struct gaim_connection *)connections->data; c->history = g_string_new(""); + c->send_history = g_list_append(NULL, NULL); conversations = g_list_append(conversations, c); show_conv(c); update_icon(c); @@ -270,6 +271,13 @@ if (c->save_icon) gtk_widget_destroy(c->save_icon); #endif + c->send_history = g_list_first(c->send_history); + while (c->send_history) { + if (c->send_history->data) + g_free(c->send_history->data); + c->send_history = c->send_history->next; + } + g_list_free(c->send_history); if (c->typing_timeout) gtk_timeout_remove(c->typing_timeout); g_string_free(c->history, TRUE); @@ -841,6 +849,44 @@ if (oldpos == pos) gtk_editable_set_position(GTK_EDITABLE(entry), pos + 1); } else if (event->state & GDK_CONTROL_MASK) { + int pos = 0; + switch (event->keyval) { + case GDK_Up: + debug_printf("YOU HIT UP!\n"); + if (!c->send_history) + break; + debug_printf("history exists\n"); + if (!c->send_history->prev) { + debug_printf("at curent\n"); + if (c->send_history->data) + g_free(c->send_history->data); + c->send_history->data = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); + } + if (c->send_history->next && c->send_history->next->data) { + debug_printf("going to ->next\n"); + c->send_history = c->send_history->next; + gtk_editable_delete_text (GTK_EDITABLE(entry),0,-1); + gtk_editable_insert_text(GTK_EDITABLE(entry), + c->send_history->data, + strlen(c->send_history->data), + &pos); + } + + break; + case GDK_Down: + if (!c->send_history) + break; + if (c->send_history->prev) { + c->send_history = c->send_history->prev; + if (c->send_history->data) { + gtk_editable_delete_text (GTK_EDITABLE(entry),0,-1); + gtk_editable_insert_text (GTK_EDITABLE(entry), c->send_history->data, + strlen(c->send_history->data), &pos); + + } + } + break; + } if (convo_options & OPT_CONVO_CTL_CHARS) { switch (event->keyval) { case 'i': @@ -1003,6 +1049,7 @@ int limit; gulong length=0; int err = 0; + GList *first; if (!c->gc) return; @@ -1018,6 +1065,12 @@ return; } + first = g_list_first(c->send_history); + if (first->data) + g_free(first->data); + first->data = g_strdup(buf); + c->send_history = g_list_prepend(first, NULL); + buf2 = g_malloc(limit); if (c->gc->flags & OPT_CONN_HTML) { Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- ui.h 14 Mar 2002 07:44:43 -0000 1.33 +++ ui.h 3 Apr 2002 03:02:02 -0000 1.34 @@ -138,6 +138,7 @@ GdkColor fgcol; int hasfg; + GList *send_history; GString *history; GtkWidget *send; |
From: Sean E. <sea...@us...> - 2002-04-02 01:04:39
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv3632/src/protocols/msn Modified Files: msn.c Log Message: A nice little msn fix by Gerd Behrmann Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- msn.c 31 Mar 2002 01:51:35 -0000 1.68 +++ msn.c 2 Apr 2002 01:04:35 -0000 1.69 @@ -947,6 +947,7 @@ } else if (!g_strcasecmp(which, "BL") && pos) { gc->deny = g_slist_append(gc->deny, g_strdup(who)); } else if (!g_strcasecmp(which, "RL")) { + if (pos) { while(perm) { if(!g_strcasecmp(perm->data, who)) new = 0; @@ -967,6 +968,7 @@ g_snprintf(msg, sizeof(msg), "The user %s (%s) wants to add you to their buddy list",ap->user, url_decode(ap->friend)); do_ask_dialog(msg, ap, msn_accept_add, msn_cancel_add); } + } if (pos != tot) return 1; /* this isn't the last one in the RL, so return. */ |
From: Rob F. <rob...@us...> - 2002-03-31 15:13:18
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv23094/po Modified Files: de.po Log Message: German update Index: de.po =================================================================== RCS file: /cvsroot/gaim/gaim/po/de.po,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- de.po 18 Mar 2002 03:43:56 -0000 1.33 +++ de.po 31 Mar 2002 15:13:12 -0000 1.34 @@ -15,14 +15,42 @@ msgid "" msgstr "" "Project-Id-Version: Gaim 0.9.19\n" -"POT-Creation-Date: 2002-03-14 22:24-0800\n" -"PO-Revision-Date: 2002-01-30 22:42+0100\n" +"POT-Creation-Date: 2002-03-31 10:52+0200\n" +"PO-Revision-Date: 2002-03-31 11:29+0200\n" "Last-Translator: Karsten Weiss <kn...@gm...>\n" "Language-Team: de <de...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" [...3231 lines suppressed...] -#~ "IRC: #gaim auf irc.openprojects.net" - -#~ msgid "" -#~ "Rob Flynn (maintainer) ro...@ma...\n" -#~ "Eric Warmenhoven war...@ya...\n" -#~ "\n" -#~ "Benjamin Miller\n" -#~ "Decklin Foster\n" -#~ "Sean Egan\n" -#~ "Jim Duchek\n" -#~ "Mark Spencer (original author) mar...@ma..." -#~ msgstr "" -#~ "Rob Flynn (Maintainer) ro...@ma...\n" -#~ "Eric Warmenhoven war...@ya...\n" -#~ "\n" -#~ "Benjamin Miller\n" -#~ "Decklin Foster\n" -#~ "Sean Egan\n" -#~ "Jim Duchek\n" -#~ "Mark Spencer (Ursprünglicher Autor) mar...@ma..." |
From: Rob F. <rob...@us...> - 2002-03-31 15:13:18
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv23094 Modified Files: ChangeLog Log Message: German update Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.436 retrieving revision 1.437 diff -u -d -r1.436 -r1.437 --- ChangeLog 30 Mar 2002 05:22:15 -0000 1.436 +++ ChangeLog 31 Mar 2002 15:13:12 -0000 1.437 @@ -1,6 +1,7 @@ Gaim: The Pimpin' Penguin IM Clone thats good for the soul! version 0.56: + * German translation update (Thanks Karsten Weiss) version 0.55 (03/29/2002): * Jabber improvements (Thanks Jim Seymour) |
From: Sean E. <sea...@us...> - 2002-03-31 01:51:39
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv31525/src/protocols/msn Modified Files: msn.c Log Message: typo. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- msn.c 31 Mar 2002 01:38:42 -0000 1.67 +++ msn.c 31 Mar 2002 01:51:35 -0000 1.68 @@ -763,7 +763,7 @@ char buf[MSN_BUF_LEN]; if (*(map->user)) { - g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trID, map->user, url_encode(map->friend)); + g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trId, map->user, url_encode(map->friend)); if (msn_write(md->fd, buf, strlen(buf)) < 0) { hide_login_progress(map->gc, "Write error"); signoff(map->gc); |
From: Sean E. <sea...@us...> - 2002-03-31 01:38:46
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv29362/src/protocols/msn Modified Files: msn.c Log Message: This should be good. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- msn.c 30 Mar 2002 20:31:26 -0000 1.66 +++ msn.c 31 Mar 2002 01:38:42 -0000 1.67 @@ -751,12 +751,28 @@ signoff(map->gc); return; } + map->gc->permit = g_slist_append(map->gc->permit, map->user); build_allow_list(); /* er. right. we'll need to have a thing for this in CUI too */ show_got_added(map->gc, NULL, map->user, map->friend, NULL); + *(map->user) = 0; } static void msn_cancel_add(gpointer w, struct msn_add_permit *map) { + struct msn_data *md = map->gc->proto_data; + char buf[MSN_BUF_LEN]; + + if (*(map->user)) { + g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trID, map->user, url_encode(map->friend)); + if (msn_write(md->fd, buf, strlen(buf)) < 0) { + hide_login_progress(map->gc, "Write error"); + signoff(map->gc); + return; + } + map->gc->deny = g_slist_append(map->gc->deny, map->user); + build_block_list(); + } + g_free(map->user); g_free(map->friend); g_free(map); |
From: Sean E. <sea...@us...> - 2002-03-30 20:31:33
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv28317/src/protocols/msn Modified Files: msn.c Log Message: MSN fix by Jason Willis. Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- msn.c 17 Mar 2002 20:23:33 -0000 1.65 +++ msn.c 30 Mar 2002 20:31:26 -0000 1.66 @@ -1995,7 +1995,7 @@ t = g_slist_append(t, who); continue; } - g_snprintf(buf, sizeof(buf), "ADD %d AL %s %s\r\n", ++md->trId, who, who); + g_snprintf(buf, sizeof(buf), "ADD %d BL %s %s\r\n", ++md->trId, who, who); if (msn_write(md->fd, buf, strlen(buf)) < 0) { hide_login_progress(gc, "Write error"); signoff(gc); |
From: Eric W. <war...@us...> - 2002-03-30 10:22:33
|
Update of /cvsroot/gaim/gaim/doc In directory usw-pr-cvs1:/tmp/cvs-serv9268/doc Modified Files: CREDITS FAQ gaim.1 Log Message: "God I'm stoned." -- "Kermit the Frog" "God I'm drunk." -- Eric Warmenhoven Index: CREDITS =================================================================== RCS file: /cvsroot/gaim/gaim/doc/CREDITS,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- CREDITS 18 Mar 2002 03:43:57 -0000 1.35 +++ CREDITS 30 Mar 2002 10:22:29 -0000 1.36 @@ -7,7 +7,7 @@ Rob Flynn <IM: RobFlynn> rf...@bl... Syd Logan Jim Duchek <IM: zilding> jim...@ou... -Eric Warmenhoven war...@ya... +Eric Warmenhoven er...@wa... Mark Spencer <IM: markster97> mar...@ma... Sean Egan <IM: SeanEgn> bj...@bi... Index: FAQ =================================================================== RCS file: /cvsroot/gaim/gaim/doc/FAQ,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- FAQ 18 Oct 2001 12:12:36 -0000 1.19 +++ FAQ 30 Mar 2002 10:22:29 -0000 1.20 @@ -317,7 +317,7 @@ 6.3 I have money. I need software written. Can you help? -Oh yes. Our email addresses are war...@ya... (EWarmenhoven) and +Oh yes. Our email addresses are bj...@bi... (SeanEgn) and ro...@ma... (RobFlynn). 6.4 I have hardware here that's not being used. Can you use it? Index: gaim.1 =================================================================== RCS file: /cvsroot/gaim/gaim/doc/gaim.1,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- gaim.1 30 Mar 2002 05:22:15 -0000 1.50 +++ gaim.1 30 Mar 2002 10:22:29 -0000 1.51 @@ -375,7 +375,7 @@ .PP Jim Duchek <ji...@li...> \- AIM: Zilding .br - Eric Warmenhoven <war...@ya...> + Eric Warmenhoven <er...@wa...> .br Mark Spencer <mar...@ma...> \- AIM: Markster97 |
From: Eric W. <war...@us...> - 2002-03-30 10:22:33
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv9268 Modified Files: README Log Message: "God I'm stoned." -- "Kermit the Frog" "God I'm drunk." -- Eric Warmenhoven Index: README =================================================================== RCS file: /cvsroot/gaim/gaim/README,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- README 26 Jan 2002 09:49:15 -0000 1.27 +++ README 30 Mar 2002 10:22:29 -0000 1.28 @@ -3,7 +3,7 @@ Rob Flynn <ro...@ma...> IM: RobFlynn (currnet maintainer) Syd Logan - Super Hacker and Resident Designated Driver Jim Duchek <jim...@ou...> IM: Zilding (former maintainer) -Eric Warmenhoven <war...@ya...> (retired) +Eric Warmenhoven <er...@wa...> (retired) Mark Spencer <mar...@ma...> Gaim is an IM client that supports many protocols, including AIM, ICQ, |
From: Eric W. <war...@us...> - 2002-03-30 10:10:31
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv6936 Modified Files: AUTHORS Log Message: woo! i'm drunk. this is the third commit message i've typed. maybe i won't delete this one. Index: AUTHORS =================================================================== RCS file: /cvsroot/gaim/gaim/AUTHORS,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- AUTHORS 3 Mar 2002 05:44:32 -0000 1.19 +++ AUTHORS 30 Mar 2002 10:10:27 -0000 1.20 @@ -30,4 +30,5 @@ -------- Jim Duchek <jim...@ou...> - Former Maintainer Mark Spencer <mar...@ma...> - Original Author -Eric Warmenhoven <war...@ya...> +Eric Warmenhoven <er...@wa...> +Adam Fritzler |
From: Rob F. <rob...@us...> - 2002-03-30 05:22:18
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv28384 Modified Files: ChangeLog NEWS configure.ac Log Message: 0.56 Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.435 retrieving revision 1.436 diff -u -d -r1.435 -r1.436 --- ChangeLog 29 Mar 2002 20:15:05 -0000 1.435 +++ ChangeLog 30 Mar 2002 05:22:15 -0000 1.436 @@ -1,5 +1,7 @@ Gaim: The Pimpin' Penguin IM Clone thats good for the soul! +version 0.56: + version 0.55 (03/29/2002): * Jabber improvements (Thanks Jim Seymour) * Various sound cleanups (Thanks Robert McQueen) Index: NEWS =================================================================== RCS file: /cvsroot/gaim/gaim/NEWS,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- NEWS 29 Mar 2002 20:15:05 -0000 1.122 +++ NEWS 30 Mar 2002 05:22:15 -0000 1.123 @@ -1,5 +1,7 @@ -=[ Gaim ]=- The Pimpin' Penguin AIM Clone That's Good For The Soul! +0.56: + 0.55 (03/29/2002): Rob: 0.55 is here. I've been away for a few days on business. Sean has been on Spring Break. Therefore, this release is mostly a patch Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- configure.ac 15 Mar 2002 04:47:58 -0000 1.49 +++ configure.ac 30 Mar 2002 05:22:15 -0000 1.50 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/aim.c) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE([gaim], [0.55]) +AM_INIT_AUTOMAKE([gaim], [0.56]) AC_PATH_PROG(sedpath, sed) |