Rev 10 | Rev 3840 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10 | Rev 3718 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | 17 | ||
18 | /* Computes class connection count (unit: student-minutes) */ |
18 | /* Computes class connection count (unit: student-minutes) */ |
19 | 19 | ||
20 | #include "../wimsdef.h" |
20 | #include "../wimsdef.h" |
21 | #include "../includes.h" |
21 | #include "../includes.h" |
- | 22 | #include "../Lib/basicstr.c" |
|
22 | 23 | ||
23 | /* The maximal number of sessions within one day */ |
24 | /* The maximal number of sessions within one day */ |
24 | #define MAX_SESSIONS (128*1024) |
25 | #define MAX_SESSIONS (128*1024) |
25 | /* The maximal number of classes within one day */ |
26 | /* The maximal number of classes within one day */ |
26 | #define MAX_CLASSES 8192 |
27 | #define MAX_CLASSES 8192 |
Line 122... | Line 123... | ||
122 | struct stat st; |
123 | struct stat st; |
123 | char *buf; |
124 | char *buf; |
124 | if(stat(s,&st)==-1) { |
125 | if(stat(s,&st)==-1) { |
125 | if(strrchr(s,'/')!=NULL) { |
126 | if(strrchr(s,'/')!=NULL) { |
126 | buf=xmalloc(strlen(s)+1); |
127 | buf=xmalloc(strlen(s)+1); |
127 |
|
128 | ovlstrcpy(buf,s); *strrchr(buf,'/')=0; |
128 | mkdirs(buf); free(buf); |
129 | mkdirs(buf); free(buf); |
129 | } |
130 | } |
130 | mkdir(s,-1); |
131 | mkdir(s,-1); |
131 | } |
132 | } |
132 | } |
133 | } |