2006-09-22 00:11:25 +04:00
|
|
|
#include <stdio.h>
|
2006-10-02 18:17:22 +04:00
|
|
|
#include <string.h>
|
2006-09-22 00:11:25 +04:00
|
|
|
|
|
|
|
const char* expected_arguments[] =
|
|
|
|
{
|
|
|
|
@EXPECTED_ARGUMENTS@ 0
|
|
|
|
};
|
|
|
|
|
|
|
|
int main(int argc, const char* argv[])
|
|
|
|
{
|
|
|
|
const char** a = argv+1;
|
|
|
|
const char** e = expected_arguments;
|
|
|
|
(void)argc;
|
|
|
|
for(;*a && *e; ++a, ++e)
|
|
|
|
{
|
|
|
|
if(strcmp(*a, *e) != 0)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "Argument [%s] does not match expected [%s].\n",
|
|
|
|
*a, *e);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-09-28 19:30:49 +04:00
|
|
|
/*printf("[%s]\n", *a);*/
|
2006-09-22 00:11:25 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if(*a || *e)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "Number of arguments does not match expected.\n");
|
|
|
|
return 1;
|
|
|
|
}
|
2006-09-28 19:30:49 +04:00
|
|
|
printf("Command line escapes work!\n");
|
2006-09-22 00:11:25 +04:00
|
|
|
return 0;
|
|
|
|
}
|