Changes in help.c [674a01d:e5d8d21]
Legend:
- Unmodified
- Added
- Removed
-
help.c
r674a01d re5d8d21 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 10Wilmer van der Gaast and others *4 * Copyright 2002-2009 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 26 26 #define BITLBEE_CORE 27 27 #include "bitlbee.h" 28 #include "help.h"29 28 #undef read 30 29 #undef write … … 158 157 } 159 158 160 if( lseek( h->fd, h->offset.file_offset, SEEK_SET ) == -1 || 161 read( h->fd, s, h->length ) != h->length ) 162 return NULL; 159 lseek( h->fd, h->offset.file_offset, SEEK_SET ); 160 read( h->fd, s, h->length ); 163 161 } 164 162 else … … 195 193 return 1; 196 194 } 197 198 char *help_get_whatsnew( help_t **help, int old )199 {200 GString *ret = NULL;201 help_t *h;202 int v;203 204 for( h = *help; h; h = h->next )205 if( h->title != NULL && strncmp( h->title, "whatsnew", 8 ) == 0 &&206 sscanf( h->title + 8, "%x", &v ) == 1 && v > old )207 {208 char *s = help_get( &h, h->title );209 if( ret == NULL )210 ret = g_string_new( s );211 else212 g_string_append_printf( ret, "\n\n%s", s );213 g_free( s );214 }215 216 return ret ? g_string_free( ret, FALSE ) : NULL;217 }
Note: See TracChangeset
for help on using the changeset viewer.