Changeset 03886fc
- Timestamp:
- 2013-02-21T18:37:06Z (12 years ago)
- Branches:
- master
- Children:
- f3fce53
- Parents:
- a5c6ebd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
set.c
ra5c6ebd r03886fc 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 05Wilmer van der Gaast and others *4 * Copyright 2002-2013 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 23 23 Suite 330, Boston, MA 02111-1307 USA 24 24 */ 25 25 26 #define BITLBEE_CORE 26 27 #include "bitlbee.h" … … 39 40 if( ( s = *head ) ) 40 41 { 41 while( s->next ) s = s->next; 42 s->next = g_new0( set_t, 1 ); 43 s = s->next; 42 /* Sorted insertion. Special-case insertion at the start. */ 43 if( strcmp( key, s->key ) < 0 ) 44 { 45 s = g_new0( set_t, 1 ); 46 s->next = *head; 47 *head = s; 48 } 49 else 50 { 51 while( s->next && strcmp( key, s->next->key ) > 0 ) 52 s = s->next; 53 set_t *last_next = s->next; 54 s->next = g_new0( set_t, 1 ); 55 s = s->next; 56 s->next = last_next; 57 } 44 58 } 45 59 else
Note: See TracChangeset
for help on using the changeset viewer.