Update of /cvsroot/gaim/gaim/src/protocols/napster
In directory sc8-pr-cvs1:/tmp/cvs-serv4102/src/protocols/napster
Modified Files:
napster.c
Log Message:
This patch is Sofar's (Auke Kok) napster update warmenhovinated by me.
So... the Napster PRPL works with Opennap servers now.
Thanks Auke.
There are a few places that still need a bit of work. Namely joining
and parting chats. I don't have time to look at it right now, but
search for XXX and // and you'll see the stuff that is relevant to it,
if anyone wants to fix the memleak or two.
For any potential Gaim hackers out there, a few notes:
-Put all declarations at the top of a block--we're not all using C99
-Please don't use // comments, use /* */ (// is for C)
-Try to use dynamic buffers rather than static buffers in most places.
I think most of us Gaim people perfer dynamic rather than static.
I wish oscar.c was this short. Or this clean.
Index: napster.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/napster/napster.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- napster.c 26 Apr 2003 20:30:36 -0000 1.44
+++ napster.c 15 May 2003 21:43:42 -0000 1.45
@@ -50,8 +50,6 @@
/* for win32 compatability */
G_MODULE_IMPORT GSList *connections;
-#define NAP_BUF_LEN 4096
-
#define USEROPT_NAPSERVER 3
#define NAP_SERVER "64.124.41.187"
#define USEROPT_NAPPORT 4
@@ -68,51 +66,21 @@
struct nap_data {
[...990 lines suppressed...]
-static void
-__init_plugin(GaimPlugin *plugin)
+static void __init_plugin(GaimPlugin *plugin)
{
struct proto_user_opt *puo;
puo = g_new0(struct proto_user_opt, 1);
- puo->label = g_strdup("Server");
+ puo->label = g_strdup(_("Server"));
puo->def = g_strdup(NAP_SERVER);
puo->pos = USEROPT_NAPSERVER;
prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo);
puo = g_new0(struct proto_user_opt, 1);
- puo->label = g_strdup("Port:");
+ puo->label = g_strdup(_("Port:"));
puo->def = g_strdup("8888");
puo->pos = USEROPT_NAPPORT;
prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo);
|