/* Print all completion results to fp */ void completion_printCodeCompletionResults(CXCodeCompleteResults *res, FILE *fp) { unsigned int i = 0; for ( ; i < res->NumResults; i++) { completion_printCompletionLine(res->Results[i].CompletionString, fp); } }
/* Print the MAX_COMPLETIONS_TO_PRINT completions with the highest completionPriority*/ void completion_printCodeCompletionResults(CXCodeCompleteResults *res, FILE *fp, char *prefix) { unsigned int i = 0; unsigned int n = 0; sort(res->Results, 0, res->NumResults); for ( ; i < res->NumResults; i++) { n += completion_printCompletionLine(res->Results[i].CompletionString, fp, prefix); if (n > MAX_COMPLETIONS_TO_PRINT) { break; } } }