1212 * -----------------------------------------------------------------------------
1313 */
1414#include "fossil/io/input.h"
15- #include "fossil/io/soap.h"
1615#include "fossil/io/output.h"
1716
1817#include <ctype.h>
@@ -54,7 +53,7 @@ void fossil_io_trim(char *str) {
5453// Function to get a sanitized line of input from a provided stream (or stdin by default)
5554char * fossil_io_gets_from_stream (char * buf , size_t size , FILE * input_stream ) {
5655 if (buf == NULL || size == 0 || input_stream == NULL ) {
57- fprintf (stderr , "Error: Invalid buffer or stream\n" );
56+ fprintf (stderr , "Error: Invalid buffer or stream. \n" );
5857 return NULL ;
5958 }
6059
@@ -63,7 +62,7 @@ char *fossil_io_gets_from_stream(char *buf, size_t size, FILE *input_stream) {
6362 if (feof (input_stream )) {
6463 return NULL ; // End of file reached
6564 }
66- fprintf (stderr , "Error: Failed to read from input stream\n" );
65+ fprintf (stderr , "Error: Failed to read from input stream. \n" );
6766 return NULL ;
6867 }
6968
@@ -73,9 +72,6 @@ char *fossil_io_gets_from_stream(char *buf, size_t size, FILE *input_stream) {
7372 buf [len - 1 ] = '\0' ; // Remove the newline character
7473 }
7574
76- // Sanitize the input buffer
77- fossil_soap_sanitize (buf );
78-
7975 // Trim any leading or trailing whitespace
8076 fossil_io_trim (buf );
8177
@@ -84,7 +80,7 @@ char *fossil_io_gets_from_stream(char *buf, size_t size, FILE *input_stream) {
8480
8581char * fossil_io_gets_from_stream_ex (char * buf , size_t size , FILE * input_stream , int * error_code ) {
8682 if (buf == NULL || size == 0 || input_stream == NULL || error_code == NULL ) {
87- fprintf (stderr , "Error: Invalid buffer, stream, or error code\n" );
83+ fprintf (stderr , "Error: Invalid buffer, stream, or error code. \n" );
8884 return NULL ;
8985 }
9086
@@ -95,7 +91,7 @@ char *fossil_io_gets_from_stream_ex(char *buf, size_t size, FILE *input_stream,
9591 return NULL ; // End of file reached
9692 }
9793 * error_code = ferror (input_stream );
98- fprintf (stderr , "Error: Failed to read from input stream\n" );
94+ fprintf (stderr , "Error: Failed to read from input stream. \n" );
9995 return NULL ;
10096 }
10197
@@ -105,9 +101,6 @@ char *fossil_io_gets_from_stream_ex(char *buf, size_t size, FILE *input_stream,
105101 buf [len - 1 ] = '\0' ; // Remove the newline character
106102 }
107103
108- // Sanitize the input buffer
109- fossil_soap_sanitize (buf );
110-
111104 // Trim any leading or trailing whitespace
112105 fossil_io_trim (buf );
113106
@@ -132,7 +125,7 @@ int fossil_io_fscanf(FILE *input_stream, const char *format, ...) {
132125
133126int fossil_io_validate_input_buffer (const char * buf , size_t size ) {
134127 if (buf == NULL || size == 0 ) {
135- fprintf (stderr , "Error: Invalid buffer or size\n" );
128+ fprintf (stderr , "Error: Invalid buffer or size. \n" );
136129 return 0 ;
137130 }
138131 return 1 ;
@@ -148,7 +141,7 @@ char *fossil_io_gets_utf8(char *buf, size_t size, FILE *input_stream) {
148141 if (feof (input_stream )) {
149142 return NULL ; // End of file reached
150143 }
151- fprintf (stderr , "Error: Failed to read from input stream\n" );
144+ fprintf (stderr , "Error: Failed to read from input stream. \n" );
152145 return NULL ;
153146 }
154147
@@ -158,9 +151,6 @@ char *fossil_io_gets_utf8(char *buf, size_t size, FILE *input_stream) {
158151 buf [len - 1 ] = '\0' ; // Remove the newline character
159152 }
160153
161- // Sanitize the input buffer
162- fossil_soap_sanitize (buf );
163-
164154 // Trim any leading or trailing whitespace
165155 fossil_io_trim (buf );
166156
@@ -250,9 +240,6 @@ int fossil_io_validate_sanitize_string(const char *input, char *output, size_t o
250240 // Copy the input string to the output buffer
251241 strncpy (output , input , output_size );
252242
253- // Sanitize the output buffer
254- fossil_soap_sanitize (output );
255-
256243 return 1 ;
257244}
258245
0 commit comments