1 /*****************************************************************************/
2 /* */
3 /* (C) Copyright 1992-1996 Alberto Pasquale */
4 /* Portions (C) Copyright 1999 Per Lundberg */
5 /* */
6 /* A L L R I G H T S R E S E R V E D */
7 /* */
8 /*****************************************************************************/
9 /* */
10 /* How to contact the author: Alberto Pasquale of 2:332/504@fidonet */
11 /* Viale Verdi 106 */
12 /* 41100 Modena */
13 /* Italy */
14 /* */
15 /*****************************************************************************/
16
17 #include <sys/stat.h>
18 #include <sys/types.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include <ctype.h>
22 #include <limits.h>
23 #include <unistd.h>
24 #include "apgenlib.hpp"
25
mkdirpath(const char * path)26 int mkdirpath (const char *path)
27 {
28 int created = mkdir (path, 0644);
29
30 return created ? 0 : 1;
31 }
32
33
cdd(const char * newdir)34 int cdd (const char *newdir)
35 {
36 if (chdir (newdir))
37 return 1;
38
39 return 0;
40 }
41
42