[Drdivx-commits] SF.net SVN: drdivx: [404] DrDivX/trunk/mp3gain
Brought to you by:
harikrishnan_v,
seabass089
From: <ro...@us...> - 2006-08-21 16:13:50
|
Revision: 404 Author: robux4 Date: 2006-08-21 09:13:39 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/drdivx/?rev=404&view=rev Log Message: ----------- misc fixes given by gcc Modified Paths: -------------- DrDivX/trunk/mp3gain/apetag.c DrDivX/trunk/mp3gain/apetag.h DrDivX/trunk/mp3gain/export/include/mp3gain.h DrDivX/trunk/mp3gain/mp3gain.c Modified: DrDivX/trunk/mp3gain/apetag.c =================================================================== --- DrDivX/trunk/mp3gain/apetag.c 2006-08-21 15:40:20 UTC (rev 403) +++ DrDivX/trunk/mp3gain/apetag.c 2006-08-21 16:13:39 UTC (rev 404) @@ -408,7 +408,7 @@ #endif } -int ReadMP3GainAPETag (char *filename, struct MP3GainTagInfo *info, struct FileTagsStruct *fileTags) { +int ReadMP3GainAPETag (const char *filename, struct MP3GainTagInfo *info, struct FileTagsStruct *fileTags) { FILE *fi; long tag_offset, offs_bk; @@ -436,7 +436,7 @@ }; /* need to have already called ReadMP3GainAPETag and filled in the info and fileTags structures */ -int WriteMP3GainAPETag (char *filename, struct MP3GainTagInfo *info, struct FileTagsStruct *fileTags, int saveTimeStamp) { +int WriteMP3GainAPETag (const char *filename, struct MP3GainTagInfo *info, struct FileTagsStruct *fileTags, int saveTimeStamp) { FILE *outputFile; unsigned long newTagLength; unsigned long newTagCount; @@ -658,7 +658,7 @@ outputFile = fopen(filename,"r+b"); if (outputFile == NULL) { - passError( MP3GAIN_UNSPECIFED_ERROR, 3, + passError( MP3GAIN_UNSPECIFED_ERROR, 3, NULL, "\nCan't open ", filename, " for modifying\n"); return 0; } @@ -684,7 +684,7 @@ return 1; }; -int RemoveMP3GainAPETag (char *filename, int saveTimeStamp) { +int RemoveMP3GainAPETag (const char *filename, int saveTimeStamp) { struct MP3GainTagInfo info; struct FileTagsStruct fileTags; Modified: DrDivX/trunk/mp3gain/apetag.h =================================================================== --- DrDivX/trunk/mp3gain/apetag.h 2006-08-21 15:40:20 UTC (rev 403) +++ DrDivX/trunk/mp3gain/apetag.h 2006-08-21 16:13:39 UTC (rev 404) @@ -69,10 +69,10 @@ unsigned char *id31tag; }; -int ReadMP3GainAPETag (char *filename, struct MP3GainTagInfo *info, struct FileTagsStruct *fileTags); +int ReadMP3GainAPETag (const char *filename, struct MP3GainTagInfo *info, struct FileTagsStruct *fileTags); -int WriteMP3GainAPETag (char *filename, struct MP3GainTagInfo *info, struct FileTagsStruct *fileTags, int saveTimeStamp); +int WriteMP3GainAPETag (const char *filename, struct MP3GainTagInfo *info, struct FileTagsStruct *fileTags, int saveTimeStamp); -int RemoveMP3GainAPETag (char *filename, int saveTimeStamp); +int RemoveMP3GainAPETag (const char *filename, int saveTimeStamp); #endif Modified: DrDivX/trunk/mp3gain/export/include/mp3gain.h =================================================================== --- DrDivX/trunk/mp3gain/export/include/mp3gain.h 2006-08-21 15:40:20 UTC (rev 403) +++ DrDivX/trunk/mp3gain/export/include/mp3gain.h 2006-08-21 16:13:39 UTC (rev 404) @@ -45,12 +45,12 @@ #ifdef asWIN32DLL -void changeGain(char *filename, int leftgainchange, int rightgainchange); +void changeGain(const char *filename, int leftgainchange, int rightgainchange); #endif -int deleteFile(char *filename); -int moveFile(char *currentfilename, char *newfilename); +int deleteFile(const char *filename); +int moveFile(const char *currentfilename, const char *newfilename); typedef enum { storeTime, @@ -60,7 +60,7 @@ void passError(MMRESULT lerrnum, int numStrings, user_report *report, ...); /* Get/Set file datetime stamp */ -void fileTime(char *filename, timeAction action); +void fileTime(const char *filename, timeAction action); /* DivX, Inc. * a basic function that can be called for callback Modified: DrDivX/trunk/mp3gain/mp3gain.c =================================================================== --- DrDivX/trunk/mp3gain/mp3gain.c 2006-08-21 15:40:20 UTC (rev 403) +++ DrDivX/trunk/mp3gain/mp3gain.c 2006-08-21 16:13:39 UTC (rev 404) @@ -48,6 +48,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <ctype.h> #include "apetag.h" #ifdef AACGAIN #include "aacgain.h" @@ -154,7 +155,7 @@ unsigned char *wrdpntr; unsigned char *curframe; -char *curfilename; +const char *curfilename; FILE *inf = NULL; @@ -336,7 +337,7 @@ int i; va_list marker; - va_start(marker, numStrings); + va_start(marker, report); for (i = 0; i < numStrings; i++) { totalStrLen += strlen(va_arg(marker, const char *)); } @@ -345,7 +346,7 @@ errstr = (char *)malloc(totalStrLen + 3); errstr[0] = '\0'; - va_start(marker, numStrings); + va_start(marker, report); for (i = 0; i < numStrings; i++) { strcat(errstr,va_arg(marker, const char *)); } @@ -490,7 +491,7 @@ static -long getSizeOfFile(char *filename) +long getSizeOfFile(const char *filename) { long size = 0; FILE *file; @@ -506,12 +507,12 @@ } -int deleteFile(char *filename) +int deleteFile(const char *filename) { return remove(filename); } -int moveFile(char *currentfilename, char *newfilename) +int moveFile(const char *currentfilename, const char *newfilename) { return rename(currentfilename, newfilename); } @@ -523,7 +524,7 @@ -void fileTime(char *filename, timeAction action) +void fileTime(const char *filename, timeAction action) { static int timeSaved=0; #ifdef WIN32 @@ -692,9 +693,9 @@ static #endif #ifdef AACGAIN -int changeGain(char *filename, AACGainHandle aacH, int leftgainchange, int rightgainchange +int changeGain(const char *filename, AACGainHandle aacH, int leftgainchange, int rightgainchange #else -int changeGain(char *filename, int leftgainchange, int rightgainchange +int changeGain(const char *filename, int leftgainchange, int rightgainchange #endif , user_report *report ) { @@ -1119,9 +1120,9 @@ aac_set_tag_int_2(aacH, replaygain_undo, info->undoLeft, info->undoRight); } -void changeGainAndTag(char *filename, AACGainHandle aacH, int leftgainchange, int rightgainchange, struct MP3GainTagInfo *tag, struct FileTagsStruct *fileTag +void changeGainAndTag(const char *filename, AACGainHandle aacH, int leftgainchange, int rightgainchange, struct MP3GainTagInfo *tag, struct FileTagsStruct *fileTag #else -void changeGainAndTag(char *filename, int leftgainchange, int rightgainchange, struct MP3GainTagInfo *tag, struct FileTagsStruct *fileTag +void changeGainAndTag(const char *filename, int leftgainchange, int rightgainchange, struct MP3GainTagInfo *tag, struct FileTagsStruct *fileTag #endif ,user_report *report) { double dblGainChange; @@ -1208,7 +1209,7 @@ } static -int queryUserForClipping(char * argv_mainloop,int intGainChange +int queryUserForClipping(const char * argv_mainloop,int intGainChange , user_report *report) { char ch; @@ -1230,7 +1231,7 @@ } static -void showVersion(char *progname +void showVersion(const char *progname , user_report *report) { #ifdef AACGAIN report->error(report->dbg_cookie, "aacgain version %s, derived from mp3gain version %s\n",AACGAIN_VERSION,MP3GAIN_VERSION); @@ -1285,7 +1286,7 @@ static -void errUsage(char *progname +void errUsage(const char *progname , user_report *report) { showVersion(progname, report); report->error(report->dbg_cookie, "copyright(c) 2001-2004 by Glen Sawyer\n"); @@ -1305,7 +1306,7 @@ static -void fullUsage(char *progname +void fullUsage(const char *progname , user_report *report) { showVersion(progname, report); report->error(report->dbg_cookie, "copyright(c) 2001-2004 by Glen Sawyer\n"); @@ -1473,7 +1474,7 @@ char chtmp; unsigned char fakebuf[4608]; #ifdef _LIB - char *argv[6]; + const char *argv[6]; int argc = 0; argv[argc++] = "mp3gain"; argv[argc++] = "-r"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |