9 char name
[] = "Sigil Utilities, version";
10 char contact
[] = "(C) 2020 theblaqcksquid <theblacksquid@subvertising.org>\n";
11 char license
[] = "Licensed under GNU GPL v3\n";
13 char help0
[] = "usage: sigutils [options] <STATEMENT OF INTENT>\n";
14 char help1
[] = "-h Print this message and quit.\n";
15 char help2
[] = "-v Print the version and license info, then quit.\n";
16 char help3
[] = "-n Append the numerical and root values to the result.\n";
17 char help4
[] = "-w Generate a Word Square based on the SOI\n";
19 int main(int argc
, char** argv
)
27 while ((c
= getopt(argc
, argv
, "nvhw")) != -1)
30 case 'n': numeric_flag
= 1;
33 case 'v': version_flag
= 1;
36 case 'h': help_flag
= 1;
39 case 'w': word_flag
= 1;
46 printf("%s %.2f\n%s%s", name
, VERSION
, contact
, license
);
52 printf("%s%s%s%s%s", help0
, help1
, help2
, help3
, help4
);
56 char* raw
= absorb_words(argc
, argv
, optind
);
57 char* result
= string_process(raw
);
63 int value
= string_value(result
, LETTERS
);
64 int root
= digital_root(value
, 10);
65 printf(" %d %d", value
, root
);
70 printf("\n\n%s", generate_square(result
));