* special char display ** we only expect ascii values ** 1) == 0, 2) control+key, 3) ^?, 4) regular chars ** no need for a table, just use conditions and arithmetic ** ^? can just be a special case, or can be handled bitwise (c_cc[index]-1+'A') & 0x7F ** special case for can use either '\0' or _POSIX_VDISABLE * error reporting ** always exit non-zero in error conditions ** perror and strerror are only for cases where errno is set ** either is fine fprintf(stderr, "%s: unable to do a thing to %s: %s\n", prog, arg, strerror(errno)); fprintf(stderr, "%s: unable to do a thing to ", prog); perror(arg); ** all other cases (no errno value) just use fprintf(stder, "...", ...); ** you only have to support single char input for control chars is there an arg? does strlen say 1? no processing is needed, just stuff it in the array as is reminder: lnext == terminal escape e.g., to reliably input the backspace, Ctrl+V results in the one char value ^? ** test script in the case of bad arguments is OK with just "invalid argument" "invalid .*argument" ** expects a single error report * min and time ** how are they different? *** only accept numeric values *** must be in the range 0-255 because it's still a char value *** displayed as a number, not a char *** argument must be convertable to a number, and the result is in the acceptable range (above) * demotwo part of the assignment The posix standard has a good page with descriptions of canonical and non-canonical mode, and what min and time do. https://pubs.opengroup.org/onlinepubs/009696799/basedefs/xbd_chap11.html#tag_11 Read that first. ** not a huge part of the assignment, don't sink too much time into it. we just want to see that you understanding what the terminal settings are for. * stty -a ** line represents the "line discipline", basically the glue between the device and the device driver ** see ioctl_tty for details about getting and setting the value ** your program does not need to handle this, just here for information