BRL-CAD
bu_gethostname.c
Go to the documentation of this file.
1 /* T E S T _ G E T H O S T N A M E . C
2  * BRL-CAD
3  *
4  * Copyright (c) 2011-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 
21 #include "common.h"
22 
23 #include <stdio.h>
24 
25 #include "bu.h"
26 
27 
28 int
29 main(void)
30 {
31  char host[100];
32  int status;
33 
34  status = bu_gethostname(host, 100);
35  printf("%s\n", host);
36  printf("%d\n", status);
37 
38  return status;
39 }
40 
41 
42 /*
43  * Local Variables:
44  * mode: C
45  * tab-width: 8
46  * indent-tabs-mode: t
47  * c-file-style: "stroustrup"
48  * End:
49  * ex: shiftwidth=4 tabstop=8
50  */
int bu_gethostname(char *hostname, size_t len)
Definition: gethostname.c:30
Header file for the BRL-CAD common definitions.
int main(void)