Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <grp.h>
  3. #include <unistd.h>
  4.  
  5. static int tag = 0;
  6.  
  7. struct group *
  8. getgrent(void)
  9. {
  10.   if (tag == 0)
  11.   {
  12.     tag = 1;
  13.     return getgrgid(getgid());
  14.   }
  15.   return 0;
  16. }
  17.  
  18. /* ARGSUSED */
  19. struct group *
  20. fgetgrent(void *f)
  21. {
  22.   return getgrent();
  23. }
  24.  
  25. void
  26. setgrent(void)
  27. {
  28.   tag = 0;
  29. }
  30.  
  31. void
  32. endgrent(void)
  33. {
  34.   tag = 0;
  35. }
  36.