1 /* print the hexadecimal identifier for the current host
3 Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free
4 Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation,
18 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 /* Written by Jim Meyering. */
24 #include <sys/types.h>
27 #include "long-options.h"
30 /* The official name of this program (e.g., no `g' prefix). */
31 #define PROGRAM_NAME "hostid"
33 #define AUTHORS "Jim Meyering"
35 /* The name this program was run with, for error messages. */
41 if (status
!= EXIT_SUCCESS
)
42 fprintf (stderr
, _("Try `%s --help' for more information.\n"),
49 Print the numeric identifier (in hexadecimal) for the current host.\n\
52 program_name
, program_name
);
53 fputs (HELP_OPTION_DESCRIPTION
, stdout
);
54 fputs (VERSION_OPTION_DESCRIPTION
, stdout
);
55 printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT
);
61 main (int argc
, char **argv
)
65 initialize_main (&argc
, &argv
);
66 program_name
= argv
[0];
67 setlocale (LC_ALL
, "");
68 bindtextdomain (PACKAGE
, LOCALEDIR
);
71 atexit (close_stdout
);
73 parse_long_options (argc
, argv
, PROGRAM_NAME
, GNU_PACKAGE
, VERSION
,
74 usage
, AUTHORS
, (char const *) NULL
);
78 error (0, 0, _("too many arguments"));