sudoku.c
changeset 85 9568a180fc43
parent 77 49e0babccb23
child 133 f46f9606dbfb
--- a/sudoku.c
+++ b/sudoku.c
@@ -188,7 +188,12 @@
     int ret;
     int colored = 0;
 
-    while ((i = getopt (argc, argv, "ch")) != -1) {
+    struct option options[] = {
+        {"colored", 0, 0, 'c'},
+        {"help", 0, 0, 'h'},
+    };
+
+    while ((i = getopt_long_only (argc, argv, "ch", options, NULL)) != -1) {
         switch (i) {
         case 'h':
             usage (argv[0]);