~ashn/c-boilerplate

aa4b7b047b937b74ce0d87f04263c6a65680c98d — ashn 7 months ago 88e247a
Clang format
1 files changed, 5 insertions(+), 10 deletions(-)

M main.c
M main.c => main.c +5 -10
@@ 15,27 15,22 @@ usage(void);
int
main(int argc, char** argv)
{
    if (argc == 1)
    {
    if (argc == 1) {
        usage();
        exit(EXIT_FAILURE);
    }
    for (int i = 1; i < argc; ++i)
    {
        if (strcmp(argv[i], "--help") == 0)
        {
    for (int i = 1; i < argc; ++i) {
        if (strcmp(argv[i], "--help") == 0) {
            usage();
            exit(EXIT_SUCCESS);
        }
        if (strcmp(argv[i], "--version") == 0)
        {
        if (strcmp(argv[i], "--version") == 0) {
            version();
            exit(EXIT_SUCCESS);
        }
    }

    for (int i = 1; i < argc; ++i)
    {
    for (int i = 1; i < argc; ++i) {
        printf("'%s' is%s 'foo'\n", argv[i], is_foo(argv[i]) ? "" : " not");
    }