Ok, I've tried to put something together from the tutorials on the web
and ended up using this, which works:

 char *c = argv[2];

  for (c == argv[argc - 2]; *c != '\0'; c++)
    if ((islower(*c)) || (isspace(*c)) || (ispunct(*c)))
    {
      printf("\nWrong characters in parameter!\n");
      return EXIT_FAILURE;
    }

However, it conflicts with my other conditions for the command line,
namely this:

  if (argc == 2 && strcmp("-h", argv[1]) == 0)
  {
    return help();
  }

It somehow doesn't like that the second parameter is not there. Under
linux, I get the error 'Segmentation fault: 11 (core dumped)'.

Any ideas?

Reply via email to