Commits

Rio Yokota committed 2e4d1ad

Added proper help argument.

Comments (0)

Files changed (1)

   {"ncrit",        1, 0, 'c'},
   {"nspawn",       1, 0, 's'},
   {"images",       1, 0, 'i'},
-  {"theta",        1, 0, 'h'},
+  {"theta",        1, 0, 'o'},
   {"mutual",       1, 0, 'm'},
   {"distribution", 1, 0, 'd'},
+  {"help",         0, 0, 'h'},
   {0, 0, 0, 0}
 };
 
             " --images : Number of periodic image levels (%d)\n"
             " --theta : Multipole acceptance criterion (%f)\n"
             " --mutual [0/1] :  use mutual interaction (%d)\n"
-            " --distribution [l/c/s/p] : lattice, cube, sphere, plummer (%s)\n",
+            " --distribution [l/c/s/p] : lattice, cube, sphere, plummer (%s)\n"
+            " --help : Show this help document\n",
             name,
             numBodies,
             numTarget,
       case 'i':
         IMAGES = atoi(optarg);
         break;
-      case 'h':
+      case 'o':
         THETA = atof(optarg);
         break;
       case 'm':
       case 'd':
         distribution = parse(optarg);
         break;
+      case 'h':
+        usage(argv[0]);
+        exit(0);
       default:
         usage(argv[0]);
         exit(0);