diff --git a/sudoku.c b/sudoku.c --- 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]);