Back to index

wims  3.65+svn20090927
Defines | Functions | Variables
homedir.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define putcnt   (sizeof(putlist)/sizeof(putlist[0]))

Functions

void homedir (void)

Variables

char * putlist []

Define Documentation

#define putcnt   (sizeof(putlist)/sizeof(putlist[0]))

Definition at line 27 of file homedir.c.


Function Documentation

void homedir ( void  )

Definition at line 29 of file homedir.c.

{
    char buf[MAX_LINELEN+1], fname[4096];
    char *p1;
    struct stat st;
    int i,t;
    for(i=0;i<putcnt;i++) {
       t=stat(putlist[i],&st); if(t || !S_ISDIR(st.st_mode)) continue;
       snprintf(fname,sizeof(fname),"%s/.wimshome",putlist[i]);
       accessfile(buf,"r","%s",fname);
       p1=find_word_start(buf); *find_word_end(p1)=0;
       if(strcmp(p1,cwd)==0) continue;
       accessfile(cwd,"w","%s",fname);
       chmod(fname,S_IRUSR|S_IWUSR);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

char* putlist[]
Initial value:
{
    "public_html/modules","public_html/modules/devel",
      "public_html/modules/local",
      "public_html/bases","public_html/bases/doc",
      "other"
}

Definition at line 21 of file homedir.c.