Subversion Repositories SvarDOS

Rev

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

Rev 225 Rev 231
Line 12... Line 12...
12
#include <stdlib.h>   /* atoi() */
12
#include <stdlib.h>   /* atoi() */
13
#include <sys/stat.h> /* mkdir() */
13
#include <sys/stat.h> /* mkdir() */
14
 
14
 
15
#include "version.h"
15
#include "version.h"
16
 
16
 
17
#ifdef __WATCOMC__
-
 
18
  #include <direct.h>  /* provides the mkdir() prototype */
17
#include <direct.h>  /* provides the mkdir() prototype */
19
  #define MAKEDIR(x) mkdir(x);
18
#define MAKEDIR(x) mkdir(x);
20
#else
-
 
21
  #define MAKEDIR(x) mkdir(x, S_IWUSR); /* S_IWUSR is to make the directory READONLY bit NOT set */
-
 
22
#endif
-
 
23
 
19
 
24
#include "helpers.h"
20
#include "helpers.h"
25
 
21
 
26
 
22
 
27
/* translates a version string into a array of integer values. The array must be 8-position long.
23
/* translates a version string into a array of integer values. The array must be 8-position long.
Line 193... Line 189...
193
}
189
}
194
 
190
 
195
 
191
 
196
/* returns a pointer to the start of the filename, out of a path\to\file string, and
192
/* returns a pointer to the start of the filename, out of a path\to\file string, and
197
   fills respath with the local folder where the file should be placed. */
193
   fills respath with the local folder where the file should be placed. */
198
char *computelocalpath(char *longfilename, char *respath, char *dosdir, struct customdirs *dirlist) {
194
char *computelocalpath(char *longfilename, char *respath, const char *dosdir, const struct customdirs *dirlist) {
199
  int x, lastsep = 0, firstsep = -1;
195
  int x, lastsep = 0, firstsep = -1;
200
  char savedchar;
196
  char savedchar;
201
  char *shortfilename, *pathstart;
197
  char *shortfilename, *pathstart;
202
  pathstart = longfilename;
198
  pathstart = longfilename;
203
  for (x = 0; longfilename[x] != 0; x++) {
199
  for (x = 0; longfilename[x] != 0; x++) {