Changeset c6ca3ee


Ignore:
Timestamp:
2010-03-14T17:49:24Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
fb00989
Parents:
6a78c0e
Message:

Some const/etc cleanups submitted by domen@… back in bug #431.

Files:
11 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.h

    r6a78c0e rc6ca3ee  
    2727#define _BITLBEE_H
    2828
     29#ifndef _GNU_SOURCE
    2930#define _GNU_SOURCE /* Stupid GNU :-P */
     31#endif
    3032
    3133/* Depend on Windows 2000 for now since we need getaddrinfo() */
  • configure

    r6a78c0e rc6ca3ee  
    156156
    157157echo CFLAGS=$CFLAGS >> Makefile.settings
    158 echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
     158echo CFLAGS+=-I`pwd` -iquote`pwd`/lib -iquote`pwd`/protocols -I. >> Makefile.settings
    159159
    160160echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
  • lib/misc.c

    r6a78c0e rc6ca3ee  
    3434#include "nogaim.h"
    3535#include "base64.h"
     36#include "md5.h"
    3637#include <stdio.h>
    3738#include <stdlib.h>
     
    521522
    522523/* Word wrapping. Yes, I know this isn't UTF-8 clean. I'm willing to take the risk. */
    523 char *word_wrap( char *msg, int line_len )
     524char *word_wrap( const char *msg, int line_len )
    524525{
    525526        GString *ret = g_string_sized_new( strlen( msg ) + 16 );
  • lib/misc.h

    r6a78c0e rc6ca3ee  
    6262G_MODULE_EXPORT struct ns_srv_reply *srv_lookup( char *service, char *protocol, char *domain );
    6363
    64 G_MODULE_EXPORT char *word_wrap( char *msg, int line_len );
     64G_MODULE_EXPORT char *word_wrap( const char *msg, int line_len );
    6565
    6666G_MODULE_EXPORT gboolean ssl_sockerr_again( void *ssl );
  • protocols/jabber/jabber.h

    r6a78c0e rc6ca3ee  
    2929#include "xmltree.h"
    3030#include "bitlbee.h"
     31#include "md5.h"
    3132
    3233extern GSList *jabber_connections;
  • protocols/msn/msn.c

    r6a78c0e rc6ca3ee  
    2626#include "nogaim.h"
    2727#include "msn.h"
     28
     29int msn_chat_id;
     30GSList *msn_connections;
     31GSList *msn_switchboards;
    2832
    2933static char *msn_set_display_name( set_t *set, char *value );
  • protocols/msn/msn.h

    r6a78c0e rc6ca3ee  
    133133#define STATUS_SB_CHAT_SPARE    8       /* Same, but also for groupchats (not used yet). */
    134134
    135 int msn_chat_id;
     135extern int msn_chat_id;
    136136extern const struct msn_away_state msn_away_state_list[];
    137137extern const struct msn_status_code msn_status_code_list[];
     
    142142   connection), the callback should check whether it's still listed here
    143143   before doing *anything* else. */
    144 GSList *msn_connections;
    145 GSList *msn_switchboards;
     144extern GSList *msn_connections;
     145extern GSList *msn_switchboards;
    146146
    147147/* ns.c */
  • protocols/nogaim.c

    r6a78c0e rc6ca3ee  
    352352/* list.c */
    353353
    354 void imcb_add_buddy( struct im_connection *ic, char *handle, char *group )
     354void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group )
    355355{
    356356        user_t *u;
     
    426426}
    427427
    428 void imcb_rename_buddy( struct im_connection *ic, char *handle, char *realname )
     428void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname )
    429429{
    430430        user_t *u = user_findhandle( ic, handle );
     
    443443}
    444444
    445 void imcb_remove_buddy( struct im_connection *ic, char *handle, char *group )
     445void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group )
    446446{
    447447        user_t *u;
     
    628628}
    629629
    630 void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at )
     630void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at )
    631631{
    632632        irc_t *irc = ic->irc;
     
    695695}
    696696
    697 struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle )
     697struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle )
    698698{
    699699        struct groupchat *c;
     
    761761}
    762762
    763 void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at )
     763void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at )
    764764{
    765765        struct im_connection *ic = c->ic;
     
    833833/* buddy_chat.c */
    834834
    835 void imcb_chat_add_buddy( struct groupchat *b, char *handle )
     835void imcb_chat_add_buddy( struct groupchat *b, const char *handle )
    836836{
    837837        user_t *u = user_findhandle( b->ic, handle );
     
    868868
    869869/* This function is one BIG hack... :-( EREWRITE */
    870 void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason )
     870void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason )
    871871{
    872872        user_t *u;
  • protocols/nogaim.h

    r6a78c0e rc6ca3ee  
    4343#include "proxy.h"
    4444#include "query.h"
    45 #include "md5.h"
    4645
    4746#define BUDDY_ALIAS_MAXLEN 388   /* because MSN names can be 387 characters */
     
    264263 * user, usually after a login, or if the user added a buddy and the IM
    265264 * server confirms that the add was successful. Don't forget to do this! */
    266 G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, char *handle, char *group );
    267 G_MODULE_EXPORT void imcb_remove_buddy( struct im_connection *ic, char *handle, char *group );
     265G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group );
     266G_MODULE_EXPORT void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group );
    268267G_MODULE_EXPORT struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle );
    269 G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, char *handle, char *realname );
     268G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname );
    270269G_MODULE_EXPORT void imcb_buddy_nick_hint( struct im_connection *ic, char *handle, char *nick );
    271270
     
    278277/* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle );
    279278/* Call when a handle says something. 'flags' and 'sent_at may be just 0. */
    280 G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at );
     279G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at );
    281280G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags );
    282281G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle );
     
    290289 *   the user her/himself. At that point the group chat will be visible to the
    291290 *   user, too. */
    292 G_MODULE_EXPORT struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle );
    293 G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, char *handle );
     291G_MODULE_EXPORT struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle );
     292G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, const char *handle );
    294293/* To remove a handle from a group chat. Reason can be NULL. */
    295 G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason );
     294G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason );
    296295/* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */
    297 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at );
     296G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at );
    298297/* System messages specific to a groupchat, so they can be displayed in the right context. */
    299298G_MODULE_EXPORT void imcb_chat_log( struct groupchat *c, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
  • user.c

    r6a78c0e rc6ca3ee  
    141141}
    142142
    143 user_t *user_findhandle( struct im_connection *ic, char *handle )
     143user_t *user_findhandle( struct im_connection *ic, const char *handle )
    144144{
    145145        user_t *u;
  • user.h

    r6a78c0e rc6ca3ee  
    5656int user_del( irc_t *irc, char *nick );
    5757G_MODULE_EXPORT user_t *user_find( irc_t *irc, char *nick );
    58 G_MODULE_EXPORT user_t *user_findhandle( struct im_connection *ic, char *handle );
     58G_MODULE_EXPORT user_t *user_findhandle( struct im_connection *ic, const char *handle );
    5959void user_rename( irc_t *irc, char *oldnick, char *newnick );
    6060
Note: See TracChangeset for help on using the changeset viewer.