Merge branch 'master'
This commit is contained in:
		
						commit
						9c30ea4ef1
					
				| @ -96,9 +96,10 @@ void CLI_PrintHistory() | ||||
| { | ||||
| 	char** historyList; | ||||
| 	int ret = History_getFullHistory(History, &historyList); | ||||
| 	int i; | ||||
| 	if (ret >= 0) | ||||
| 	{ | ||||
| 		for (int i=0; *(historyList + i) != NULL; i++) | ||||
| 		for (i=0; *(historyList + i) != NULL; i++) | ||||
| 		{ | ||||
| 			printf("%03i: %s\n", i, *(historyList + i)); | ||||
| 		} | ||||
| @ -263,6 +264,7 @@ bool CLI_charIn(char c) | ||||
| 						FIFOBuffChar_delete(fifo); | ||||
| 						break; | ||||
| 					 | ||||
| 					case 8: | ||||
| 					case 127: // backspace
 | ||||
| 						if (FIFOBuffChar_pop(FIFO)) | ||||
| 						{ // pop something of the buffer
 | ||||
|  | ||||
| @ -153,7 +153,8 @@ int History_getFullHistory(History_t* history, char*** list) | ||||
| 	*list = malloc(sizeof(char**) * (History_getSize(history) + 1)); | ||||
| 	History_element_t* el = history->FirstEl_p; | ||||
| 
 | ||||
| 	for (int i = 0; (i < History_getSize(history)-1) && (retCode >= 0); i++) | ||||
| 	int i; | ||||
| 	for (i = 0; (i < History_getSize(history)-1) && (retCode >= 0); i++) | ||||
| 	{ | ||||
| 		*((*list) + i) = el->line; | ||||
| 		if (el->nextEl_p == NULL) | ||||
| @ -182,7 +183,8 @@ int History_getCurrPos(History_t* history) | ||||
| 	if (history->CurrEl_p != NULL) | ||||
| 	{ | ||||
| 		History_element_t* el = history->FirstEl_p; | ||||
| 		for (int i = 0; (el != history->CurrEl_p) && (retCode >= 0); i++) | ||||
| 		int i; | ||||
| 		for (i = 0; (el != history->CurrEl_p) && (retCode >= 0); i++) | ||||
| 		{ | ||||
| 			if (el->nextEl_p == NULL) | ||||
| 			{ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user