Changeset a3a3778
- Timestamp:
- 2006-12-22T17:17:08Z (18 years ago)
- Branches:
- master
- Children:
- 5c5a586, 9225e08
- Parents:
- 55078f5 (diff), bd28e6a (diff), a51be64 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 3 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
.bzrignore
r55078f5 ra3a3778 13 13 .gdb_history 14 14 tests/check 15 *.gcda 16 *.gcov 17 *.gcno 18 *.o -
Makefile
r55078f5 ra3a3778 40 40 clean: $(subdirs) 41 41 rm -f *.o $(OUTFILE) core utils/bitlbeed encode decode 42 $(MAKE) -C tests clean 42 43 43 44 distclean: clean $(subdirs) 44 45 rm -f Makefile.settings config.h bitlbee.pc 45 46 find . -name 'DEADJOE' -o -name '*.orig' -o -name '*.rej' -o -name '*~' -exec rm -f {} \; 47 $(MAKE) -C test distclean 46 48 47 check: 49 check: all 48 50 $(MAKE) -C tests 51 52 gcov: check 53 gcov *.c 49 54 50 55 install-doc: -
configure
r55078f5 ra3a3778 28 28 debug=0 29 29 strip=1 30 gcov=0 30 31 ipv6=1 31 32 … … 67 68 --debug=0/1 Disable/enable debugging $debug 68 69 --strip=0/1 Disable/enable binary stripping $strip 70 --gcov=0/1 Disable/enable test coverage reporting $gcov 69 71 70 72 --ipv6=0/1 IPv6 socket support $ipv6 … … 366 368 fi 367 369 370 if [ "$gcov" = "1" ]; then 371 echo "CFLAGS+=-ftest-coverage -fprofile-arcs" >> Makefile.settings 372 echo "EFLAGS+=-lgcov" >> Makefile.settings 373 fi 374 368 375 echo 369 376 if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then -
doc/user-guide/docbook.xsl
r55078f5 ra3a3778 83 83 84 84 <xsl:template name="cmd"> 85 <xsl:param name="prefix"/> 85 86 <xsl:variable name="thiscmd"><xsl:value-of select="$prefix"/><xsl:value-of select="@name"/></xsl:variable> 86 87 <xsl:attribute name="id"> -
doc/user-guide/help.xsl
r55078f5 ra3a3778 31 31 32 32 <xsl:template name="subject"> 33 <xsl:param name="id"/> 33 34 <xsl:message><xsl:text>Processing: </xsl:text><xsl:value-of select="$id"/></xsl:message> 34 35 <xsl:text>?</xsl:text><xsl:value-of select="$id"/><xsl:text> </xsl:text> … … 122 123 123 124 <xsl:template name="cmd"> 125 <xsl:param name="prefix"/> 124 126 <xsl:variable name="thiscmd"><xsl:value-of select="$prefix"/><xsl:value-of select="@name"/></xsl:variable> 125 127 <xsl:message><xsl:text>Processing command '</xsl:text><xsl:value-of select="$thiscmd"/><xsl:text>'</xsl:text></xsl:message> -
lib/Makefile
r55078f5 ra3a3778 17 17 # [SH] Phony targets 18 18 all: lib.o 19 check: all 20 gcov: 21 gcov *.c 19 22 20 23 .PHONY: all clean distclean -
protocols/Makefile
r55078f5 ra3a3778 26 26 # [SH] Phony targets 27 27 all: protocols.o 28 check: all 29 gcov: 30 gcov *.c 28 31 29 32 .PHONY: all clean distclean $(subdirs) -
protocols/jabber/Makefile
r55078f5 ra3a3778 17 17 # [SH] Phony targets 18 18 all: jabber_mod.o 19 check: all 20 gcov: 21 gcov *.c 19 22 20 23 .PHONY: all clean distclean -
protocols/msn/Makefile
r55078f5 ra3a3778 17 17 # [SH] Phony targets 18 18 all: msn_mod.o 19 check: all 20 gcov: 21 gcov *.c 19 22 20 23 .PHONY: all clean distclean -
protocols/msn/sb.c
r55078f5 ra3a3778 122 122 if( sb->ready ) 123 123 { 124 char cmd[1024], *buf;124 char *packet, *buf; 125 125 int i, j; 126 126 127 /* Build the message. Convert LF to CR-LF for normal messages. */ 127 128 if( strcmp( text, TYPING_NOTIFICATION_MESSAGE ) != 0 ) 128 129 { … … 142 143 { 143 144 i = strlen( MSN_TYPING_HEADERS ) + strlen( sb->gc->username ); 144 buf = g_new0( char, strlen( MSN_TYPING_HEADERS ) + strlen( sb->gc->username ));145 buf = g_new0( char, i ); 145 146 i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->gc->username ); 146 147 } 147 148 148 g_snprintf( cmd, sizeof( cmd ), "MSG %d N %d\r\n", ++sb->trId, i ); 149 if( msn_sb_write( sb, cmd, strlen( cmd ) ) && msn_sb_write( sb, buf, i ) ) 150 { 151 g_free( buf ); 149 /* Build the final packet (MSG command + the message). */ 150 packet = g_strdup_printf( "MSG %d N %d\r\n%s", ++sb->trId, i, buf ); 151 g_free( buf ); 152 if( msn_sb_write( sb, packet, strlen( packet ) ) ) 153 { 154 g_free( packet ); 152 155 return( 1 ); 153 156 } 154 157 else 155 158 { 156 g_free( buf);159 g_free( packet ); 157 160 return( 0 ); 158 161 } -
protocols/oscar/Makefile
r55078f5 ra3a3778 17 17 # [SH] Phony targets 18 18 all: oscar_mod.o 19 check: all 20 gcov: 21 gcov *.c 19 22 20 23 .PHONY: all clean distclean -
protocols/yahoo/Makefile
r55078f5 ra3a3778 17 17 # [SH] Phony targets 18 18 all: yahoo_mod.o 19 check: all 20 gcov: 21 gcov *.c 19 22 20 23 .PHONY: all clean distclean -
tests/Makefile
r55078f5 ra3a3778 3 3 LFLAGS +=-lcheck 4 4 5 all: check 6 ./check 5 all: check 6 ./check $(CHECKFLAGS) 7 7 8 main_objs = account.o bitlbee.o conf.o crypting.o help.o ini.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_text.o url.o user.o util.o 8 clean: 9 rm -f check *.o 9 10 10 check: check.o check_util.o check_nick.o $(addprefix ../, $(main_objs)) ../protocols/protocols.o 11 main_objs = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_xml.o storage_text.o user.o 12 13 test_objs = check.o check_util.o check_nick.o check_md5.o check_irc.o 14 15 check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o 11 16 @echo '*' Linking $@ 12 17 @$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS) -
tests/check.c
r55078f5 ra3a3778 4 4 #include <check.h> 5 5 #include "bitlbee.h" 6 #include "testsuite.h" 6 7 7 8 global_t global; /* Against global namespace pollution */ 9 10 gboolean g_io_channel_pair(GIOChannel **ch1, GIOChannel **ch2) 11 { 12 int sock[2]; 13 if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNIX, sock) < 0) { 14 perror("socketpair"); 15 return FALSE; 16 } 17 18 *ch1 = g_io_channel_unix_new(sock[0]); 19 *ch2 = g_io_channel_unix_new(sock[1]); 20 return TRUE; 21 } 8 22 9 23 double gettime() … … 21 35 Suite *nick_suite(void); 22 36 23 int main (void) 37 /* From check_md5.c */ 38 Suite *md5_suite(void); 39 40 /* From check_irc.c */ 41 Suite *irc_suite(void); 42 43 int main (int argc, char **argv) 24 44 { 25 45 int nf; 26 SRunner *sr = srunner_create(util_suite()); 46 SRunner *sr; 47 GOptionContext *pc; 48 gboolean no_fork = FALSE; 49 gboolean verbose = FALSE; 50 GOptionEntry options[] = { 51 {"no-fork", 'n', 0, G_OPTION_ARG_NONE, &no_fork, "Don't fork" }, 52 {"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL }, 53 { NULL } 54 }; 55 int i; 56 57 pc = g_option_context_new(""); 58 g_option_context_add_main_entries(pc, options, NULL); 59 60 if(!g_option_context_parse(pc, &argc, &argv, NULL)) 61 return 1; 62 63 g_option_context_free(pc); 64 65 log_init(); 66 67 if (verbose) { 68 log_link( LOGLVL_ERROR, LOGOUTPUT_CONSOLE ); 69 log_link( LOGLVL_DEBUG, LOGOUTPUT_CONSOLE ); 70 log_link( LOGLVL_INFO, LOGOUTPUT_CONSOLE ); 71 log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE ); 72 } 73 74 global.conf = conf_load( 0, NULL); 75 global.conf->runmode = RUNMODE_DAEMON; 76 77 sr = srunner_create(util_suite()); 27 78 srunner_add_suite(sr, nick_suite()); 28 srunner_run_all (sr, CK_NORMAL); 79 srunner_add_suite(sr, md5_suite()); 80 srunner_add_suite(sr, irc_suite()); 81 if (no_fork) 82 srunner_set_fork_status(sr, CK_NOFORK); 83 srunner_run_all (sr, verbose?CK_VERBOSE:CK_NORMAL); 29 84 nf = srunner_ntests_failed(sr); 30 85 srunner_free(sr); -
tests/check_nick.c
r55078f5 ra3a3778 6 6 #include "irc.h" 7 7 #include "set.h" 8 #include " util.h"8 #include "misc.h" 9 9 10 10 START_TEST(test_nick_strip) … … 23 23 24 24 for (i = 0; get[i]; i++) { 25 char copy[ 30];25 char copy[60]; 26 26 strcpy(copy, get[i]); 27 27 nick_strip(copy); -
tests/check_util.c
r55078f5 ra3a3778 6 6 #include "irc.h" 7 7 #include "set.h" 8 #include " util.h"8 #include "misc.h" 9 9 10 10 START_TEST(test_strip_linefeed)
Note: See TracChangeset
for help on using the changeset viewer.