diff options
-rw-r--r-- | dirname.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,7 +1,7 @@ /* * UNG's Not GNU * - * Copyright (c) 2011-2017, Jakob Kaivo <jkk@ung.org> + * Copyright (c) 2011-2022, Jakob Kaivo <jkk@ung.org> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -19,20 +19,20 @@ #define _XOPEN_SOURCE 700 #include <stdio.h> +#include <locale.h> #include <libgen.h> #include <unistd.h> -/*d Give the directory portion of a pathname d*/ -/*a string a*/ - int main(int argc, char *argv[]) { + setlocale(LC_ALL, ""); + while (getopt(argc, argv, "") != -1) { return 1; } if (optind != argc - 1) { - fprintf(stderr, "dirname: Requires exactly one pathname\n"); + fprintf(stderr, "dirname: provide exactly one operand\n"); return 1; } |