func: int main(int argc, char **argv) int shmsz ; key_t key ; char * str = NULL ; int c ; while ( ( c = getopt ( argc , argv , "k:s:m:o:h" ) ) != - 1 )  switch ( c )  if ( ( key = strtol ( optarg , NULL , 10 ) ) < 1000 )  fprintf ( stderr , "Key needs to be a 4 digit number.\n" ); if ( ( shmsz = atoi ( optarg ) ) <= 0 )  fprintf ( stderr , "Size needs to be an integer.\n" ); str = optarg; fprintf ( stderr , "Illegal argument!\n" ); if ( ! str )  fprintf ( stderr , "No data provided.\n" ); 