Subversion Repositories SvarDOS

Rev

Rev 995 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 995 Rev 1678
Line 1... Line 1...
1
/*
1
/*
2
 * This file is part of pkg (SvarDOS package manager)
2
 * This file is part of pkg (SvarDOS package manager)
3
 * Copyright (C) 2012-2022 Mateusz Viste
3
 * Copyright (C) 2012-2024 Mateusz Viste
4
 *
4
 *
5
 * It contains a few helper function...
5
 * It contains a few helper function...
6
 */
6
 */
7
 
7
 
8
 
8
 
Line 24... Line 24...
24
    if (str[x] == '/') str[x] = '\\';
24
    if (str[x] == '/') str[x] = '\\';
25
  }
25
  }
26
}
26
}
27
 
27
 
28
 
28
 
-
 
29
/* trim CRC from a filename and returns a pointer to the CRC part.
-
 
30
 * this is used to parse filename lines from LSM files */
-
 
31
char *trimfnamecrc(char *fname) {
-
 
32
  while (*fname) {
-
 
33
    if (*fname == '?') {
-
 
34
      *fname = 0;
-
 
35
      return(fname + 1);
-
 
36
    }
-
 
37
    fname++;
-
 
38
  }
-
 
39
  return(0);
-
 
40
}
-
 
41
 
-
 
42
 
29
void removeDoubleBackslashes(char *str) {
43
void removeDoubleBackslashes(char *str) {
30
  char *curpos;
44
  char *curpos;
31
  int x;
45
  int x;
32
  for (;;) {
46
  for (;;) {
33
    curpos = strstr(str, "\\\\");
47
    curpos = strstr(str, "\\\\");