Changes in / [bd28e6a:a3a3778]
- Files:
-
- 3 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
.bzrignore
rbd28e6a ra3a3778 13 13 .gdb_history 14 14 tests/check 15 *.gcda 16 *.gcov 17 *.gcno 18 *.o -
Makefile
rbd28e6a 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
rbd28e6a 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
rbd28e6a 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
rbd28e6a 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> -
ipc.c
rbd28e6a ra3a3778 99 99 { "die", 0, ipc_master_cmd_die, 0 }, 100 100 { "wallops", 1, NULL, IPC_CMD_TO_CHILDREN }, 101 { " lilo", 1, NULL, IPC_CMD_TO_CHILDREN },101 { "wall", 1, NULL, IPC_CMD_TO_CHILDREN }, 102 102 { "opermsg", 1, NULL, IPC_CMD_TO_CHILDREN }, 103 103 { "rehash", 0, ipc_master_cmd_rehash, 0 }, … … 122 122 } 123 123 124 static void ipc_child_cmd_ lilo( irc_t *irc, char **cmd )124 static void ipc_child_cmd_wall( irc_t *irc, char **cmd ) 125 125 { 126 126 if( !( irc->status & USTATUS_LOGGED_IN ) ) … … 175 175 { "die", 0, ipc_child_cmd_die, 0 }, 176 176 { "wallops", 1, ipc_child_cmd_wallops, 0 }, 177 { " lilo", 1, ipc_child_cmd_lilo, 0 },177 { "wall", 1, ipc_child_cmd_wall, 0 }, 178 178 { "opermsg", 1, ipc_child_cmd_opermsg, 0 }, 179 179 { "rehash", 0, ipc_child_cmd_rehash, 0 }, -
irc.c
rbd28e6a ra3a3778 585 585 the queue. If it's FALSE, we emptied the buffer and saved ourselves some work 586 586 in the event queue. */ 587 if( bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE ) ) 588 irc->w_watch_source_id = b_input_add( irc->fd, GAIM_INPUT_WRITE, bitlbee_io_current_client_write, irc ); 587 /* Really can't be done as long as the code doesn't do error checking very well: 588 if( bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE ) ) */ 589 590 /* So just always do it via the event handler. */ 591 irc->w_watch_source_id = b_input_add( irc->fd, GAIM_INPUT_WRITE, bitlbee_io_current_client_write, irc ); 589 592 } 590 593 -
irc_commands.c
rbd28e6a ra3a3778 593 593 { "die", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 594 594 { "wallops", 1, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 595 { " lilo", 1, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER },595 { "wall", 1, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 596 596 { "rehash", 0, irc_cmd_rehash, IRC_CMD_OPER_ONLY }, 597 597 { "restart", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, -
lib/Makefile
rbd28e6a 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
rbd28e6a 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
rbd28e6a 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
rbd28e6a 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/oscar/Makefile
rbd28e6a 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
rbd28e6a 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 -
storage_xml.c
rbd28e6a ra3a3778 395 395 396 396 strcat( path, "~" ); 397 if( ( fd = open( path, O_WRONLY | O_CREAT , 0600 ) ) < 0 )397 if( ( fd = open( path, O_WRONLY | O_CREAT | O_TRUNC, 0600 ) ) < 0 ) 398 398 { 399 399 irc_usermsg( irc, "Error while opening configuration file." ); -
tests/Makefile
rbd28e6a 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
rbd28e6a 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
rbd28e6a 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
rbd28e6a 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.