blob: 5a4c1355659ce02efc45ee1d3b97fb0b7671df09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include "../7ed.h"
#include "../i_validation.h"
#include "../input.h"
#include <stdint.h>
// Test for validate_check_p_m
int main () {
uint64_t focus = 1;
char smode_buf[SMODE_MAX_SIZE]; // Smode buffer
fprintf(stdout, "(%lu): ", focus); // UI
fgets(smode_buf, SMODE_MAX_SIZE, stdin); // Read user input
int ret = validate_check_p_m(smode_buf);
if(ret == _NA) {
printf("NA\n");
}
if(ret == _PLUS_CONTINUE) {
printf("plus continue\n");
}
if(ret == _INVALID) {
printf("?\n");
}
if(ret == _VALID) {
printf("valid\n");
}
}
|