Subversion Repositories SvarDOS

Rev

Rev 231 | Rev 248 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 231 Rev 240
Line 5... Line 5...
5
 * It contains a few helper function...
5
 * It contains a few helper function...
6
 */
6
 */
7
 
7
 
8
 
8
 
9
#include <ctype.h>    /* tolower() */
9
#include <ctype.h>    /* tolower() */
-
 
10
#include <direct.h>   /* provides the mkdir() prototype */
10
#include <string.h>   /* */
11
#include <string.h>   /* */
11
#include <stdio.h>    /* sprintf() */
12
#include <stdio.h>    /* sprintf() */
12
#include <stdlib.h>   /* atoi() */
13
#include <stdlib.h>   /* atoi() */
13
#include <sys/stat.h> /* mkdir() */
14
#include <sys/stat.h> /* mkdir() */
14
 
15
 
15
#include "version.h"
-
 
16
 
-
 
17
#include <direct.h>  /* provides the mkdir() prototype */
-
 
18
#define MAKEDIR(x) mkdir(x);
-
 
19
 
-
 
20
#include "helpers.h"
16
#include "helpers.h"
21
 
17
 
22
 
18
 
23
/* translates a version string into a array of integer values. The array must be 8-position long.
19
/* translates a version string into a array of integer values. The array must be 8-position long.
24
   returns 0 if parsing was successful, non-zero otherwise.
20
   returns 0 if parsing was successful, non-zero otherwise.
Line 179... Line 175...
179
    if (((dirs[x] == '/') || (dirs[x] == '\\')) && (x > 0)) {
175
    if (((dirs[x] == '/') || (dirs[x] == '\\')) && (x > 0)) {
180
      if (dirs[x - 1] != ':') { /* avoid d:\ stuff */
176
      if (dirs[x - 1] != ':') { /* avoid d:\ stuff */
181
        savechar = dirs[x];
177
        savechar = dirs[x];
182
        dirs[x] = 0;
178
        dirs[x] = 0;
183
        /* make the dir */
179
        /* make the dir */
184
        MAKEDIR(dirs);
180
        mkdir(dirs);
185
        dirs[x] = savechar;
181
        dirs[x] = savechar;
186
      }
182
      }
187
    }
183
    }
188
  }
184
  }
189
}
185
}