MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Field_Complete

Function Field_Complete

code/qcommon/common.cpp:1735–1756  ·  view source on GitHub ↗

=============== Field_Complete =============== */

Source from the content-addressed store, hash-verified

1733===============
1734*/
1735static qboolean Field_Complete( void ) {
1736 int completionOffset;
1737
1738 if ( matchCount == 0 )
1739 return qtrue;
1740
1741 completionOffset = strlen( completionField->buffer ) - strlen( completionString );
1742
1743 Q_strncpyz( &completionField->buffer[completionOffset], shortestMatch, sizeof( completionField->buffer ) - completionOffset );
1744
1745 completionField->cursor = strlen( completionField->buffer );
1746
1747 if ( matchCount == 1 ) {
1748 Q_strcat( completionField->buffer, sizeof( completionField->buffer ), " " );
1749 completionField->cursor++;
1750 return qtrue;
1751 }
1752
1753 Com_Printf( "%c%s\n", CONSOLE_PROMPT_CHAR, completionField->buffer );
1754
1755 return qfalse;
1756}
1757
1758/*
1759===============

Callers 3

Field_CompleteKeynameFunction · 0.70
Field_CompleteFilenameFunction · 0.70
Field_CompleteCommandFunction · 0.70

Calls 3

Q_strncpyzFunction · 0.85
Q_strcatFunction · 0.85
Com_PrintfFunction · 0.70

Tested by

no test coverage detected