/* * main.c * * "Main" * * (c) 2006-2009 Thomas White * * template_index - Indexing diffraction patterns by template matching * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include static void main_show_help(const char *s) { printf("Syntax: %s [...]\n\n", s); printf("Index diffraction patterns\n\n"); printf(" -h Display this help message\n"); } int main(int argc, char *argv[]) { int c; char **in_files; size_t nin; size_t i; while ((c = getopt(argc, argv, "h")) != -1) { switch ( c ) { case 'h' : { main_show_help(argv[0]); return 0; } } } if ( optind < argc ) { nin = argc-optind; in_files = malloc(nin*sizeof(char *)); for ( i=0; i