#include <stdio.h>

/*
 * Prints every command-line argument, then exits.
 *
 * Try in MAME / ESTEX shell:
 *   ARGV_TES                  -> argc=1, argv[0] = ""
 *   ARGV_TES one two three    -> argc=4, argv[1..3] = "one","two","three"
 *   ARGV_TES   spaced   args  -> multiple spaces are squashed
 */

int main(int argc, char **argv)
{
    printf("argc = %d\n", argc);
    for (int i = 0; i < argc; i++) {
        printf("argv[%d] = \"%s\"\n", i, argv[i]);
    }
    puts("");
    puts("Press any key to exit...");
    (void)getchar();
    return 0;
}
