main.c
/** Char was collected, add to the list or increment it's counter */
Char was collected, add to the list or increment it's counter
Char was collected add to the list or increment it ' s counter
static void process_new_char(void)
{
	if (head == NULL) {
		head = make_counter(utf_buffer);
		point_count++;
	} else {
		Counter *ptr = head;
		bool found = false;
		while(1) {
			if (strcmp(ptr->point, utf_buffer) == 0) {
				ptr->count++;
				found = true;
				break;
			}
			if (ptr->next == NULL) break;
			ptr = ptr->next;
		}
		if (!found) {
			ptr->next = make_counter(utf_buffer);
			point_count++;
		}
	}
	utf_buffer_len = 0;
	utf_remain = 0;
	is_utf = false;
}
static void process_new_char ( void ) { if ( head == NULL ) { head = make_counter ( utf_buffer ) ; point_count ++ ; } else { Counter * ptr = head ; bool found = false ; while ( 1 ) { if ( strcmp ( ptr -> point , utf_buffer ) == 0 ) { ptr -> count ++ ; found = true ; break ; } if ( ptr -> next == NULL ) break ; ptr = ptr -> next ; } if ( ! found ) { ptr -> next = make_counter ( utf_buffer ) ; point_count ++ ; } } utf_buffer_len = 0 ; utf_remain = 0 ; is_utf = false ; }
Char was collected, add to the list or increment it's counter
Char was collected add to the list or increment it ' s counter
// Add to the list or increment // no list yet