Subversion Repositories SvarDOS

Rev

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

Rev 269 Rev 272
Line 26... Line 26...
26
  int matchfound = 0;
26
  int matchfound = 0;
27
 
27
 
28
  sprintf(buff, "%s\\packages", dosdir);
28
  sprintf(buff, "%s\\packages", dosdir);
29
  dp = opendir(buff);
29
  dp = opendir(buff);
30
  if (dp == NULL) {
30
  if (dp == NULL) {
31
    kitten_printf(9, 0, "Error: Could not access directory %s", buff);
31
    kitten_printf(9, 0, "ERROR: Could not access directory %s", buff);
32
    puts("");
32
    puts("");
33
    return(-1);
33
    return(-1);
34
  }
34
  }
35
 
35
 
36
  while ((ep = readdir(dp)) != NULL) { /* readdir() result must never be freed (statically allocated) */
36
  while ((ep = readdir(dp)) != NULL) { /* readdir() result must never be freed (statically allocated) */
Line 76... Line 76...
76
  char buff[256];
76
  char buff[256];
77
 
77
 
78
  sprintf(buff, "%s\\packages\\%s.lst", dosdir, pkgname);
78
  sprintf(buff, "%s\\packages\\%s.lst", dosdir, pkgname);
79
  fd = fopen(buff, "rb");
79
  fd = fopen(buff, "rb");
80
  if (fd == NULL) {
80
  if (fd == NULL) {
81
    kitten_printf(9, 1, "Error: Local package %s not found.", pkgname);
81
    kitten_printf(9, 1, "ERROR: Local package '%s' not found.", pkgname);
82
    puts("");
82
    puts("");
83
    return(NULL);
83
    return(NULL);
84
  }
84
  }
85
  /* iterate through all lines of the file */
85
  /* iterate through all lines of the file */
86
  while (freadtokval(fd, buff, sizeof(buff), NULL, 0) == 0) {
86
  while (freadtokval(fd, buff, sizeof(buff), NULL, 0) == 0) {