GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71817
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 *s)
Copy string to allocated memory.
Definition: strings.c:86
char * getenv()