Changeset c227706
- Timestamp:
- 2006-12-24T19:35:13Z (18 years ago)
- Branches:
- master
- Children:
- 7bee5af
- Parents:
- 9225e08
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
help.c
r9225e08 rc227706 31 31 #define BUFSIZE 1100 32 32 33 help_t *help_init( help_t **help )33 help_t *help_init( help_t **help, const char *helpfile ) 34 34 { 35 35 int i, buflen = 0; … … 41 41 *help = h = g_new0 ( help_t, 1 ); 42 42 43 h->fd = open( global.helpfile, O_RDONLY43 h->fd = open( helpfile, O_RDONLY 44 44 #ifdef _WIN32 45 45 | O_BINARY … … 109 109 help_t *h; 110 110 111 h=*help; 112 113 while( h ) 111 for( h = *help; h; h = h->next ) 114 112 { 115 if( g_strcasecmp( h->string, string ) == 0 ) break; 116 h = h->next; 113 if( h->string != NULL && 114 g_strcasecmp( h->string, string ) == 0 ) 115 break; 117 116 } 118 117 if( h && h->length > 0 ) -
help.h
r9225e08 rc227706 43 43 } help_t; 44 44 45 help_t *help_init( help_t **help );45 help_t *help_init( help_t **help, const char *helpfile ); 46 46 char *help_get( help_t **help, char *string ); 47 47 -
tests/Makefile
r9225e08 rc227706 11 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 12 13 test_objs = check.o check_util.o check_nick.o check_md5.o check_irc.o 13 test_objs = check.o check_util.o check_nick.o check_md5.o check_irc.o check_help.o 14 14 15 15 check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o -
tests/check.c
r9225e08 rc227706 41 41 Suite *irc_suite(void); 42 42 43 /* From check_help.c */ 44 Suite *help_suite(void); 45 43 46 int main (int argc, char **argv) 44 47 { … … 81 84 srunner_add_suite(sr, md5_suite()); 82 85 srunner_add_suite(sr, irc_suite()); 86 srunner_add_suite(sr, help_suite()); 83 87 if (no_fork) 84 88 srunner_set_fork_status(sr, CK_NOFORK); -
unix.c
r9225e08 rc227706 112 112 if( !getuid() || !geteuid() ) 113 113 log_message( LOGLVL_WARNING, "BitlBee is running with root privileges. Why?" ); 114 if( help_init( &(global.help) ) == NULL )114 if( help_init( &(global.help), global.helpfile ) == NULL ) 115 115 log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE ); 116 116
Note: See TracChangeset
for help on using the changeset viewer.