2 * gen_uuid.c --- generate a DCE-compatible uuid
4 * Copyright (C) 1999, Andreas Dilger and Theodore Ts'o
7 * This file may be redistributed under the terms of the GNU Public
22 #include "uuid/uuid.h"
23 #include "nls-enable.h"
25 #define DO_TYPE_TIME 1
26 #define DO_TYPE_RANDOM 2
28 static void usage(const char *progname)
30 fprintf(stderr, _("Usage: %s [-r] [-t]\n"), progname);
35 main (int argc, char *argv[])
42 while ((c = getopt (argc, argv, "tr")) != EOF)
45 do_type = DO_TYPE_TIME;
48 do_type = DO_TYPE_RANDOM;
56 uuid_generate_time(uu);
59 uuid_generate_random(uu);
66 uuid_unparse(uu, str);