whoami.c 633 B

123456789101112131415161718192021222324252627282930
  1. /*!
  2. \file lib/db/dbmi_base/whoami.c
  3. \brief DBMI Library (base) - who am i
  4. (C) 1999-2009, 2011 by the GRASS Development Team
  5. This program is free software under the GNU General Public License
  6. (>=v2). Read the file COPYING that comes with GRASS for details.
  7. \author Joel Jones (CERL/UIUC), Radim Blazek
  8. \author Doxygenized by Martin Landa <landa.martin gmail.com> (2011)
  9. */
  10. #include <stdlib.h>
  11. #include <stdio.h>
  12. #include <grass/gis.h>
  13. /*!
  14. \brief Who am i?
  15. Check environmental variable LOGNAME
  16. \return string buffer with logname
  17. */
  18. const char *db_whoami()
  19. {
  20. return G_store(getenv("LOGNAME"));
  21. }