Removed inputhandling library
The functionality was moved to inputoutput.
This commit is contained in:
parent
4ddb80b8b2
commit
0b3a72beff
|
@ -1,18 +0,0 @@
|
|||
// inputhandling.c: Implementation of input handling library for SilverMUD.
|
||||
// Barry Kane, 2021.
|
||||
#include <ctype.h>
|
||||
|
||||
void userInputSanatize(char * inputString, int length)
|
||||
{
|
||||
for(int index = 0; index <= length; index++)
|
||||
{
|
||||
if(!isprint(inputString[index]))
|
||||
{
|
||||
inputString[index] = '\n';
|
||||
inputString[index + 1] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
inputString[length - 1] = '\0';
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
// inputhandling.h: Header file for the inputhandling library for SilverMUD.
|
||||
// Barry Kane, 2021
|
||||
#ifndef INPUTHANDLING_H
|
||||
#define INPUTHANDLING_H
|
||||
#include <ctype.h>
|
||||
|
||||
// Sanatize user input to ensure it's okay to send to the server:
|
||||
void userInputSanatize(char * inputString, int length);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue