1
0
This commit is contained in:
dtb 2022-10-16 18:44:20 -04:00
parent 4d794c2c6f
commit 5e8b703e67

View File

@ -23,17 +23,10 @@ static char *program_name = "pscat";
/* Test string containing { c, '\0' } without iteration. /* Test string containing { c, '\0' } without iteration.
* Theoretically saves a little bit of time compared to strcmp(3). */ * Theoretically saves a little bit of time compared to strcmp(3). */
int #define SCMPFLAT(a, b) (*(a) != '\0' && *((a)+1) == '\0' && *(a) == (b))
scmpflat(char *s, int c){
return
s[0] != '\0'
&& s[1] == '\0'
&& s[0] == c
;
}
/* Verifies arguments to pscat are sensible. */ /* Verifies arguments to pscat are sensible. */
int static int
check_arg(char **argv){ check_arg(char **argv){
enum { enum {
UNINITIALIZED = 0, UNINITIALIZED = 0,