ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src util.c,1.37,1.38 value_pair.c,1.8,1.9 val


From: Philip S Tellis <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src util.c,1.37,1.38 value_pair.c,1.8,1.9 value_pair.h,1.5,1.6 service.h,1.18,1.19 nomodule.c,1.10,1.11
Date: Fri, 31 Jan 2003 08:30:43 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv15650/src

Modified Files:
        util.c value_pair.c value_pair.h service.h nomodule.c 
Log Message:
make some service args const

Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- util.c      31 Jan 2003 07:29:19 -0000      1.37
+++ util.c      31 Jan 2003 13:30:41 -0000      1.38
@@ -1178,6 +1178,9 @@
        LList *l = NULL;
        struct contact *con;
        
+       if(!strcmp(c->nick, newname))
+               return;
+
        eb_debug(DBG_CORE,"Renaming %s to %s\n",c->nick, newname);
        con = find_contact_in_group_by_nick(newname, c->group);
        if(con) {

Index: value_pair.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/value_pair.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- value_pair.c        29 Jan 2003 19:19:23 -0000      1.8
+++ value_pair.c        31 Jan 2003 13:30:41 -0000      1.9
@@ -26,7 +26,7 @@
 #include "value_pair.h"
 #include "util.h"
 
-char * value_pair_get_value( LList * pairs, char * key )
+char * value_pair_get_value( LList * pairs, const char * key )
 {
        LList * node;
        for( node = pairs; node; node=node->next) {
@@ -61,7 +61,7 @@
        }
 }
 
-LList * value_pair_add(LList * list, char * key, char * value)
+LList * value_pair_add(LList * list, const char * key, const char * value)
 {
        char * tmp = escape_string(value);
        value_pair * vp;
@@ -76,7 +76,7 @@
        return l_list_append(list, vp);
 }
 
-LList * value_pair_remove( LList *pairs, char *key )
+LList * value_pair_remove( LList *pairs, const char *key )
 {
        LList * node;
        for( node = pairs; node; node=node->next) {

Index: value_pair.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/value_pair.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- value_pair.h        29 Jan 2003 19:19:23 -0000      1.5
+++ value_pair.h        31 Jan 2003 13:30:41 -0000      1.6
@@ -41,12 +41,12 @@
 extern "C" {
 #endif
 
-char * value_pair_get_value( LList * pairs, char * key );
+char * value_pair_get_value( LList * pairs, const char * key );
 void value_pair_print_values( LList * pairs, FILE * file, int indent );
 void value_pair_free( LList * pairs );
 LList * value_pair_update(LList * pairs, LList * new_list);
-LList * value_pair_add(LList * list, char * key, char * value); 
-LList * value_pair_remove(LList * list, char * key); 
+LList * value_pair_add(LList * list, const char * key, const char * value); 
+LList * value_pair_remove(LList * list, const char * key); 
 
 #ifdef __cplusplus
 } /* extern "C" */

Index: service.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/service.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- service.h   29 Jan 2003 19:19:23 -0000      1.18
+++ service.h   31 Jan 2003 13:30:41 -0000      1.19
@@ -35,8 +35,9 @@
 
 
 extern int NUM_SERVICES;
-#define GET_SERVICE(x) eb_services[x->service_id]
-#define RUN_SERVICE(x) GET_SERVICE(x).sc
+#define GET_SERVICE(x) eb_services[x->service_id]
+#define RUN_SERVICE(x) GET_SERVICE(x).sc
+#define CAN(x, service)        (RUN_SERVICE(x)->service != NULL)
 
 struct service_callbacks {
        /*callback to determine if remote account is online*/
@@ -97,29 +98,29 @@
        void (*ignore_user)(eb_account * account);
 
        /*Notifies the service that the user is no longer ignored*/
-       void (*unignore_user)(eb_account * account, char *new_group);
+       void (*unignore_user)(eb_account * account, const char *new_group);
 
        /*Notifies the service that a user's contact/nick name has changed */
-       void (*change_user_name)(eb_account * account, char * name);
+       void (*change_user_name)(eb_account * account, const char * name);
 
        /*Notifies the service that an account's group has changed
          can be used to inform the server of the group change.
          Can be NULL if not implemented*/
-       void (*change_group)(eb_account * account, char *new_group);
+       void (*change_group)(eb_account * account, const char *new_group);
 
        /* deletes group on server 
           unspecified results if called with a non-empty group ! */
-       void (*del_group)(char *group);
+       void (*del_group)(const char *group);
        
-       void (*add_group)(char *group);
+       void (*add_group)(const char *group);
        
-       void (*rename_group)(char *old_group, char *new_group);
+       void (*rename_group)(const char *old_group, const char *new_group);
 
        /*Informs the service of an account that it needs to manage*/
        int (*is_suitable)(eb_local_account *local, eb_account *remote);
 
        /*Creates a new account*/
-       eb_account*(*new_account)( char * account );
+       eb_account*(*new_account)( const char * account );
 
        /*This returns the string representing the status,
          this will get used on the Contact List, if statuses

Index: nomodule.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/nomodule.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- nomodule.c  29 Jan 2003 19:19:23 -0000      1.10
+++ nomodule.c  31 Jan 2003 13:30:41 -0000      1.11
@@ -46,16 +46,16 @@
 struct service SERVICE_INFO = { NULL, -1, FALSE, FALSE, FALSE, FALSE, NULL };
 
 struct eb_nomodule_account_data {
-       gint status;
-       gint logged_in_time;
-       gint evil;
+       int status;
+       int logged_in_time;
+       int evil;
 };
 
 struct eb_nomodule_local_account_data {
        char password[255];
        int input;
        int keep_alive;
-       gint status;
+       int status;
 };
 
 enum
@@ -67,14 +67,14 @@
 
 /*   callbacks used by Ayttm    */
 
-/*static gint pixmaps = 0;
+/*static int pixmaps = 0;
 static GdkPixmap * eb_nomodule_pixmap[NOMODULE_OFFLINE+1];
 static GdkBitmap * eb_nomodule_bitmap[NOMODULE_OFFLINE+1];
 
 static void eb_nomodule_init_pixmaps()
 {
-       gint i = NOMODULE_OFFLINE;
-       gchar ** xpm;
+       int i = NOMODULE_OFFLINE;
+       char ** xpm;
 
        xpm = nomodule_away_xpm;
        eb_nomodule_pixmap[i] = 
gdk_pixmap_create_from_xpm_d(statuswindow->window,
@@ -101,7 +101,7 @@
 
 static void eb_nomodule_send_im( eb_local_account * account_from,
                                  eb_account * account_to,
-                                 gchar * message )
+                                 char * message )
 {
        return;
 }
@@ -187,12 +187,12 @@
        return NULL;
 }
 
-static gint eb_nomodule_get_current_state(eb_local_account * account )
+static int eb_nomodule_get_current_state(eb_local_account * account )
 {
        return 0;
 }
 
-static void eb_nomodule_set_current_state( eb_local_account * account, gint 
state )
+static void eb_nomodule_set_current_state( eb_local_account * account, int 
state )
 {
        return;
 }
@@ -207,14 +207,14 @@
        return;
 }
 
-static eb_account * eb_nomodule_new_account( gchar * account )
+static eb_account * eb_nomodule_new_account( const char * account )
 {
        return NULL;
 }
 
-static gchar * eb_nomodule_get_status_string( eb_account * account )
+static char * eb_nomodule_get_status_string( eb_account * account )
 {
-       static gchar string[255];
+       static char string[255];
 
        g_snprintf(string, 255, _("(Offline)"));                
 
@@ -228,12 +228,12 @@
        return nomodule_away_xpm;
 }
 
-static void eb_nomodule_set_idle( eb_local_account * ela, gint idle )
+static void eb_nomodule_set_idle( eb_local_account * ela, int idle )
 {
        return;
 }
 
-static void eb_nomodule_set_away(eb_local_account * account, gchar * message)
+static void eb_nomodule_set_away(eb_local_account * account, char * message)
 {
        return;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]