Subversion Repositories SvarDOS

Rev

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

Rev 234 Rev 242
Line 160... Line 160...
160
  return(res);
160
  return(res);
161
}
161
}
162
 
162
 
163
 
163
 
164
/* Prints files owned by a package */
164
/* Prints files owned by a package */
165
void listfilesofpkg(char *pkgname, const char *dosdir) {
165
int listfilesofpkg(const char *pkgname, const char *dosdir) {
166
  struct flist_t *flist, *flist_ptr;
166
  struct flist_t *flist, *flist_ptr;
167
  /* load the list of files belonging to pkgname */
167
  /* load the list of files belonging to pkgname */
168
  flist = pkg_loadflist(pkgname, dosdir);
168
  flist = pkg_loadflist(pkgname, dosdir);
-
 
169
  if (flist == NULL) return(-1);
169
  /* display each filename on screen */
170
  /* display each filename on screen */
170
  for (flist_ptr = flist; flist_ptr != NULL; flist_ptr = flist_ptr->next) {
171
  for (flist_ptr = flist; flist_ptr != NULL; flist_ptr = flist_ptr->next) {
171
    printf("%s\n", flist_ptr->fname);
172
    puts(flist_ptr->fname);
172
  }
173
  }
173
  /* free the list of files */
174
  /* free the list of files */
174
  pkg_freeflist(flist);
175
  pkg_freeflist(flist);
-
 
176
  return(0);
175
}
177
}