[Extractor-gtk-cvslog] SF.net SVN: extractor-gtk: [61] trunk/extractor
Extract files from unusual archive formats
Brought to you by:
someone-guy
From: <som...@us...> - 2008-02-22 22:15:00
|
Revision: 61 http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=61&view=rev Author: someone-guy Date: 2008-02-22 14:14:58 -0800 (Fri, 22 Feb 2008) Log Message: ----------- extract_file has no reason to modify file_t, so make the argument const. Modified Paths: -------------- trunk/extractor/formats.h trunk/extractor/helpers.c trunk/extractor/helpers.h Modified: trunk/extractor/formats.h =================================================================== --- trunk/extractor/formats.h 2008-02-22 22:14:43 UTC (rev 60) +++ trunk/extractor/formats.h 2008-02-22 22:14:58 UTC (rev 61) @@ -21,7 +21,7 @@ int (*check_file)(FILE *in); ///< check function for format autodetection file_t *(*get_list)(FILE *in); ///< get a list of files in archive void (*free_list)(file_t *list); ///< free file list obtained via get_list - int (*extract_file)(FILE *in, file_t *file, FILE *out); ///< extract a file + int (*extract_file)(FILE *in, const file_t *file, FILE *out); ///< extract a file } fmt_desc_t; extern const fmt_desc_t nwn_fmt; Modified: trunk/extractor/helpers.c =================================================================== --- trunk/extractor/helpers.c 2008-02-22 22:14:43 UTC (rev 60) +++ trunk/extractor/helpers.c 2008-02-22 22:14:58 UTC (rev 61) @@ -118,7 +118,7 @@ * \param out file to write data into * \return number of bytes written to out */ -int default_extract_file(FILE *in, file_t *file, FILE *out) { +int default_extract_file(FILE *in, const file_t *file, FILE *out) { fseek(in, file->start, SEEK_SET); return fcopy(in, out, file->len); } Modified: trunk/extractor/helpers.h =================================================================== --- trunk/extractor/helpers.h 2008-02-22 22:14:43 UTC (rev 60) +++ trunk/extractor/helpers.h 2008-02-22 22:14:58 UTC (rev 61) @@ -12,5 +12,5 @@ struct file_s; void default_free_list(struct file_s *list); void default_free_ignorepriv(struct file_s *list); -int default_extract_file(FILE *in, struct file_s *file, FILE *out); +int default_extract_file(FILE *in, const struct file_s *file, FILE *out); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |