1: /* Fortran get home directory PLWard 3/20/80 */
   2: #include <pwd.h>
   3: struct passwd *getpwuid();
   4: 
   5: char homedr_(name,length)
   6:     char name[];
   7:     long length;
   8: {
   9:     register struct passwd *pp;
  10:     int i,j;
  11: 
  12:     pp = getpwuid(getuid());
  13:     for (i=0;i < length;i++) name[i]=' ';
  14:     for (i=0;pp->pw_dir[i] != '\0';i++);
  15:     if  (i > length) return;
  16:     for (j=0; j < i; j++)
  17:         name[j]=pp->pw_dir[j];
  18: }

Defined functions

homedr_ defined in line 5; never used
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 655
Valid CSS Valid XHTML 1.0 Strict