FreeBSD/contrib/ntp/util/tg2.c
/* Reverse string order for nicer print. */
Reverse string order for nicer print.
Reverse string order for nicer print .
void
ReverseString(char *str)
	{
	int		StringLength;
	int		IndexCounter;
	int		CentreOfString;
	char	TemporaryCharacter;
	StringLength	= strlen(str);
	CentreOfString	= (StringLength/2)+1;
	for (IndexCounter = StringLength; IndexCounter >= CentreOfString; IndexCounter--)
		{
		TemporaryCharacter				= str[IndexCounter-1];
		str[IndexCounter-1]				= str[StringLength-IndexCounter];
		str[StringLength-IndexCounter]	= TemporaryCharacter;
		}
	}
void ReverseString ( char * str ) { int StringLength ; int IndexCounter ; int CentreOfString ; char TemporaryCharacter ; StringLength = strlen ( str ) ; CentreOfString = ( StringLength / 2 ) + 1 ; for ( IndexCounter = StringLength ; IndexCounter >= CentreOfString ; IndexCounter -- ) { TemporaryCharacter = str [ IndexCounter - 1 ] ; str [ IndexCounter - 1 ] = str [ StringLength - IndexCounter ] ; str [ StringLength - IndexCounter ] = TemporaryCharacter ; } }
Reverse string order for nicer print.
Reverse string order for nicer print .