GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
db/dbmi_base/whoami.c
Go to the documentation of this file.
1 /*!
2  \file lib/db/dbmi_base/whoami.c
3 
4  \brief DBMI Library (base) - who am i
5 
6  (C) 1999-2009, 2011 by the GRASS Development Team
7 
8  This program is free software under the GNU General Public License
9  (>=v2). Read the file COPYING that comes with GRASS for details.
10 
11  \author Joel Jones (CERL/UIUC), Radim Blazek
12  \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
13 */
14 
15 #include <stdlib.h>
16 #include <stdio.h>
17 #include <grass/gis.h>
18 
19 /*!
20  \brief Who am i?
21 
22  Check environmental variable LOGNAME
23 
24  \return string buffer with logname
25 */
26 const char *db_whoami()
27 {
28  return G_store(getenv("LOGNAME"));
29 }
const char * db_whoami()
Who am i?
char * G_store(const char *)
Copy string to allocated memory.
Definition: strings.c:87
char * getenv()