[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4220 - in Extractor/src: include main plugins
From: |
grothoff |
Subject: |
[GNUnet-SVN] r4220 - in Extractor/src: include main plugins |
Date: |
Sat, 6 Jan 2007 12:01:44 -0800 (PST) |
Author: grothoff
Date: 2007-01-06 12:01:38 -0800 (Sat, 06 Jan 2007)
New Revision: 4220
Modified:
Extractor/src/include/extractor.h
Extractor/src/main/extractor.c
Extractor/src/plugins/nsfeextractor.c
Log:
fixing memory leaks, version bumps, avoiding export of symbols where not
necessary
Modified: Extractor/src/include/extractor.h
===================================================================
--- Extractor/src/include/extractor.h 2007-01-06 12:36:27 UTC (rev 4219)
+++ Extractor/src/include/extractor.h 2007-01-06 20:01:38 UTC (rev 4220)
@@ -32,7 +32,7 @@
* 0.2.6-1 => 0x00020601
* 4.5.2-0 => 0x04050200
*/
-#define EXTRACTOR_VERSION 0x00051700
+#define EXTRACTOR_VERSION 0x00051701
#include <stdio.h>
@@ -169,7 +169,6 @@
EXTRACTOR_FULL_NAME = 113,
EXTRACTOR_CHAPTER = 114,
EXTRACTOR_YEAR = 115,
-
EXTRACTOR_LINK = 116,
EXTRACTOR_MUSIC_CD_IDENTIFIER = 117,
EXTRACTOR_PLAY_COUNTER = 118,
@@ -178,8 +177,7 @@
EXTRACTOR_ENCODED_BY = 121,
EXTRACTOR_TIME = 122,
EXTRACTOR_MUSICIAN_CREDITS_LIST = 123,
- EXTRACTOR_MOOD = 124,
-
+ EXTRACTOR_MOOD = 124,
EXTRACTOR_FORMAT_VERSION = 125,
EXTRACTOR_TELEVISION_SYSTEM = 126,
EXTRACTOR_SONG_COUNT = 127,
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2007-01-06 12:36:27 UTC (rev 4219)
+++ Extractor/src/main/extractor.c 2007-01-06 20:01:38 UTC (rev 4220)
@@ -171,7 +171,7 @@
gettext_noop("song count"),
gettext_noop("starting song"),
gettext_noop("hardware dependency"),
- gettext_noop("ripper"),
+ gettext_noop("ripper"), /* 130 */
NULL,
};
Modified: Extractor/src/plugins/nsfeextractor.c
===================================================================
--- Extractor/src/plugins/nsfeextractor.c 2007-01-06 12:36:27 UTC (rev
4219)
+++ Extractor/src/plugins/nsfeextractor.c 2007-01-06 20:01:38 UTC (rev
4220)
@@ -57,7 +57,7 @@
char firstsong;
};
-int nsfeuint( char * data )
+static int nsfeuint(const char * data )
{
int i, value = 0;
@@ -74,7 +74,7 @@
return( value );
}
-char * nsfestring( char * data, int size )
+static char * nsfestring(const char * data, int size )
{
char *s;
int length;
@@ -88,7 +88,7 @@
length = strlen( data );
}
- s = ( char * ) malloc( length + 1 );
+ s = malloc( length + 1 );
if( data != NULL )
{
@@ -116,17 +116,17 @@
return( keyword );
}
-struct EXTRACTOR_Keywords * libextractor_nsfe_info_extract
+static struct EXTRACTOR_Keywords * libextractor_nsfe_info_extract
(
- char * data,
+ const char * data,
size_t size,
struct EXTRACTOR_Keywords * prev
)
{
- struct infochunk *ichunk;
+ const struct infochunk *ichunk;
char songs[ 32 ];
- ichunk = ( struct infochunk * ) data;
+ ichunk = (const struct infochunk * ) data;
if( size < 8 )
{
@@ -194,9 +194,9 @@
}
-struct EXTRACTOR_Keywords * libextractor_nsfe_tlbl_extract
+static struct EXTRACTOR_Keywords * libextractor_nsfe_tlbl_extract
(
- char * data,
+ const char * data,
size_t size,
struct EXTRACTOR_Keywords * prev
)
@@ -209,16 +209,16 @@
{
title = nsfestring( &data[ size - left ], left );
prev = addkword( prev, title, EXTRACTOR_TITLE );
-
left -= ( strlen( title ) + 1 );
+ free(title);
}
return( prev );
}
-struct EXTRACTOR_Keywords * libextractor_nsfe_auth_extract
+static struct EXTRACTOR_Keywords * libextractor_nsfe_auth_extract
(
- char * data,
+ const char * data,
size_t size,
struct EXTRACTOR_Keywords * prev
)
@@ -236,9 +236,9 @@
album = nsfestring( &data[ size - left ], left );
prev = addkword( prev, album, EXTRACTOR_ALBUM );
-
+
left -= ( strlen( album ) + 1 );
-
+ free(album);
if( left < 1 )
{
return( prev );
@@ -248,7 +248,7 @@
prev = addkword( prev, artist, EXTRACTOR_ARTIST );
left -= ( strlen( artist ) + 1 );
-
+ free(artist);
if( left < 1 )
{
return( prev );
@@ -258,7 +258,7 @@
prev = addkword( prev, copyright, EXTRACTOR_COPYRIGHT );
left -= ( strlen( copyright ) + 1 );
-
+ free(copyright);
if( left < 1 )
{
return( prev );
@@ -266,7 +266,7 @@
ripper = nsfestring( &data[ size - left ], left );
prev = addkword( prev, ripper, EXTRACTOR_RIPPER );
-
+ free(ripper);
return( prev );
}
@@ -281,12 +281,12 @@
struct EXTRACTOR_Keywords * libextractor_nsfe_extract
(
const char * filename,
- char * data,
+ const char * data,
size_t size,
struct EXTRACTOR_Keywords * prev
)
{
- struct header *head;
+ const struct header *head;
int i;
char chunkid[ 5 ] = " ";
@@ -297,7 +297,7 @@
return( prev );
}
- head = ( struct header * ) data;
+ head = (const struct header * ) data;
/* Check "magic" id bytes */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4220 - in Extractor/src: include main plugins,
grothoff <=