11 puts("Sigil Utilities, version 0.01\n"
12 "(C) 2020 theblaqcksquid <theblacksquid@subvertising.org>\n"
13 "Licensed under GNU GPL v3\n");
18 puts("usage: sigutils [options] <STATEMENT OF INTENT>\n"
19 "-h Print this message and quit.\n"
20 "-v Print the version and license info then quit.\n"
21 "-n Append the numerical and root values to the result.\n"
22 "-w Generate a Word Square based on the SOI\n"
23 "-W Generate word square ONLY.\n");
26 int main(int argc
, char** argv
)
32 int word_only_flag
= 0;
35 while ((c
= getopt(argc
, argv
, "nvhwW")) != -1)
38 case 'n': numeric_flag
= 1;
41 case 'v': version_flag
= 1;
44 case 'h': help_flag
= 1;
47 case 'w': word_flag
= 1;
50 case 'W': word_only_flag
= 1;
66 char* raw
= absorb_words(argc
, argv
, optind
);
67 char* result
= string_process(raw
);
74 int value
= string_value(result
, LETTERS
);
75 int root
= digital_root(value
, 10);
76 printf(" %d %d", value
, root
);
79 if (word_flag
|| word_only_flag
)
83 printf("%s", generate_square(result
));