@@ -136,15 +136,6 @@ int fossil_io_validate_is_length(const char *input, size_t max_length);
136
136
*/
137
137
int fossil_io_validate_sanitize_string (const char *input, char *output, size_t output_size);
138
138
139
- /* *
140
- * @brief Reads a secure line of input into the provided buffer.
141
- *
142
- * @param buffer The buffer where the input will be stored.
143
- * @param buffer_size The size of the buffer.
144
- * @return A fossil_io_validate_error_t indicating the result of the input reading process.
145
- */
146
- int fossil_io_validate_read_secure_line (char *buffer, size_t buffer_size);
147
-
148
139
/* *
149
140
* Displays a menu of choices and returns the selected choice.
150
141
*
@@ -155,31 +146,6 @@ int fossil_io_validate_read_secure_line(char *buffer, size_t buffer_size);
155
146
*/
156
147
int fossil_io_display_menu (const char *prompt, const char *choices[], int num_choices);
157
148
158
- /* *
159
- * Reads a password from the user with masked input (e.g., asterisks).
160
- *
161
- * @param buffer The buffer to store the password.
162
- * @param size The maximum size of the buffer.
163
- * @return 1 if password was successfully read, 0 otherwise.
164
- */
165
- int fossil_io_read_password (char *buffer, size_t size);
166
-
167
- /* *
168
- * Reads multiline input from the user, allowing the user to press Enter to add new lines.
169
- *
170
- * @param buffer The buffer to store the input.
171
- * @param size The maximum size of the buffer.
172
- * @return 1 if the input was successfully received, 0 otherwise.
173
- */
174
- int fossil_io_read_multiline_input (char *buffer, size_t size);
175
-
176
- /* *
177
- * Reads a single character from the user without echoing to the screen.
178
- *
179
- * @return The character entered by the user.
180
- */
181
- char fossil_io_getch (void );
182
-
183
149
/* *
184
150
* Displays a simple progress bar.
185
151
*
@@ -352,14 +318,24 @@ namespace fossil {
352
318
}
353
319
354
320
/* *
355
- * @brief Reads a secure line of input into the provided buffer.
321
+ * @brief Displays a menu of choices and returns the selected choice.
322
+ *
323
+ * @param prompt The prompt message before displaying the menu.
324
+ * @param choices Array of strings representing the choices.
325
+ * @param num_choices The number of choices.
326
+ * @return The index of the selected choice.
327
+ */
328
+ static int display_menu (const char *prompt, const char *choices[], int num_choices) {
329
+ return fossil_io_display_menu (prompt, choices, num_choices);
330
+ }
331
+
332
+ /* *
333
+ * @brief Displays a simple progress bar.
356
334
*
357
- * @param buffer The buffer where the input will be stored.
358
- * @param buffer_size The size of the buffer.
359
- * @return A fossil_io_validate_error_t indicating the result of the input reading process.
335
+ * @param progress The current progress (0-100).
360
336
*/
361
- static int validate_read_secure_line ( char *buffer, size_t buffer_size ) {
362
- return fossil_io_validate_read_secure_line (buffer, buffer_size );
337
+ static void show_progress ( int progress ) {
338
+ fossil_io_show_progress (progress );
363
339
}
364
340
365
341
/* *
0 commit comments