[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r467 - in Extractor: doc doc/lj libltdl src/include src/mai
From: |
grothoff |
Subject: |
[GNUnet-SVN] r467 - in Extractor: doc doc/lj libltdl src/include src/main src/plugins src/plugins/hash src/plugins/ole2 src/plugins/oo src/plugins/pdf src/plugins/printable src/plugins/rpm src/plugins/thumbnail src/test |
Date: |
Sun, 20 Mar 2005 15:56:31 -0800 (PST) |
Author: grothoff
Date: 2005-03-20 15:56:28 -0800 (Sun, 20 Mar 2005)
New Revision: 467
Modified:
Extractor/doc/demux_asf.c
Extractor/doc/demux_nsf.c
Extractor/doc/demux_qt.c
Extractor/doc/demux_wc3movie.c
Extractor/doc/lj/addkeyword.c
Extractor/doc/lj/minimal.c
Extractor/doc/lj/signature.c
Extractor/libltdl/ltdl.c
Extractor/src/include/extractor.h
Extractor/src/include/gettext.h
Extractor/src/include/platform.h
Extractor/src/include/winproc.h
Extractor/src/main/extract.c
Extractor/src/main/extractor.c
Extractor/src/main/iconv.c
Extractor/src/main/libextractor_python.c
Extractor/src/main/winproc.c
Extractor/src/plugins/asfextractor.c
Extractor/src/plugins/convert.c
Extractor/src/plugins/debextractor.c
Extractor/src/plugins/dviextractor.c
Extractor/src/plugins/elfextractor.c
Extractor/src/plugins/filenameextractor.c
Extractor/src/plugins/gifextractor.c
Extractor/src/plugins/hash/md5extractor.c
Extractor/src/plugins/hash/rmd160extractor.c
Extractor/src/plugins/hash/sha1extractor.c
Extractor/src/plugins/htmlextractor.c
Extractor/src/plugins/id3v23extractor.c
Extractor/src/plugins/id3v24extractor.c
Extractor/src/plugins/id3v2extractor.c
Extractor/src/plugins/jpegextractor.c
Extractor/src/plugins/lowerextractor.c
Extractor/src/plugins/manextractor.c
Extractor/src/plugins/mimeextractor.c
Extractor/src/plugins/mp3extractor.c
Extractor/src/plugins/mpegextractor.c
Extractor/src/plugins/oggextractor.c
Extractor/src/plugins/ole2/gsf-impl-utils.h
Extractor/src/plugins/ole2/gsf-infile-impl.h
Extractor/src/plugins/ole2/gsf-infile-msole.c
Extractor/src/plugins/ole2/gsf-infile-msole.h
Extractor/src/plugins/ole2/gsf-infile.h
Extractor/src/plugins/ole2/gsf-input-memory.c
Extractor/src/plugins/ole2/gsf-input.c
Extractor/src/plugins/ole2/gsf-msole-impl.h
Extractor/src/plugins/ole2/gsf-shared-memory.c
Extractor/src/plugins/ole2/gsf-utils.c
Extractor/src/plugins/ole2/gsf-utils.h
Extractor/src/plugins/ole2/gsf.h
Extractor/src/plugins/ole2/ole2extractor.c
Extractor/src/plugins/oo/ooextractor.c
Extractor/src/plugins/pack.c
Extractor/src/plugins/pack.h
Extractor/src/plugins/pdf/Decrypt.cc
Extractor/src/plugins/pdf/FontEncoding.cc
Extractor/src/plugins/pdf/Stream.cc
Extractor/src/plugins/pdf/gfile.cc
Extractor/src/plugins/pdf/pdfextractor.cc
Extractor/src/plugins/pngextractor.c
Extractor/src/plugins/printable/bloomfilter.c
Extractor/src/plugins/printable/bloomfilter.h
Extractor/src/plugins/printable/dictionary-builder.c
Extractor/src/plugins/printable/printableextractor.c
Extractor/src/plugins/printable/sha1.c
Extractor/src/plugins/psextractor.c
Extractor/src/plugins/qtextractor.c
Extractor/src/plugins/realextractor.c
Extractor/src/plugins/riffextractor.c
Extractor/src/plugins/rpm/rpmextractor.c
Extractor/src/plugins/splitextractor.c
Extractor/src/plugins/tarextractor.c
Extractor/src/plugins/templateextractor.c
Extractor/src/plugins/thumbnail/thumbnailextractor.c
Extractor/src/plugins/tiffextractor.c
Extractor/src/plugins/wavextractor.c
Extractor/src/test/keywordlisttest.c
Extractor/src/test/multiload.c
Extractor/src/test/plugintest.c
Extractor/src/test/trivialtest.c
Log:
removing tailing whitespace
Modified: Extractor/doc/demux_asf.c
===================================================================
--- Extractor/doc/demux_asf.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/doc/demux_asf.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -93,7 +93,7 @@
uint32_t packet_size;
uint8_t packet_flags;
uint32_t data_size;
-
+
asf_stream_t streams[MAX_NUM_STREAMS];
uint32_t bitrates[MAX_NUM_STREAMS];
int num_streams;
@@ -144,7 +144,7 @@
off_t header_size;
int buf_flag_seek;
-
+
/* first packet position */
int64_t first_packet_pos;
@@ -172,7 +172,7 @@
/* printf ("%02x ", buf); */
if (i != 1) {
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: end of data\n");
this->status = DEMUX_FINISHED;
}
@@ -190,7 +190,7 @@
/* printf (" [%02x %02x] ", buf[0], buf[1]); */
if (i != 2) {
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: end of data\n");
this->status = DEMUX_FINISHED;
}
@@ -208,7 +208,7 @@
/* printf ("%02x %02x %02x %02x ", buf[0], buf[1], buf[2], buf[3]); */
if (i != 4) {
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: end of data\n");
this->status = DEMUX_FINISHED;
}
@@ -224,12 +224,12 @@
i = this->input->read (this->input, buf, 8);
if (i != 8) {
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: end of data\n");
this->status = DEMUX_FINISHED;
}
- return (uint64_t) buf[0]
+ return (uint64_t) buf[0]
| ((uint64_t) buf[1] << 8)
| ((uint64_t) buf[2] << 16)
| ((uint64_t) buf[3] << 24)
@@ -249,7 +249,7 @@
for(i = 0; i < 8; i++) {
g.v4[i] = get_byte(this);
}
-
+
for (i = 1; i < GUID_END; i++) {
if (!memcmp(&g, &guids[i].guid, sizeof(GUID))) {
#ifdef LOG
@@ -258,8 +258,8 @@
return i;
}
}
-
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: unknown GUID: 0x%x, 0x%x, 0x%x, "
"{ 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx }\n",
g.v1, g.v2, g.v3,
@@ -339,7 +339,7 @@
guid = get_guid(this);
if (guid != GUID_ASF_HEADER) {
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: file doesn't start with an asf header\n");
return 0;
}
@@ -440,7 +440,7 @@
this->reorder_w = (buffer[2]<<8)|buffer[1];
this->reorder_b = (buffer[4]<<8)|buffer[3];
this->reorder_w /= this->reorder_b;
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: audio conceal interleave detected (%d x %d
x %d)\n",
this->reorder_w, this->reorder_h, this->reorder_b );
} else {
@@ -763,13 +763,13 @@
#endif
}
}
-
+
this->last_frame_pts = pts;
}
}
-static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_stream_t *stream,
+static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_stream_t *stream,
int frag_offset, int seq,
int64_t timestamp,
int frag_len, int payload_size) {
@@ -782,7 +782,7 @@
/* new packet */
stream->seq = seq;
} else {
- if (seq == stream->seq &&
+ if (seq == stream->seq &&
frag_offset == stream->frag_offset) {
/* continuing packet */
} else {
@@ -799,19 +799,19 @@
}
}
-
+
while( frag_len ) {
if ( frag_len < stream->fifo->buffer_pool_buf_size )
bufsize = frag_len;
else
bufsize = stream->fifo->buffer_pool_buf_size;
-
+
buf = stream->fifo->buffer_pool_alloc (stream->fifo);
this->input->read (this->input, buf->content, bufsize);
buf->extra_info->input_pos = this->input->get_current_pos (this->input);
if (this->rate)
- buf->extra_info->input_time = (int)((int64_t)buf->extra_info->input_pos
+ buf->extra_info->input_time = (int)((int64_t)buf->extra_info->input_pos
* 1000 / this->rate);
else
buf->extra_info->input_time = 0;
@@ -827,13 +827,13 @@
buf->type = stream->buf_type;
buf->size = bufsize;
timestamp = 0;
-
+
stream->frag_offset += bufsize;
frag_len -= bufsize;
package_done = (stream->frag_offset == payload_size);
- if ((buf->type & BUF_MAJOR_MASK) == BUF_VIDEO_BASE)
+ if ((buf->type & BUF_MAJOR_MASK) == BUF_VIDEO_BASE)
check_newpts (this, buf->pts, PTS_VIDEO, package_done);
else
check_newpts (this, buf->pts, PTS_AUDIO, package_done);
@@ -1000,7 +1000,7 @@
this->input->seek (this->input, this->packet_size_left, SEEK_CUR);
if (!asf_get_packet(this)) {
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: get_packet failed\n");
this->status = DEMUX_FINISHED;
return ;
@@ -1008,7 +1008,7 @@
if (this->packet_padsize > this->packet_size) {
/* skip packet */
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: invalid padsize: %d\n", this->packet_padsize);
this->frame = this->nb_frames - 1;
return;
@@ -1066,7 +1066,7 @@
case 3:
seq = get_le32(this); s_hdr_size += 4; break;
default:
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: seq=0\n");
seq = 0;
}
@@ -1079,7 +1079,7 @@
case 3:
frag_offset = get_le32(this); s_hdr_size += 4; break;
default:
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: frag_offset=0\n");
frag_offset = 0;
}
@@ -1101,7 +1101,7 @@
if (rlen > this->packet_size_left) {
/* skip packet */
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: invalid rlen %d\n", rlen);
this->frame = this->nb_frames - 1;
return;
@@ -1148,7 +1148,7 @@
if (data_length > this->packet_size_left) {
/* skip packet */
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: invalid data_length\n");
this->frame = this->nb_frames - 1;
return;
@@ -1196,7 +1196,7 @@
this->input->seek (this->input, rlen - 8, SEEK_CUR);
s_hdr_size += rlen - 8;
} else {
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: strange rlen %d\n", rlen);
timestamp = 0;
payload_size = 0;
@@ -1232,7 +1232,7 @@
if (frag_len > this->packet_size_left) {
/* skip packet */
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: invalid frag_len %d\n", frag_len);
this->frame = this->nb_frames - 1;
return;
@@ -1313,7 +1313,7 @@
if (!strncmp(href, "http", 4)) {
memcpy(href, "mmsh", 4);
}
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG)
printf("demux_asf: http ref: %s\n", href);
uevent.type = XINE_EVENT_MRL_REFERENCE;
uevent.stream = this->stream;
@@ -1376,7 +1376,7 @@
}
}
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf("demux_asf: asf ref: %s\n", ptr);
uevent.type = XINE_EVENT_MRL_REFERENCE;
uevent.stream = this->stream;
@@ -1601,7 +1601,7 @@
if (!asf_read_header (this)) {
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf ("demux_asf: asf_read_header failed.\n");
this->status = DEMUX_FINISHED;
@@ -1634,7 +1634,7 @@
stream_id = this->streams[i].stream_id;
bitrate = this->bitrates[stream_id];
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG)
printf("demux_asf: stream: %d, bitrate %d bps\n", stream_id, bitrate);
if ((buf_type == BUF_VIDEO_BASE) &&
(bitrate > max_vrate || this->video_stream_id == 0)) {
@@ -1659,7 +1659,7 @@
this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = bitrate;
- if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf("demux_asf: video stream_id: %d, audio stream_id: %d\n",
this->video_stream_id, this->audio_stream_id);
@@ -1821,7 +1821,7 @@
break;
default:
- printf ("demux_asf: warning, unkown method %d\n",
+ printf ("demux_asf: warning, unkown method %d\n",
stream->content_detection_method);
return NULL;
}
Modified: Extractor/doc/demux_nsf.c
===================================================================
--- Extractor/doc/demux_nsf.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/doc/demux_nsf.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -20,7 +20,7 @@
* NSF File "Demuxer" by Mike Melanson (address@hidden)
* This is really just a loader for NES Music File Format (extension NSF)
* which loads an entire NSF file and passes it over to the NSF audio
- * decoder.
+ * decoder.
*
* After the file is sent over, the demuxer controls the playback by
* sending empty buffers with incrementing pts values.
@@ -175,7 +175,7 @@
buf->decoder_info[1] = this->current_song;
this->new_song = 0;
- sprintf(title, "%s, song %d/%d",
+ sprintf(title, "%s, song %d/%d",
this->title, this->current_song, this->total_songs);
if (this->stream->meta_info[XINE_META_INFO_TITLE])
free (this->stream->meta_info[XINE_META_INFO_TITLE]);
@@ -316,7 +316,7 @@
demux_nsf_t *this;
if (! (input->get_capabilities(input) & INPUT_CAP_SEEKABLE)) {
- if (stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
+ if (stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf(_("demux_nsf.c: input not seekable, can not handle!\n"));
return NULL;
}
Modified: Extractor/doc/demux_qt.c
===================================================================
--- Extractor/doc/demux_qt.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/doc/demux_qt.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -221,7 +221,7 @@
/* flags that indicate how a trak is supposed to be used */
unsigned int flags;
-
+
/* decoder data pass information to the AAC decoder */
void *decoder_config;
int decoder_config_len;
@@ -267,7 +267,7 @@
unsigned int modification_time;
unsigned int timescale; /* base clock frequency is Hz */
unsigned int duration;
-
+
int64_t moov_first_offset;
int trak_count;
@@ -335,7 +335,7 @@
* lazyqt special debugging functions
**********************************************************************/
-/* define DEBUG_ATOM_LOAD as 1 to get a verbose parsing of the relevant
+/* define DEBUG_ATOM_LOAD as 1 to get a verbose parsing of the relevant
* atoms */
#define DEBUG_ATOM_LOAD 0
@@ -357,7 +357,7 @@
/* Define DEBUG_DUMP_MOOV as 1 to dump the raw moov atom to disk. This is
* particularly useful in debugging a file with a compressed moov (cmov)
- * atom. The atom will be dumped to the filename specified as
+ * atom. The atom will be dumped to the filename specified as
* RAW_MOOV_FILENAME. */
#define DEBUG_DUMP_MOOV 0
#define RAW_MOOV_FILENAME "moovatom.raw"
@@ -637,7 +637,7 @@
return 0;
} else {
/* check that the next atom in the chunk contains alphanumeric
- * characters in the atom type field; if not, disqualify the file
+ * characters in the atom type field; if not, disqualify the file
* as a QT file */
qt_file->seek(qt_file, moov_atom_offset + ATOM_PREAMBLE_SIZE, SEEK_SET);
if (qt_file->read(qt_file, atom_preamble, ATOM_PREAMBLE_SIZE) !=
@@ -665,7 +665,7 @@
static int mp4_read_descr_len(unsigned char *s, uint32_t *length) {
uint8_t b;
uint8_t numBytes = 0;
-
+
*length = 0;
do {
@@ -741,7 +741,7 @@
break;
}
}
-
+
debug_atom_load(" qt: parsing %s trak atom\n",
(trak->type == MEDIA_VIDEO) ? "video" :
(trak->type == MEDIA_AUDIO) ? "audio" : "other");
@@ -762,7 +762,7 @@
trak->properties.video.width =
BE_16(&trak_atom[i + 0x50]);
trak->properties.video.height =
- BE_16(&trak_atom[i + 0x54]);
+ BE_16(&trak_atom[i + 0x54]);
}
}
} else if (current_atom == ELST_ATOM) {
@@ -837,7 +837,7 @@
* fix at the end of the stsd parser */
i += hack_adjust;
}
-
+
if (trak->type == MEDIA_VIDEO) {
/* initialize to sane values */
@@ -849,7 +849,7 @@
trak->properties.video.palette_count = 0;
/* fetch video parameters */
- if( BE_16(&trak_atom[i + 0x2C]) &&
+ if( BE_16(&trak_atom[i + 0x2C]) &&
BE_16(&trak_atom[i + 0x2E]) ) {
trak->properties.video.width =
BE_16(&trak_atom[i + 0x2C]);
@@ -877,9 +877,9 @@
/* compute the greyscale palette */
color_index = 255;
- color_dec = 256 /
+ color_dec = 256 /
(trak->properties.video.palette_count - 1);
- for (j = 0;
+ for (j = 0;
j < trak->properties.video.palette_count;
j++) {
@@ -904,7 +904,7 @@
else
color_table = qt_default_palette_256;
- for (j = 0;
+ for (j = 0;
j < trak->properties.video.palette_count;
j++) {
@@ -931,7 +931,7 @@
color_index = BE_16(&trak_atom[i + 0x6A + j * 8]);
if (color_count & 0x8000)
color_index = j;
- if (color_index <
+ if (color_index <
trak->properties.video.palette_count) {
trak->properties.video.palette[color_index].r =
trak_atom[i + 0x6A + j * 8 + 2];
@@ -982,12 +982,12 @@
trak->properties.audio.bits / 8;
trak->properties.audio.samples_per_frame =
trak->properties.audio.channels;
- trak->properties.audio.bytes_per_frame =
- trak->properties.audio.bytes_per_sample *
+ trak->properties.audio.bytes_per_frame =
+ trak->properties.audio.bytes_per_sample *
trak->properties.audio.samples_per_frame;
- trak->properties.audio.samples_per_packet =
+ trak->properties.audio.samples_per_packet =
trak->properties.audio.samples_per_frame;
- trak->properties.audio.bytes_per_packet =
+ trak->properties.audio.bytes_per_packet =
trak->properties.audio.bytes_per_sample;
/* special case time: some ima4-encoded files don't have the
@@ -995,7 +995,7 @@
if (BE_32(&trak_atom[i + 0x10]) == IMA4_FOURCC) {
trak->properties.audio.samples_per_packet = 64;
trak->properties.audio.bytes_per_packet = 34;
- trak->properties.audio.bytes_per_frame = 34 *
+ trak->properties.audio.bytes_per_frame = 34 *
trak->properties.audio.channels;
trak->properties.audio.bytes_per_sample = 2;
trak->properties.audio.samples_per_frame = 64 *
@@ -1009,19 +1009,19 @@
if (BE_32(&trak_atom[i + 0x0C]) > 0x24) {
if (BE_32(&trak_atom[i + 0x30]))
- trak->properties.audio.samples_per_packet =
+ trak->properties.audio.samples_per_packet =
BE_32(&trak_atom[i + 0x30]);
if (BE_32(&trak_atom[i + 0x34]))
- trak->properties.audio.bytes_per_packet =
+ trak->properties.audio.bytes_per_packet =
BE_32(&trak_atom[i + 0x34]);
if (BE_32(&trak_atom[i + 0x38]))
- trak->properties.audio.bytes_per_frame =
+ trak->properties.audio.bytes_per_frame =
BE_32(&trak_atom[i + 0x38]);
if (BE_32(&trak_atom[i + 0x3C]))
- trak->properties.audio.bytes_per_sample =
+ trak->properties.audio.bytes_per_sample =
BE_32(&trak_atom[i + 0x3C]);
trak->properties.audio.samples_per_frame =
- (trak->properties.audio.bytes_per_frame /
+ (trak->properties.audio.bytes_per_frame /
trak->properties.audio.bytes_per_packet) *
trak->properties.audio.samples_per_packet;
@@ -1038,10 +1038,10 @@
trak->properties.audio.vbr = 1;
/* check for a MS-style WAVE format header */
- if ((current_atom_size >= 0x48) &&
+ if ((current_atom_size >= 0x48) &&
(BE_32(&trak_atom[i + 0x44]) == WAVE_ATOM)) {
trak->properties.audio.wave_present = 1;
- memcpy(&trak->properties.audio.wave,
+ memcpy(&trak->properties.audio.wave,
&trak_atom[i + 0x5C],
sizeof(trak->properties.audio.wave));
xine_waveformatex_le2me(&trak->properties.audio.wave);
@@ -1079,12 +1079,12 @@
} else if (current_atom == ESDS_ATOM) {
uint32_t len;
-
+
debug_atom_load(" qt/mpeg-4 esds atom\n");
- if ((trak->type == MEDIA_VIDEO) ||
+ if ((trak->type == MEDIA_VIDEO) ||
(trak->type == MEDIA_AUDIO)) {
-
+
j = i + 8;
if( trak_atom[j++] == 0x03 ) {
j += mp4_read_descr_len( &trak_atom[j], &len );
@@ -1386,9 +1386,9 @@
/* This is a little support function used to process the edit list when
* building a frame table. */
#define MAX_DURATION 0x7FFFFFFFFFFFFFFF
-static void get_next_edit_list_entry(qt_trak *trak,
+static void get_next_edit_list_entry(qt_trak *trak,
int *edit_list_index,
- unsigned int *edit_list_media_time,
+ unsigned int *edit_list_media_time,
int64_t *edit_list_duration,
unsigned int global_timescale) {
@@ -1405,9 +1405,9 @@
/* otherwise, find an edit list entries whose media time != -1 */
if (trak->edit_list_table[*edit_list_index].media_time != -1) {
- *edit_list_media_time =
+ *edit_list_media_time =
trak->edit_list_table[*edit_list_index].media_time;
- *edit_list_duration =
+ *edit_list_duration =
trak->edit_list_table[*edit_list_index].track_duration;
/* duration is in global timescale units; convert to trak timescale */
@@ -1421,8 +1421,8 @@
*edit_list_index = *edit_list_index + 1;
}
- /* on the way out, check if this is the last edit list entry; if so,
- * don't let the duration expire (so set it to an absurdly large value)
+ /* on the way out, check if this is the last edit list entry; if so,
+ * don't let the duration expire (so set it to an absurdly large value)
*/
if (*edit_list_index == trak->edit_list_count)
*edit_list_duration = MAX_DURATION;
@@ -1449,7 +1449,7 @@
/* AUDIO and OTHER frame types follow the same rules; VIDEO and vbr audio
* frame types follow a different set */
- if ((trak->type == MEDIA_VIDEO) ||
+ if ((trak->type == MEDIA_VIDEO) ||
(trak->properties.audio.vbr)) {
/* in this case, the total number of frames is equal to the number of
@@ -1544,11 +1544,11 @@
debug_edit_list(" %d: (before) pts = %lld...", i,
trak->frames[i].pts);
- if (trak->frames[i].pts < edit_list_media_time)
+ if (trak->frames[i].pts < edit_list_media_time)
trak->frames[i].pts = edit_list_pts_counter;
else {
if (i < trak->frame_count - 1)
- frame_duration =
+ frame_duration =
(trak->frames[i + 1].pts - trak->frames[i].pts);
debug_edit_list("duration = %lld...", frame_duration);
@@ -1617,7 +1617,7 @@
/* compute the actual chunk size */
trak->frames[j].size =
- (trak->frames[j].size *
+ (trak->frames[j].size *
trak->properties.audio.channels) /
trak->properties.audio.samples_per_frame *
trak->properties.audio.bytes_per_frame;
@@ -1671,7 +1671,7 @@
/* create a new trak structure */
info->trak_count++;
- info->traks = (qt_trak *)realloc(info->traks,
+ info->traks = (qt_trak *)realloc(info->traks,
info->trak_count * sizeof(qt_trak));
parse_trak_atom (&info->traks[info->trak_count - 1], &moov_atom[i - 4]);
@@ -1758,11 +1758,11 @@
/* iterate through 1..n-1 reference entries and decide on the right one */
for (i = 1; i < info->reference_count; i++) {
- if (info->references[i].qtim_version >
+ if (info->references[i].qtim_version >
info->references[info->chosen_reference].qtim_version)
info->chosen_reference = i;
else if ((info->references[i].data_rate <= bandwidth) &&
- (info->references[i].data_rate >
+ (info->references[i].data_rate >
info->references[info->chosen_reference].data_rate))
info->chosen_reference = i;
}
@@ -1832,7 +1832,7 @@
info->last_error = QT_FILE_READ_ERROR;
return info->last_error;
}
- if (input->read(input, moov_atom, moov_atom_size) !=
+ if (input->read(input, moov_atom, moov_atom_size) !=
moov_atom_size) {
free(moov_atom);
info->last_error = QT_FILE_READ_ERROR;
@@ -1933,7 +1933,7 @@
uevent.type = XINE_EVENT_MRL_REFERENCE;
uevent.stream = this->stream;
- uevent.data_length =
+ uevent.data_length =
strlen(this->qt->references[this->qt->chosen_reference].url) +
sizeof(xine_mrl_reference_data_t);
data = malloc(uevent.data_length);
@@ -1966,12 +1966,12 @@
/* if audio is present, send pts of current audio frame, otherwise
* send current video frame pts */
if (audio_trak)
- xine_demux_control_newpts(this->stream,
- audio_trak->frames[audio_trak->current_frame].pts,
+ xine_demux_control_newpts(this->stream,
+ audio_trak->frames[audio_trak->current_frame].pts,
BUF_FLAG_SEEK);
else
- xine_demux_control_newpts(this->stream,
- video_trak->frames[video_trak->current_frame].pts,
+ xine_demux_control_newpts(this->stream,
+ video_trak->frames[video_trak->current_frame].pts,
BUF_FLAG_SEEK);
}
@@ -2072,7 +2072,7 @@
frame_duration;
debug_video_demux(" qt: sending off video frame %d from offset 0x%llX, %d
bytes, %lld pts\n",
- i,
+ i,
video_trak->frames[i].offset,
video_trak->frames[i].size,
video_trak->frames[i].pts);
@@ -2122,7 +2122,7 @@
SEEK_SET);
debug_audio_demux(" qt: sending off audio frame %d from offset 0x%llX, %d
bytes, %lld pts\n",
- i,
+ i,
audio_trak->frames[i].offset,
audio_trak->frames[i].size,
audio_trak->frames[i].pts);
@@ -2139,8 +2139,8 @@
* turns around and sends out audio buffers as soon as they are
* received. If 2 or more consecutive audio buffers are dispatched to
* the audio out unit, the engine will compensate with pops. */
- if ((buf->type == BUF_AUDIO_LPCM_BE) ||
- (buf->type == BUF_AUDIO_LPCM_LE)) {
+ if ((buf->type == BUF_AUDIO_LPCM_BE) ||
+ (buf->type == BUF_AUDIO_LPCM_LE)) {
if (first_buf) {
buf->extra_info->input_time = audio_trak->frames[i].pts / 90;
buf->pts = audio_trak->frames[i].pts;
@@ -2169,7 +2169,7 @@
/* Special case alert: If this is signed, 8-bit data, transform
* the data to unsigned. */
- if ((audio_trak->properties.audio.bits == 8) &&
+ if ((audio_trak->properties.audio.bits == 8) &&
((audio_trak->properties.audio.codec_fourcc == TWOS_FOURCC) ||
(audio_trak->properties.audio.codec_fourcc == SOWT_FOURCC)))
for (j = 0; j < buf->size; j++)
@@ -2237,7 +2237,7 @@
this->bih.biBitCount = video_trak->properties.video.depth;
this->bih.biCompression = video_trak->properties.video.codec_fourcc;
- video_trak->properties.video.codec_buftype =
+ video_trak->properties.video.codec_buftype =
fourcc_to_buf_video(this->bih.biCompression);
/* hack: workaround a fourcc clash! 'mpg4' is used by MS and Sorenson
@@ -2245,17 +2245,17 @@
*/
if( video_trak->properties.video.codec_buftype == BUF_VIDEO_MSMPEG4_V1 )
video_trak->properties.video.codec_buftype = BUF_VIDEO_MPEG4;
-
- if( !video_trak->properties.video.codec_buftype &&
+
+ if( !video_trak->properties.video.codec_buftype &&
video_trak->properties.video.codec_fourcc )
video_trak->properties.video.codec_buftype = BUF_VIDEO_UNKNOWN;
this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] =
this->bih.biWidth;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] =
+ this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] =
this->bih.biHeight;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] =
+ this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] =
video_trak->properties.video.codec_fourcc;
} else {
@@ -2271,7 +2271,7 @@
if (this->qt->audio_trak != -1) {
- audio_trak->properties.audio.codec_buftype =
+ audio_trak->properties.audio.codec_buftype =
formattag_to_buf_audio(audio_trak->properties.audio.codec_fourcc);
if( !audio_trak->properties.audio.codec_buftype &&
@@ -2285,7 +2285,7 @@
audio_trak->properties.audio.sample_rate;
this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] =
audio_trak->properties.audio.bits;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_FOURCC] =
+ this->stream->stream_info[XINE_STREAM_INFO_AUDIO_FOURCC] =
audio_trak->properties.audio.codec_fourcc;
} else {
@@ -2325,13 +2325,13 @@
buf->size = sizeof(this->bih);
buf->type = video_trak->properties.video.codec_buftype;
this->video_fifo->put (this->video_fifo, buf);
-
+
/* send header info to decoder. some mpeg4 streams need this */
if( video_trak->decoder_config ) {
buf = this->video_fifo->buffer_pool_alloc (this->video_fifo);
buf->type = video_trak->properties.video.codec_buftype;
buf->size = video_trak->decoder_config_len;
- buf->content = video_trak->decoder_config;
+ buf->content = video_trak->decoder_config;
this->video_fifo->put (this->video_fifo, buf);
}
@@ -2372,7 +2372,7 @@
buf->content = (void *)&audio_trak->properties.audio.wave;
buf->size = sizeof(audio_trak->properties.audio.wave);
this->audio_fifo->put (this->audio_fifo, buf);
-
+
if( audio_trak->decoder_config ) {
buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
buf->type = audio_trak->properties.audio.codec_buftype;
@@ -2710,7 +2710,7 @@
*/
plugin_info_t xine_plugin_info[] = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_DEMUX, 20, "quicktime", XINE_VERSION_CODE, NULL, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
Modified: Extractor/doc/demux_wc3movie.c
===================================================================
--- Extractor/doc/demux_wc3movie.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/doc/demux_wc3movie.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -192,7 +192,7 @@
} else {
/* record the offset of the SHOT chunk */
- this->shot_offsets[this->current_shot] =
+ this->shot_offsets[this->current_shot] =
this->input->get_current_pos(this->input) - PREAMBLE_SIZE;
}
@@ -227,7 +227,7 @@
if( this->audio_fifo ) {
audio_pts = this->video_pts - WC3_PTS_INC;
-
+
while (chunk_size) {
buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
buf->type = BUF_AUDIO_LPCM_LE;
@@ -235,23 +235,23 @@
buf->extra_info->input_length = this->data_size;
buf->extra_info->input_time = audio_pts / 90;
buf->pts = audio_pts;
-
+
if (chunk_size > buf->max_size)
buf->size = buf->max_size;
else
buf->size = chunk_size;
chunk_size -= buf->size;
-
+
if (this->input->read(this->input, buf->content, buf->size) !=
buf->size) {
buf->free_buffer(buf);
this->status = DEMUX_FINISHED;
break;
}
-
+
if (!chunk_size)
buf->decoder_flags |= BUF_FLAG_FRAME_END;
-
+
this->audio_fifo->put (this->audio_fifo, buf);
}
}else{
@@ -321,7 +321,7 @@
/* load stream information */
this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- /* this is not strictly correct-- some WC3 MVE files do not contain
+ /* this is not strictly correct-- some WC3 MVE files do not contain
* audio, but I'm too lazy to check if that is the case */
this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->video_width;
@@ -392,7 +392,7 @@
if (this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE) {
this->input->seek(this->input, 0, SEEK_SET);
- if (this->input->read(this->input, header, WC3_HEADER_SIZE) !=
+ if (this->input->read(this->input, header, WC3_HEADER_SIZE) !=
WC3_HEADER_SIZE)
return 0;
} else {
@@ -443,7 +443,7 @@
return 0;
}
- if ((BE_32(&preamble[0]) != PALT_TAG) ||
+ if ((BE_32(&preamble[0]) != PALT_TAG) ||
(BE_32(&preamble[4]) != PALETTE_CHUNK_SIZE)) {
xine_log(this->stream->xine, XINE_LOG_MSG,
_("demux_wc3movie: There was a problem while loading palette
chunks\n"));
@@ -585,7 +585,7 @@
this->seek_flag = 1;
/* if input is non-seekable, do not proceed with the rest of this
- * seek function */
+ * seek function */
if ((this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE) == 0)
return this->status;
@@ -605,7 +605,7 @@
chunk_size = (BE_32(&preamble[4]) + 1) & (~1);
if (chunk_tag == SHOT_TAG) {
- this->shot_offsets[0] =
+ this->shot_offsets[0] =
this->input->get_current_pos(this->input) - PREAMBLE_SIZE;
/* skip the four SHOT data bytes (palette index) */
this->input->seek(this->input, 4, SEEK_CUR);
@@ -620,7 +620,7 @@
start_pos += this->data_start;
for (i = 0; i < this->number_of_shots - 1; i++) {
- /* if the next shot offset has not been recorded, traverse through the
+ /* if the next shot offset has not been recorded, traverse through the
* file until it is found */
if (this->shot_offsets[i + 1] == 0) {
@@ -637,7 +637,7 @@
chunk_size = (BE_32(&preamble[4]) + 1) & (~1);
if (chunk_tag == SHOT_TAG) {
- this->shot_offsets[i + 1] =
+ this->shot_offsets[i + 1] =
this->input->get_current_pos(this->input) - PREAMBLE_SIZE;
/* skip the four SHOT data bytes (palette index) */
this->input->seek(this->input, 4, SEEK_CUR);
@@ -650,7 +650,7 @@
/* check if the seek-to offset falls in between this shot offset and
* the next one */
- if ((start_pos >= this->shot_offsets[i]) &&
+ if ((start_pos >= this->shot_offsets[i]) &&
(start_pos < this->shot_offsets[i + 1])) {
new_shot = i;
@@ -817,7 +817,7 @@
#if 0
plugin_info_t xine_plugin_info[] = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_DEMUX, 20, "wc3movie", XINE_VERSION_CODE, NULL,
demux_wc3movie_init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
Modified: Extractor/doc/lj/addkeyword.c
===================================================================
--- Extractor/doc/lj/addkeyword.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/doc/lj/addkeyword.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -1,7 +1,7 @@
static void addKeyword
(struct EXTRACTOR_Keywords ** list,
char * keyword,
- EXTRACTOR_KeywordType type)
+ EXTRACTOR_KeywordType type)
{
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
Modified: Extractor/doc/lj/minimal.c
===================================================================
--- Extractor/doc/lj/minimal.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/doc/lj/minimal.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -1,11 +1,11 @@
-#include <extractor.h>
+#include <extractor.h>
int main(int argc, char * argv[]) {
EXTRACTOR_ExtractorList * plugins;
EXTRACTOR_KeywordList * md_list;
- plugins = EXTRACTOR_loadDefaultLibraries();
+ plugins = EXTRACTOR_loadDefaultLibraries();
md_list = EXTRACTOR_getKeywords(plugins, argv[1]);
- EXTRACTOR_printKeywords(stdout, md_list);
- EXTRACTOR_freeKeywords(md_list);
+ EXTRACTOR_printKeywords(stdout, md_list);
+ EXTRACTOR_freeKeywords(md_list);
EXTRACTOR_removeAll(plugins); /* unload plugins */
}
Modified: Extractor/doc/lj/signature.c
===================================================================
--- Extractor/doc/lj/signature.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/doc/lj/signature.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -1,4 +1,4 @@
-struct EXTRACTOR_Keywords *
+struct EXTRACTOR_Keywords *
libextractor_XXX_extract
(char * filename,
char * data,
Modified: Extractor/libltdl/ltdl.c
===================================================================
--- Extractor/libltdl/ltdl.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/libltdl/ltdl.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -1606,14 +1606,14 @@
static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0;
#ifndef NSADDIMAGE_OPTION_NONE
-#define NSADDIMAGE_OPTION_NONE 0x0
+#define NSADDIMAGE_OPTION_NONE 0x0
#endif
#ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR
#define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1
-#endif
+#endif
#ifndef NSADDIMAGE_OPTION_WITH_SEARCHING
#define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2
-#endif
+#endif
#ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
#define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4
#endif
@@ -1622,7 +1622,7 @@
#endif
#ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0
-#endif
+#endif
#ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1
#endif
@@ -1647,7 +1647,7 @@
if (!errstr || !strlen(errstr)) errstr = othererror;
return errstr;
}
-
+
static const struct mach_header *
lt_int_dyld_get_mach_header_from_nsmodule(module)
NSModule module;
@@ -1687,7 +1687,7 @@
lc = (struct load_command*)(((unsigned long)mh) + offset);
if (LC_ID_DYLIB == lc->cmd)
{
- retStr=(char*)(((struct
dylib_command*)lc)->dylib.name.offset +
+ retStr=(char*)(((struct
dylib_command*)lc)->dylib.name.offset +
(unsigned long)lc);
}
offset += lc->cmdsize;
@@ -1732,14 +1732,14 @@
lc = (struct load_command*)(((unsigned long)mh) +
offset);
if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB
== lc->cmd))
{
-
mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct
dylib_command*)lc)->dylib.name.offset +
+
mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct
dylib_command*)lc)->dylib.name.offset +
(unsigned long)lc));
if (!mh1)
{
/* Maybe NSAddImage can find it */
- mh1=ltdl_NSAddImage((char*)(((struct
dylib_command*)lc)->dylib.name.offset +
+ mh1=ltdl_NSAddImage((char*)(((struct
dylib_command*)lc)->dylib.name.offset +
(unsigned long)lc),
-
NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED +
+
NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED +
NSADDIMAGE_OPTION_WITH_SEARCHING +
NSADDIMAGE_OPTION_RETURN_ON_ERROR );
}
@@ -1747,7 +1747,7 @@
{
retSym = ltdl_NSLookupSymbolInImage(mh1,
symbol,
-
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
+
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
| NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
);
if (retSym) break;
@@ -1764,7 +1764,7 @@
{
int retCode = 0;
int err = 0;
- if (!_dyld_present()) {
+ if (!_dyld_present()) {
retCode=1;
}
else {
@@ -1785,7 +1785,7 @@
NSObjectFileImage ofi = 0;
NSObjectFileImageReturnCode ofirc;
- if (!filename)
+ if (!filename)
return (lt_module)-1;
ofirc = NSCreateObjectFileImageFromFile(filename, &ofi);
switch (ofirc)
@@ -1826,7 +1826,7 @@
if (((struct mach_header *)module)->magic == MH_MAGIC)
#else
if (((struct mach_header *)module)->magic == MH_CIGAM)
-#endif
+#endif
{
LT_DLMUTEX_SETERROR("Can not close a dylib");
retCode = 1;
@@ -1837,13 +1837,13 @@
/* Currently, if a module contains c++ static destructors and it is unloaded,
we
get a segfault in atexit(), due to compiler and dynamic loader differences
of
opinion, this works around that.
-*/
- if ((const struct section *)NULL !=
+*/
+ if ((const struct section *)NULL !=
getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module),
"__DATA","__mod_term_func"))
{
flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
- }
+ }
#endif
#ifdef __ppc__
flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
@@ -1877,31 +1877,31 @@
if (((struct mach_header *)module)->magic == MH_MAGIC)
#else
if (((struct mach_header *)module)->magic == MH_CIGAM)
-#endif
+#endif
{
if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage)
{
mh=module;
- if (ltdl_NSIsSymbolNameDefinedInImage((struct
mach_header*)module,symbol))
+ if (ltdl_NSIsSymbolNameDefinedInImage((struct
mach_header*)module,symbol))
{
nssym = ltdl_NSLookupSymbolInImage((struct
mach_header*)module,
symbol,
-
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
+
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
| NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
);
}
}
-
- }
+
+ }
else {
nssym = NSLookupSymbolInModule(module, symbol);
}
- if (!nssym)
+ if (!nssym)
{
if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module);
nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh);
}
- if (!nssym)
+ if (!nssym)
{
LT_DLMUTEX_SETERROR
(lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)));
return NULL;
Modified: Extractor/src/include/extractor.h
===================================================================
--- Extractor/src/include/extractor.h 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/include/extractor.h 2005-03-20 23:56:28 UTC (rev 467)
@@ -36,7 +36,7 @@
/* ignore the 'type' of the keyword when eliminating duplicates */
#define EXTRACTOR_DUPLICATES_TYPELESS 1
/* remove type 'UNKNOWN' if there is a duplicate keyword of
- known type, even if usually different types should be
+ known type, even if usually different types should be
preserved */
#define EXTRACTOR_DUPLICATES_REMOVE_UNKNOWN 2
@@ -49,7 +49,7 @@
* See also
* http://dublincore.org/documents/1998/09/dces/
*/
-typedef enum {
+typedef enum {
EXTRACTOR_UNKNOWN = 0,
EXTRACTOR_FILENAME = 1,
EXTRACTOR_MIMETYPE = 2,
@@ -75,7 +75,7 @@
EXTRACTOR_RESOURCE_IDENTIFIER = 22,
EXTRACTOR_SOURCE = 23,
EXTRACTOR_RELATION = 24,
- EXTRACTOR_COVERAGE = 25,
+ EXTRACTOR_COVERAGE = 25,
EXTRACTOR_SOFTWARE = 26,
EXTRACTOR_DISCLAIMER = 27,
EXTRACTOR_WARNING = 28,
@@ -196,17 +196,17 @@
* @return the new list of libraries, equal to prev iff an error occured
* or if config was empty (or NULL).
*/
-EXTRACTOR_ExtractorList *
+EXTRACTOR_ExtractorList *
EXTRACTOR_loadConfigLibraries(EXTRACTOR_ExtractorList * prev,
const char * config);
/**
- * Add a library for keyword extraction.
+ * Add a library for keyword extraction.
* @param prev the previous list of libraries, may be NULL
* @param library the name of the library
* @return the new list of libraries, equal to prev iff an error occured
*/
-EXTRACTOR_ExtractorList *
+EXTRACTOR_ExtractorList *
EXTRACTOR_addLibrary(EXTRACTOR_ExtractorList * prev,
const char * library);
@@ -217,7 +217,7 @@
* @return the new list of libraries, always equal to prev
* except if prev was NULL and no error occurs
*/
-EXTRACTOR_ExtractorList *
+EXTRACTOR_ExtractorList *
EXTRACTOR_addLibraryLast(EXTRACTOR_ExtractorList * prev,
const char * library);
@@ -227,7 +227,7 @@
* @param library the name of the library to remove
* @return the reduced list, unchanged if the library was not loaded
*/
-EXTRACTOR_ExtractorList *
+EXTRACTOR_ExtractorList *
EXTRACTOR_removeLibrary(EXTRACTOR_ExtractorList * prev,
const char * library);
@@ -244,7 +244,7 @@
* @return the list of keywords found in the file, NULL if none
* were found (or other errors)
*/
-EXTRACTOR_KeywordList *
+EXTRACTOR_KeywordList *
EXTRACTOR_getKeywords(EXTRACTOR_ExtractorList * extractor,
const char * filename);
@@ -254,8 +254,8 @@
* @param list the original keyword list (destroyed in the process!)
* @param options a set of options (DUPLICATES_XXXX)
* @return a list of keywords without duplicates
- */
-EXTRACTOR_KeywordList *
+ */
+EXTRACTOR_KeywordList *
EXTRACTOR_removeDuplicateKeywords(EXTRACTOR_KeywordList * list,
const unsigned int options);
@@ -293,7 +293,7 @@
* not be freed or manipulated by the client. It will become
* invalid once the keyword list is freed.
*/
-const char * EXTRACTOR_extractLast(const EXTRACTOR_KeywordType type,
+const char * EXTRACTOR_extractLast(const EXTRACTOR_KeywordType type,
EXTRACTOR_KeywordList * keywords);
/**
Modified: Extractor/src/include/gettext.h
===================================================================
--- Extractor/src/include/gettext.h 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/include/gettext.h 2005-03-20 23:56:28 UTC (rev 467)
@@ -53,8 +53,8 @@
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
/* slight modification here to avoid warnings: generate NO code,
not even the cast... */
-# define textdomain(Domainname)
-# define bindtextdomain(Domainname, Dirname)
+# define textdomain(Domainname)
+# define bindtextdomain(Domainname, Dirname)
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *)
(Codeset))
#endif
Modified: Extractor/src/include/platform.h
===================================================================
--- Extractor/src/include/platform.h 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/include/platform.h 2005-03-20 23:56:28 UTC (rev 467)
@@ -62,7 +62,7 @@
#ifndef MINGW
#define DIR_SEPARATOR '/'
-
+
#define CREAT(p, m) creat(p, m)
#undef FOPEN
#define FOPEN(f, m) fopen(f, m)
Modified: Extractor/src/include/winproc.h
===================================================================
--- Extractor/src/include/winproc.h 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/include/winproc.h 2005-03-20 23:56:28 UTC (rev 467)
@@ -196,7 +196,7 @@
#define NO_RECOVERY 3
#undef NO_ADDRESS
#define NO_ADDRESS 4
-
+
#define PROT_READ 0x1
#define PROT_WRITE 0x2
#define MAP_SHARED 0x1
@@ -277,7 +277,7 @@
BOOL bBlocking;
} Winsock;
extern Winsock *pSocks;
-extern unsigned int uiSockCount;
+extern unsigned int uiSockCount;
#define SHUT_RDWR SD_BOTH
Modified: Extractor/src/main/extract.c
===================================================================
--- Extractor/src/main/extract.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/main/extract.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -45,7 +45,7 @@
int p;
char * scp;
const char * trans;
-
+
printf(_("Usage: %s\n%s\n\n"),
gettext(general),
gettext(description));
@@ -65,7 +65,7 @@
printf("=%s",
opt[i].mandatoryArg);
slen += 1+strlen(opt[i].mandatoryArg);
- }
+ }
if (slen > BORDER) {
printf("\n%*s", BORDER, "");
slen = BORDER;
@@ -123,7 +123,7 @@
{
static Help help[] = {
{ 'a', "all", NULL,
- gettext_noop("do not remove any duplicates") },
+ gettext_noop("do not remove any duplicates") },
{ 'b', "bibtex", NULL,
gettext_noop("print output in bibtex format") },
{ 'B', "binary", "LANG",
@@ -137,7 +137,7 @@
{ 'H', "hash", "ALGORITHM",
gettext_noop("compute hash using the given ALGORITHM (currently sha1 or
md5)") },
{ 'l', "library", "LIBRARY",
- gettext_noop("load an extractor plugin named LIBRARY") },
+ gettext_noop("load an extractor plugin named LIBRARY") },
{ 'L', "list", NULL,
gettext_noop("list all keyword types") },
{ 'n', "nodefault", NULL,
@@ -159,7 +159,7 @@
formatHelp(_("extract [OPTIONS] [FILENAME]*"),
_("Extract metadata from files."),
help);
-
+
}
#include "iconv.c"
@@ -175,7 +175,7 @@
static void
printSelectedKeywords(FILE * handle,
EXTRACTOR_KeywordList * keywords,
- const int * print,
+ const int * print,
const int verbose)
{
char * keyword;
@@ -188,7 +188,7 @@
while (keywords != NULL) {
buf = NULL;
if (cd != (iconv_t) -1)
- keyword = iconvHelper(cd,
+ keyword = iconvHelper(cd,
keywords->keyword);
else
keyword = strdup(keywords->keyword);
@@ -200,7 +200,7 @@
} else {
if (NULL == EXTRACTOR_getKeywordTypeAsString(keywords->keywordType)) {
if (verbose == YES) {
- fprintf(handle,
+ fprintf(handle,
_("INVALID TYPE - %s\n"),
keyword);
}
@@ -221,8 +221,8 @@
* Take title, auth, year and return a string
*/
static char *
-splice(const char * title,
- const char * auth,
+splice(const char * title,
+ const char * auth,
const char * year)
{
char * temp = (char*)malloc(sizeof(char)*16);
@@ -248,7 +248,7 @@
static void
printSelectedKeywordsBibtex (FILE * handle,
EXTRACTOR_KeywordList * keywords,
- const int * print,
+ const int * print,
const char * filename)
{
const char * last = NULL;
@@ -334,7 +334,7 @@
fprintf(handle, "@misc{ %s,\n",splice(title, author, year));
if ( title )
- fprintf(handle, " title = \"%s\"%s\n", title,
+ fprintf(handle, " title = \"%s\"%s\n", title,
(last == title)?"":",");
if ( author )
fprintf(handle, " author = \"%s\"%s\n", author,
@@ -408,7 +408,7 @@
{"duplicates", 0, 0, 'd'},
{"filename", 0, 0, 'f'},
{"help", 0, 0, 'h'},
- {"hash", 1, 0, 'H'},
+ {"hash", 1, 0, 'H'},
{"list", 0, 0, 'L'},
{"library", 1, 0, 'l'},
{"nodefault", 0, 0, 'n'},
@@ -422,8 +422,8 @@
};
option_index = 0;
c = getopt_long (argc,
- argv, "vhbl:nsH:fp:x:LVdraB:",
- long_options,
+ argv, "vhbl:nsH:fp:x:LVdraB:",
+ long_options,
&option_index);
if (c == -1)
@@ -562,7 +562,7 @@
free(name);
}
if (hash != NULL) {
- char * name;
+ char * name;
name = malloc(strlen(hash) + strlen("libextractor_hash_") + 1);
strcpy(name, "libextractor_hash_");
strcat(name, hash);
@@ -570,7 +570,7 @@
name);
free(name);
}
-
+
if (splitKeywords == YES)
extractors = EXTRACTOR_addLibraryLast(extractors,
"libextractor_split");
@@ -582,7 +582,7 @@
}
/* extract keywords */
if ( bibtex == YES )
- fprintf(stdout,
+ fprintf(stdout,
_("%% BiBTeX file\n"));
for (i = optind; i < argc; i++)
{
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/main/extractor.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -77,7 +77,7 @@
gettext_noop("magnification"),
gettext_noop("release"),
gettext_noop("group"),
- gettext_noop("size"),
+ gettext_noop("size"),
gettext_noop("summary"),
gettext_noop("packager"),
gettext_noop("vendor"),
@@ -218,7 +218,7 @@
free(old_dlsearchpath);
#ifdef MINGW
ShutdownWinEnv();
-#endif
+#endif
lt_dlexit ();
}
@@ -226,7 +226,7 @@
/**
* Open a file
*/
-static int OPEN(const char *filename,
+static int OPEN(const char *filename,
int oflag, ...) {
int mode;
char *fn;
@@ -234,36 +234,36 @@
#ifdef MINGW
char szFile[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(filename, szFile)) != ERROR_SUCCESS)
{
errno = ENOENT;
SetLastError(lRet);
-
+
return -1;
}
fn = szFile;
#else
fn = (char *) filename;
#endif
-
+
if (oflag & O_CREAT)
{
va_list arg;
va_start(arg, oflag);
mode = va_arg(arg, int);
- va_end(arg);
+ va_end(arg);
}
else
{
mode = 0;
}
-
+
#ifdef MINGW
/* Set binary mode */
mode |= O_BINARY;
#endif
-
+
return open(fn, oflag, mode);
}
@@ -271,7 +271,7 @@
/**
* Load the default set of libraries. The default set of
- * libraries consists of the libraries that are part of
+ * libraries consists of the libraries that are part of
* the libextractor distribution (except split and filename
* extractor) plus the extractors that are specified
* in the environment variable "LIBEXTRACTOR_LIBRARIES".
@@ -404,7 +404,7 @@
*/
static int
loadLibrary (const char *name,
- void **libHandle,
+ void **libHandle,
ExtractMethod * method)
{
*libHandle = lt_dlopenext (name);
@@ -412,8 +412,8 @@
{
#if DEBUG
fprintf (stderr,
- _("Loading '%s' plugin failed: %s\n"),
- name,
+ _("Loading '%s' plugin failed: %s\n"),
+ name,
lt_dlerror ());
#endif
return -1;
@@ -434,7 +434,7 @@
* @return the new list of libraries, equal to prev iff an error occured
*/
EXTRACTOR_ExtractorList *
-EXTRACTOR_addLibrary (EXTRACTOR_ExtractorList * prev,
+EXTRACTOR_addLibrary (EXTRACTOR_ExtractorList * prev,
const char *library)
{
EXTRACTOR_ExtractorList *result;
@@ -459,7 +459,7 @@
* except if prev was NULL and no error occurs
*/
EXTRACTOR_ExtractorList *
-EXTRACTOR_addLibraryLast(EXTRACTOR_ExtractorList * prev,
+EXTRACTOR_addLibraryLast(EXTRACTOR_ExtractorList * prev,
const char *library)
{
EXTRACTOR_ExtractorList *result;
@@ -490,7 +490,7 @@
* @return the reduced list, unchanged if the library was not loaded
*/
EXTRACTOR_ExtractorList *
-EXTRACTOR_removeLibrary(EXTRACTOR_ExtractorList * prev,
+EXTRACTOR_removeLibrary(EXTRACTOR_ExtractorList * prev,
const char *library)
{
EXTRACTOR_ExtractorList *pos;
@@ -516,8 +516,8 @@
}
#if DEBUG
else
- fprintf(stderr,
- _("Unloading plugin '%s' failed!\n"),
+ fprintf(stderr,
+ _("Unloading plugin '%s' failed!\n"),
library);
#endif
return first;
@@ -589,7 +589,7 @@
removeKeyword (const char *keyword,
const EXTRACTOR_KeywordType type,
const unsigned int options,
- EXTRACTOR_KeywordList ** list,
+ EXTRACTOR_KeywordList ** list,
EXTRACTOR_KeywordList * current)
{
EXTRACTOR_KeywordList *first;
@@ -676,7 +676,7 @@
for (i=strlen(pos->keyword)-1;i>=0;i--)
if (! isspace(pos->keyword[i]))
allWhite = 0;
- if (allWhite)
+ if (allWhite)
{
EXTRACTOR_KeywordList * next;
next = pos->next;
@@ -688,7 +688,7 @@
free(pos);
pos = next;
}
- else
+ else
{
last = pos;
pos = pos->next;
@@ -706,7 +706,7 @@
* @param keywords the list of keywords to print, may be NULL
*/
void
-EXTRACTOR_printKeywords(FILE * handle,
+EXTRACTOR_printKeywords(FILE * handle,
EXTRACTOR_KeywordList * keywords)
{
iconv_t cd;
@@ -726,9 +726,9 @@
fprintf(handle,
_("%s - (binary)\n"),
gettext(keywordTypes[keywords->keywordType]));
- } else {
+ } else {
if (keywords->keywordType >= HIGHEST_TYPE_NUMBER)
- fprintf(handle,
+ fprintf(handle,
_("INVALID TYPE - %s\n"),
buf);
else
@@ -798,7 +798,7 @@
* @return the last matching keyword, or NULL if none matches
*/
const char *
-EXTRACTOR_extractLastByString (const char * type,
+EXTRACTOR_extractLastByString (const char * type,
EXTRACTOR_KeywordList * keywords)
{
char * result = NULL;
@@ -865,7 +865,7 @@
* Method: unloadInternal
* Signature: (J)V
*/
-JNIEXPORT void JNICALL
Java_org_ovmj_libextractor_Extractor_unloadInternal(JNIEnv * env,
+JNIEXPORT void JNICALL
Java_org_ovmj_libextractor_Extractor_unloadInternal(JNIEnv * env,
jclass c,
jlong arg) {
EXTRACTOR_removeAll((EXTRACTOR_ExtractorList*) (long) arg);
@@ -876,9 +876,9 @@
* Method: extractInternal
* Signature: (JLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL
Java_org_ovmj_libextractor_Extractor_extractInternal(JNIEnv * env,
+JNIEXPORT jlong JNICALL
Java_org_ovmj_libextractor_Extractor_extractInternal(JNIEnv * env,
jclass c,
-
jlong arg,
+
jlong arg,
jstring f) {
const char * fname;
jboolean bo;
@@ -897,8 +897,8 @@
* Method: freeInternal
* Signature: (J)V
*/
-JNIEXPORT void JNICALL
Java_org_ovmj_libextractor_Extractor_freeInternal(JNIEnv * env,
- jclass
c,
+JNIEXPORT void JNICALL
Java_org_ovmj_libextractor_Extractor_freeInternal(JNIEnv * env,
+ jclass
c,
jlong
list) {
EXTRACTOR_freeKeywords( (EXTRACTOR_KeywordList*) (long) list);
}
@@ -908,8 +908,8 @@
* Method: typeInternal
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL
Java_org_ovmj_libextractor_Extractor_typeInternal(JNIEnv * env,
- jclass
c,
+JNIEXPORT jint JNICALL
Java_org_ovmj_libextractor_Extractor_typeInternal(JNIEnv * env,
+ jclass
c,
jlong
list) {
if (list == 0)
return -1; /* error! */
@@ -921,8 +921,8 @@
* Method: keywordInternal
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL
Java_org_ovmj_libextractor_Extractor_keywordInternal(JNIEnv * env,
-
jclass c,
+JNIEXPORT jstring JNICALL
Java_org_ovmj_libextractor_Extractor_keywordInternal(JNIEnv * env,
+
jclass c,
jlong list) {
char * str;
if (list == 0)
@@ -936,8 +936,8 @@
* Method: nextInternal
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL
Java_org_ovmj_libextractor_Extractor_nextInternal(JNIEnv * env,
-
jclass j,
+JNIEXPORT jlong JNICALL
Java_org_ovmj_libextractor_Extractor_nextInternal(JNIEnv * env,
+
jclass j,
jlong
list) {
if (list == 0)
return 0; /* error! */
@@ -949,16 +949,16 @@
* Method: getTypeAsStringInternal
* Signature: (I)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL
Java_org_ovmj_libextractor_Extractor_getTypeAsStringInternal(JNIEnv * env,
-
jclass c,
+JNIEXPORT jstring JNICALL
Java_org_ovmj_libextractor_Extractor_getTypeAsStringInternal(JNIEnv * env,
+
jclass c,
jint type) {
const char * str;
if ( (type < 0) || (type > HIGHEST_TYPE_NUMBER) )
- return NULL; /* error! */
+ return NULL; /* error! */
str = gettext(keywordTypes[type]);
if (str == NULL)
return NULL;
- return (*env)->NewStringUTF(env,
+ return (*env)->NewStringUTF(env,
str);
}
@@ -968,7 +968,7 @@
* Method: getVersionInternal
* Signature: ()I
*/
-JNIEXPORT jint JNICALL
Java_org_ovmj_libextractor_Extractor_getVersionInternal(JNIEnv * env,
+JNIEXPORT jint JNICALL
Java_org_ovmj_libextractor_Extractor_getVersionInternal(JNIEnv * env,
jclass c) {
return EXTRACTOR_VERSION;
}
@@ -978,7 +978,7 @@
* Method: getMaxTypeInternal
* Signature: ()I
*/
-JNIEXPORT jint JNICALL
Java_org_ovmj_libextractor_Extractor_getMaxTypeInternal(JNIEnv * env,
+JNIEXPORT jint JNICALL
Java_org_ovmj_libextractor_Extractor_getMaxTypeInternal(JNIEnv * env,
jclass c) {
return HIGHEST_TYPE_NUMBER;
}
@@ -988,9 +988,9 @@
* Method: unloadPlugin
* Signature: (JLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL
Java_org_ovmj_libextractor_Extractor_unloadPlugin(JNIEnv * env,
-
jclass c,
- jlong
handle,
+JNIEXPORT jlong JNICALL
Java_org_ovmj_libextractor_Extractor_unloadPlugin(JNIEnv * env,
+
jclass c,
+ jlong
handle,
jstring name) {
const char * lname;
jboolean bo;
@@ -1001,7 +1001,7 @@
ret = (jlong) (long) EXTRACTOR_removeLibrary((EXTRACTOR_ExtractorList*)
(long) handle,
lname);
(*env)->ReleaseStringUTFChars(env, name, lname);
- return ret;
+ return ret;
}
/*
@@ -1009,9 +1009,9 @@
* Method: loadPlugin
* Signature: (JLjava/lang/String;Z)J
*/
-JNIEXPORT jlong JNICALL Java_org_ovmj_libextractor_Extractor_loadPlugin(JNIEnv
* env,
- jclass
c,
- jlong
handle,
+JNIEXPORT jlong JNICALL Java_org_ovmj_libextractor_Extractor_loadPlugin(JNIEnv
* env,
+ jclass
c,
+ jlong
handle,
jstring
name,
jboolean place) {
const char * lname;
@@ -1025,10 +1025,10 @@
lname);
} else {
ret = (jlong) (long) EXTRACTOR_addLibrary((EXTRACTOR_ExtractorList*)
(long) handle,
- lname);
+ lname);
}
(*env)->ReleaseStringUTFChars(env, name, lname);
- return ret;
+ return ret;
}
/* #ifdef HAVE_JNI_H */
Modified: Extractor/src/main/iconv.c
===================================================================
--- Extractor/src/main/iconv.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/main/iconv.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -22,14 +22,14 @@
buf = malloc(outSize);
ibuf = buf;
memset(buf, 0, outSize);
- if (iconv(cd,
+ if (iconv(cd,
(char**) &in,
&inSize,
- &ibuf,
+ &ibuf,
&outLeft) == (size_t)-1) {
/* conversion failed */
free(buf);
- return strdup(i);
+ return strdup(i);
}
return buf;
}
Modified: Extractor/src/main/libextractor_python.c
===================================================================
--- Extractor/src/main/libextractor_python.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/main/libextractor_python.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -31,7 +31,7 @@
PyObject * py_exts;
PyArg_ParseTuple(args, "O", &py_exts);
-
+
EXTRACTOR_removeAll((EXTRACTOR_ExtractorList*) PyCObject_AsVoidPtr(py_exts));
Py_INCREF(Py_None);
return Py_None;
@@ -41,9 +41,9 @@
PyObject * args) {
unsigned int type;
- PyArg_ParseTuple(args,
- "i",
- &type);
+ PyArg_ParseTuple(args,
+ "i",
+ &type);
return Py_BuildValue("s",
EXTRACTOR_getKeywordTypeAsString((EXTRACTOR_KeywordType)type));
}
@@ -64,7 +64,7 @@
ret = PyList_New(0);
pos = keys;
while (pos != NULL) {
- PyList_Append(ret,
+ PyList_Append(ret,
Py_BuildValue("(OO)",
PyInt_FromLong((long)pos->keywordType),
PyString_FromString(pos->keyword)));
@@ -86,7 +86,7 @@
{ NULL, NULL, 0, NULL }
};
-PyMODINIT_FUNC
+PyMODINIT_FUNC
initextractor() {
Py_InitModule("extractor", ExtractorMethods);
}
Modified: Extractor/src/main/winproc.c
===================================================================
--- Extractor/src/main/winproc.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/main/winproc.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -23,7 +23,7 @@
* @brief Functions for MS Windows
* @author Nils Durner
*/
-
+
/*** Note: this file differs from GNUnet's winproc.c ***/
#include "platform.h"
@@ -286,7 +286,7 @@
long lDirLen;
/* Get the path of the calling module.
- It should be located in one of the "bin" directories */
+ It should be located in one of the "bin" directories */
GetModuleFileName(NULL, szModule, MAX_PATH);
_splitpath(szModule, szDrv, szDir, NULL, NULL);
@@ -359,7 +359,7 @@
}
else
{
- /* C:\My Documents */
+ /* C:\My Documents */
long lRet;
lHomeDirLen = _MAX_PATH;
@@ -405,7 +405,7 @@
DWORD dwSize = 261;
GetUserName(szUser, &dwSize);
-
+
eAction = HOME;
lRet = DetermineHomeDir();
}
@@ -425,10 +425,10 @@
if(pszMsg2[lRet - 2] == '\r')
pszMsg2[lRet - 2] = 0;
- fprintf(stderr,
- eAction == ROOT
- ? _("Cannot determine root directory (%s)\n")
- : _("Cannot determine home directory (%s)\n"),
+ fprintf(stderr,
+ eAction == ROOT
+ ? _("Cannot determine root directory (%s)\n")
+ : _("Cannot determine home directory (%s)\n"),
pszMsg2);
LocalFree(pszMsg);
free(pszMsg2);
@@ -443,13 +443,13 @@
/* Open files in binary mode */
_fmode = _O_BINARY;
-
+
/* Get Windows version */
theWinVersion.dwOSVersionInfoSize = sizeof(theWinVersion);
GetVersionEx(&theWinVersion);
-
+
hNTDLL = LoadLibrary("ntdll.dll");
-
+
/* Function to get CPU usage under Win NT */
if (hNTDLL)
{
@@ -460,7 +460,7 @@
{
GNNtQuerySystemInformation = NULL;
}
-
+
/* Functions to get information about a network adapter */
hIphlpapi = LoadLibrary("iphlpapi.dll");
if (hIphlpapi)
@@ -476,7 +476,7 @@
GNGetIpAddrTable = NULL;
GNGetIfTable = NULL;
}
-
+
/* Use ANSI codepage for console IO */
SetConsoleCP(CP_ACP);
SetConsoleOutputCP(CP_ACP);
@@ -489,7 +489,7 @@
void ShutdownWinEnv()
{
free(pMappings);
- CloseHandle(hMappingsLock);
+ CloseHandle(hMappingsLock);
FreeLibrary(hNTDLL);
FreeLibrary(hIphlpapi);
@@ -569,7 +569,7 @@
pSrc++;
}
*pDest = 0;
-
+
return ERROR_SUCCESS;
}
@@ -586,7 +586,7 @@
case ERROR_SUCCESS:
errno = 0;
break;
-
+
case ERROR_INVALID_FUNCTION:
errno = EBADRQC;
break;
@@ -906,7 +906,7 @@
case ERROR_BUFFER_OVERFLOW:
errno = ENOMEM;
break;
-
+
default:
errno = ESTALE;
fprintf(stderr, "ERROR: Unknown error %i in SetErrnoFromWinError(). " \
@@ -924,7 +924,7 @@
HANDLE hFile;
OVERLAPPED theOvInfo;
BOOL bRet;
-
+
hFile = (HANDLE) _get_osfhandle(fd);
memset(&theOvInfo, sizeof(OVERLAPPED), 0);
@@ -938,13 +938,13 @@
{
if (!bRet && ((dwFlags = GetLastError()) != ERROR_NOT_LOCKED))
{
- SetErrnoFromWinError(dwFlags);
+ SetErrnoFromWinError(dwFlags);
return -1;
}
else
return 0;
}
-
+
if (operation & LOCK_EX)
{
dwFlags = LOCKFILE_EXCLUSIVE_LOCK;
@@ -958,18 +958,18 @@
errno = EINVAL;
return -1;
}
-
+
if (operation & LOCK_NB)
dwFlags |= LOCKFILE_FAIL_IMMEDIATELY;
-
+
if (theWinVersion.dwPlatformId == VER_PLATFORM_WIN32_NT)
bRet = LockFileEx(hFile, dwFlags, 0, 1, 0, &theOvInfo);
else
bRet = LockFile(hFile, 0, 0, 1, 0);
-
+
if (! bRet)
{
- SetErrnoFromWinError(GetLastError());
+ SetErrnoFromWinError(GetLastError());
return -1;
}
else
@@ -1011,13 +1011,13 @@
{
char szDir[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(dirname, szDir)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return NULL;
- }
-
+ }
+
return opendir(szDir);
}
@@ -1028,14 +1028,14 @@
{
char szDir[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(path, szDir)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
- }
-
- return chdir(szDir);
+ }
+
+ return chdir(szDir);
}
/**
@@ -1047,7 +1047,7 @@
if (fstat(handle, buffer) == -1)
{
/* We just check for a valid handle here */
-
+
/* Handle */
memset(buffer, sizeof(struct stat), 0);
GetFileType(handle);
@@ -1068,14 +1068,14 @@
{
char szDir[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(path, szDir)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
- }
-
- return rmdir(szDir);
+ }
+
+ return rmdir(szDir);
}
/**
@@ -1086,7 +1086,7 @@
if (!CreatePipe((HANDLE *) &phandles[0],(HANDLE *) &phandles[1], NULL, 0))
{
SetErrnoFromWinError(GetLastError());
-
+
return -1;
}
else
@@ -1126,39 +1126,39 @@
access_param = FILE_MAP_COPY;
break;
}
-
+
sec_none.nLength = sizeof(SECURITY_ATTRIBUTES);
sec_none.bInheritHandle = TRUE;
sec_none.lpSecurityDescriptor = NULL;
-
+
hFile = (HANDLE) _get_osfhandle(fd);
-
+
h = CreateFileMapping(hFile, &sec_none, protect, 0, 0, NULL);
-
+
if (! h)
{
SetErrnoFromWinError(GetLastError());
return (void *) -1;
}
-
+
high = off >> 32;
low = off & ULONG_MAX;
base = NULL;
-
+
/* If a non-zero start is given, try mapping using the given address first.
If it fails and flags is not MAP_FIXED, try again with NULL address. */
if (start)
base = MapViewOfFileEx(h, access_param, high, low, len, start);
if (!base && !(flags & MAP_FIXED))
base = MapViewOfFileEx(h, access_param, high, low, len, NULL);
-
+
if (!base || ((flags & MAP_FIXED) && base != start))
{
if (!base)
SetErrnoFromWinError(GetLastError());
else
errno = EINVAL;
-
+
CloseHandle(h);
return (void *) -1;
}
@@ -1174,11 +1174,11 @@
break;
}
}
-
+
if (! bFound)
{
uiIndex = 0;
-
+
while(TRUE)
{
if (pMappings[uiIndex].pStart == NULL)
@@ -1191,14 +1191,14 @@
uiMappingsCount++;
pMappings = (TMapping *) realloc(pMappings, (uiMappingsCount + 1) *
sizeof(TMapping));
pMappings[uiMappingsCount].pStart = NULL;
-
+
break;
}
uiIndex++;
}
}
ReleaseMutex(hMappingsLock);
-
+
return base;
}
@@ -1217,7 +1217,7 @@
{
/* Release mapping handle */
WaitForSingleObject(hMappingsLock, INFINITE);
-
+
for(uiIndex = 0; uiIndex <= uiMappingsCount; uiIndex++)
{
if (pMappings[uiIndex].pStart == start)
@@ -1230,10 +1230,10 @@
break;
}
}
-
+
ReleaseMutex(hMappingsLock);
}
-
+
return success ? 0 : -1;
}
@@ -1244,14 +1244,14 @@
{
char szFile[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(path, szFile)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
- }
-
- return access(szFile, mode);
+ }
+
+ return access(szFile, mode);
}
/**
@@ -1261,14 +1261,14 @@
{
char szFile[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(filename, szFile)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
- }
-
- return access(szFile, pmode);
+ }
+
+ return access(szFile, pmode);
}
@@ -1276,14 +1276,14 @@
{
char szFile[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(file_name, szFile)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return NULL;
- }
-
- return _fullpath(szFile, resolved_name, MAX_PATH);
+ }
+
+ return _fullpath(szFile, resolved_name, MAX_PATH);
}
/**
@@ -1293,13 +1293,13 @@
{
char szFile[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(path, szFile)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
- }
-
+ }
+
return remove(szFile);
}
@@ -1311,19 +1311,19 @@
char szOldName[_MAX_PATH + 1];
char szNewName[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(oldname, szOldName)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
- }
+ }
if ((lRet = conv_to_win_path(newname, szNewName)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
- }
-
+ }
+
return rename(szOldName, szNewName);
}
@@ -1334,20 +1334,20 @@
{
char szFile[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(path, szFile)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
}
-
+
/* Remove trailing slash */
lRet = strlen(szFile) - 1;
if (szFile[lRet] == '\\')
{
szFile[lRet] = 0;
}
-
+
return stat(szFile, buffer);
}
@@ -1358,13 +1358,13 @@
{
char szFile[_MAX_PATH + 1];
long lRet;
-
+
if ((lRet = conv_to_win_path(filename, szFile)) != ERROR_SUCCESS)
{
SetErrnoFromWinError(lRet);
return -1;
- }
-
+ }
+
return unlink(szFile);
}
@@ -1424,7 +1424,7 @@
{
SetErrnoFromWinError(iError);
}
-
+
return dwWritten;
}
@@ -1436,7 +1436,7 @@
DWORD dwRead;
int iItemsRead, iError;
void *pDest = buffer;
-
+
for(iItemsRead = 0; iItemsRead < count; iItemsRead++)
{
if (!ReadFile((HANDLE) _get_osfhandle(fileno(stream)), pDest, size,
@@ -1444,12 +1444,12 @@
break;
pDest += size;
}
-
+
if ((iError = GetLastError()) != ERROR_SUCCESS)
{
SetErrnoFromWinError(iError);
}
-
+
return iItemsRead;
}
@@ -2062,7 +2062,7 @@
break;
default:
error = _("Unknown error");
- fprintf(stderr,
+ fprintf(stderr,
_("ERROR: Unknown error %i in %s\n"),
errnum,
__FUNCTION__);
@@ -2216,15 +2216,15 @@
char *nl_langinfo(int item)
{
unsigned int loc;
-
+
loc = GetThreadLocale();
-
+
switch(item)
{
case CODESET:
{
unsigned int cp = GetACP();
-
+
if (cp)
sprintf(__langinfo, "CP%u", cp);
else
@@ -2373,7 +2373,7 @@
return __langinfo;
case RADIXCHAR:
GetLocaleInfo(loc, LOCALE_SDECIMAL, __langinfo, 251);
- return __langinfo;
+ return __langinfo;
case THOUSEP:
GetLocaleInfo(loc, LOCALE_STHOUSAND, __langinfo, 251);
return __langinfo;
Modified: Extractor/src/plugins/asfextractor.c
===================================================================
--- Extractor/src/plugins/asfextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/asfextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -88,7 +88,7 @@
#define GUID_ASF_EXTENDED_CONTENT_DESCRIPTION 14
#define GUID_ASF_ERROR_CORRECTION 15
#define GUID_ASF_PADDING 16
-
+
/* stream properties object stream type */
#define GUID_ASF_AUDIO_MEDIA 17
#define GUID_ASF_VIDEO_MEDIA 18
@@ -104,7 +104,7 @@
/* header extension */
#define GUID_ASF_RESERVED_1 24
-
+
/* script command */
#define GUID_ASF_RESERVED_SCRIPT_COMMNAND 25
@@ -228,7 +228,7 @@
{ "mutex bitrate",
{ 0xd6e22a01, 0x35da, 0x11d1, { 0x90, 0x34, 0x00, 0xa0, 0xc9, 0x03, 0x49,
0xbe }} },
- { "mutex unknown",
+ { "mutex unknown",
{ 0xd6e22a02, 0x35da, 0x11d1, { 0x90, 0x34, 0x00, 0xa0, 0xc9, 0x03, 0x49,
0xbe }} },
@@ -289,7 +289,7 @@
ext_uint32_t packet_size;
ext_uint8_t packet_flags;
ext_uint32_t data_size;
-
+
ext_uint32_t bitrates[MAX_NUM_STREAMS];
int num_streams;
int num_audio_streams;
@@ -336,7 +336,7 @@
off_t header_size;
int buf_flag_seek;
-
+
/* first packet position */
int64_t first_packet_pos;
@@ -347,12 +347,12 @@
void * buf,
int len) {
int min;
-
+
min = len;
if (this->inputLen - this->inputPos < min)
min = this->inputLen - this->inputPos;
- memcpy(buf,
- &this->input[this->inputPos],
+ memcpy(buf,
+ &this->input[this->inputPos],
min);
this->inputPos += min;
return min;
@@ -363,7 +363,7 @@
int i;
i = readBuf (this, &buf, 1);
- if (i != 1)
+ if (i != 1)
this->status = DEMUX_FINISHED;
return buf;
}
@@ -373,7 +373,7 @@
int i;
i = readBuf (this, buf, 2);
- if (i != 2)
+ if (i != 2)
this->status = DEMUX_FINISHED;
return buf[0] | (buf[1] << 8);
}
@@ -383,7 +383,7 @@
int i;
i = readBuf (this, buf, 4);
- if (i != 4)
+ if (i != 4)
this->status = DEMUX_FINISHED;
return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
}
@@ -393,9 +393,9 @@
int i;
i = readBuf (this, buf, 8);
- if (i != 8)
+ if (i != 8)
this->status = DEMUX_FINISHED;
- return (ext_uint64_t) buf[0]
+ return (ext_uint64_t) buf[0]
| ((ext_uint64_t) buf[1] << 8)
| ((ext_uint64_t) buf[2] << 16)
| ((ext_uint64_t) buf[3] << 24)
@@ -412,20 +412,20 @@
g.v1 = get_le32(this);
g.v2 = get_le16(this);
g.v3 = get_le16(this);
- for(i = 0; i < 8; i++)
+ for(i = 0; i < 8; i++)
g.v4[i] = get_byte(this);
if (this->status == DEMUX_FINISHED)
return GUID_ERROR;
- for (i = 1; i < GUID_END; i++)
- if (!memcmp(&g, &guids[i].guid, sizeof(LE_GUID)))
+ for (i = 1; i < GUID_END; i++)
+ if (!memcmp(&g, &guids[i].guid, sizeof(LE_GUID)))
return i;
-
+
return GUID_ERROR;
}
-static void get_str16_nolen(demux_asf_t *this,
+static void get_str16_nolen(demux_asf_t *this,
int len,
- char *buf,
+ char *buf,
int buf_size) {
int c;
@@ -446,8 +446,8 @@
ext_uint64_t gsize;
guid = get_guid(this);
- if (guid != GUID_ASF_HEADER)
- return 0;
+ if (guid != GUID_ASF_HEADER)
+ return 0;
get_le64(this);
get_le32(this);
get_byte(this);
@@ -617,7 +617,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = strdup(keyword);
result->keywordType = type;
return result;
@@ -650,7 +650,7 @@
free(this);
return prev;
}
-
+
if (strlen(this->title) > 0)
prev = addKeyword(EXTRACTOR_TITLE, this->title, prev);
if (strlen(this->author) > 0)
@@ -663,7 +663,7 @@
/* build a description from author and title */
if (strlen(this->author) * strlen(this->title) > 0) {
- EXTRACTOR_KeywordList * keyword = malloc(sizeof(EXTRACTOR_KeywordList));
+ EXTRACTOR_KeywordList * keyword = malloc(sizeof(EXTRACTOR_KeywordList));
char * word;
int len = 3 + strlen(this->author) + strlen(this->title);
Modified: Extractor/src/plugins/convert.c
===================================================================
--- Extractor/src/plugins/convert.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/convert.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -40,7 +40,7 @@
char * itmp;
const char * i;
iconv_t cd;
-
+
i = input;
cd = iconv_open("UTF-8", charset);
if (cd == (iconv_t) -1)
@@ -52,7 +52,7 @@
if (iconv(cd,
(char**) &input,
&len,
- &itmp,
+ &itmp,
&finSize) == (size_t)-1) {
iconv_close(cd);
free(tmp);
Modified: Extractor/src/plugins/debextractor.c
===================================================================
--- Extractor/src/plugins/debextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/debextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -43,7 +43,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -67,7 +67,7 @@
/* see also: "man 5 deb-control" */
static Matches tmap[] = {
- { "Package: ", EXTRACTOR_SOFTWARE },
+ { "Package: ", EXTRACTOR_SOFTWARE },
{ "Version: ", EXTRACTOR_VERSIONNUMBER },
{ "Section: ", EXTRACTOR_GENRE },
{ "Priority: ", EXTRACTOR_PRIORITY },
@@ -75,7 +75,7 @@
{ "Depends: ", EXTRACTOR_DEPENDENCY },
{ "Recommends: ", EXTRACTOR_RELATION },
{ "Suggests: ", EXTRACTOR_RELATION },
- { "Installed-Size: ", EXTRACTOR_SIZE },
+ { "Installed-Size: ", EXTRACTOR_SIZE },
{ "Maintainer: ", EXTRACTOR_PACKAGER },
{ "Description: ", EXTRACTOR_DESCRIPTION },
{ "Source: ", EXTRACTOR_SOURCE },
@@ -118,7 +118,7 @@
(data[eol] != '\n') ||
( (eol+1 < size) &&
(data[eol+1] == ' ') ) )
- eol++;
+ eol++;
if ( (eol == colon) || (eol > size) )
return prev;
key = stndup(&data[pos], colon-pos);
@@ -168,7 +168,7 @@
/**
* Process the control.tar file.
*/
-static struct EXTRACTOR_Keywords *
+static struct EXTRACTOR_Keywords *
processControlTar(const char * data,
const size_t size,
struct EXTRACTOR_Keywords * prev) {
@@ -186,23 +186,23 @@
ustar = (USTarHeader*) &data[pos];
if (0 == strncmp("ustar",
&ustar->magic[0],
- strlen("ustar")))
+ strlen("ustar")))
pos += 512; /* sizeof(USTarHeader); */
else
pos += 257; /* sizeof(TarHeader); minus gcc alignment... */
} else {
pos += 257; /* sizeof(TarHeader); minus gcc alignment... */
}
-
+
memcpy(buf, &tar->filesize[0], 12);
- buf[12] = '\0';
+ buf[12] = '\0';
if (1 != sscanf(buf, "%12llo", &fsize)) /* octal! Yuck yuck! */
return prev;
if ( (pos + fsize > size) ||
(fsize > size) ||
(pos + fsize < pos) )
return prev;
-
+
if (0 == strncmp(&tar->name[0],
"./control",
strlen("./control"))) {
@@ -251,7 +251,7 @@
/**
* Process the control.tar.gz file.
*/
-static struct EXTRACTOR_Keywords *
+static struct EXTRACTOR_Keywords *
processControlTGZ(const unsigned char * data,
size_t size,
struct EXTRACTOR_Keywords * prev) {
@@ -286,7 +286,7 @@
pthread_join(pt, &error);
return prev;
}
- buf = malloc(bufSize);
+ buf = malloc(bufSize);
if (buf == NULL) {
gzclose(gzf);
close(fdes[1]);
@@ -302,11 +302,11 @@
}
close(fdes[1]);
pthread_join(pt, &error);
- gzclose(gzf);
+ gzclose(gzf);
prev = processControlTar(buf,
bufSize,
prev);
- free(buf);
+ free(buf);
return prev;
}
@@ -319,8 +319,8 @@
char filesize[10];
char trailer[2];
} ObjectHeader;
-
-struct EXTRACTOR_Keywords *
+
+struct EXTRACTOR_Keywords *
libextractor_deb_extract(const char * filename,
const char * data,
const size_t size,
@@ -347,7 +347,7 @@
return prev;
memcpy(buf, &hdr->filesize[0], 10);
- buf[10] = '\0';
+ buf[10] = '\0';
if (1 != sscanf(buf, "%10llu", &fsize))
return prev;
pos += sizeof(ObjectHeader);
@@ -357,7 +357,7 @@
return prev;
if (0 == strncmp(&hdr->name[0],
"control.tar.gz",
- strlen("control.tar.gz"))) {
+ strlen("control.tar.gz"))) {
prev = processControlTGZ(&data[pos],
fsize,
prev);
@@ -374,7 +374,7 @@
pos += fsize;
if (done == 2)
break; /* no need to process the rest of the archive */
- }
+ }
return prev;
}
Modified: Extractor/src/plugins/dviextractor.c
===================================================================
--- Extractor/src/plugins/dviextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/dviextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -29,7 +29,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -88,7 +88,7 @@
slen);
prev = addKeyword(tmap[i].type,
value,
- prev);
+ prev);
pos += slen + 1;
}
}
@@ -129,7 +129,7 @@
return prev;
if ( (data[0] != 247) || (data[1] != 2) )
return prev; /* cannot be dvi or unsupported version */
- klen = data[14];
+ klen = data[14];
pos = size-1;
while ( (data[pos] == 223) && (pos > 0) )
@@ -140,10 +140,10 @@
pos -= 4;
/* assert pos at 'post_post tag' */
if (data[pos] != 249)
- return prev;
+ return prev;
opos = pos;
pos = ntohl(getIntAt(&data[opos+1]));
- if (pos+25 > size)
+ if (pos+25 > size)
return prev;
/* assert pos at 'post' command */
if (data[pos] != 248)
@@ -168,7 +168,7 @@
}
/* ok, now we believe it's a dvi... */
pages = malloc(16);
- snprintf(pages,
+ snprintf(pages,
16,
"%u",
pageCount);
@@ -176,7 +176,7 @@
comment[klen] = '\0';
memcpy(comment,
&data[15],
- klen);
+ klen);
prev = addKeyword(EXTRACTOR_MIMETYPE,
strdup("application/x-dvi"),
prev);
@@ -220,7 +220,7 @@
len,
prev);
pos += len+4;
- break;
+ break;
case 242: /* zzz4, hurray! */
len = ntohl(getIntAt(&data[pos+1]));
if (pos + 1 + len < size)
Modified: Extractor/src/plugins/elfextractor.c
===================================================================
--- Extractor/src/plugins/elfextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/elfextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -26,7 +26,7 @@
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
- next->next = *list;
+ next->next = *list;
next->keyword = strdup(keyword);
next->keywordType = type;
*list = next;
@@ -79,16 +79,16 @@
&(p)->e_phnum, \
&(p)->e_shentsize, \
&(p)->e_shnum, \
- &(p)->e_shstrndx
+ &(p)->e_shstrndx
static char * ELF_HEADER_SPECS[] = {
- "hhwwwwwhhhhhh",
+ "hhwwwwwhhhhhh",
"HHWWWWWHHHHHH",
};
typedef struct {
Elf32_Word sh_name;
- Elf32_Word sh_type;
+ Elf32_Word sh_type;
Elf32_Word sh_flags;
Elf32_Addr sh_addr; /* where loaded */
Elf32_Off sh_offset; /* where in image (! sh_type==SHT_NOBITS) */
@@ -188,7 +188,7 @@
#define SHT_NOTE 7
#define SHT_NOBITS 8
#define SHT_REL 9
-#define SHT_SHLIB 10
+#define SHT_SHLIB 10
#define SHT_DYNSYM 11
#define SHT_LOPROC 0x70000000
#define SHT_HIPROC 0x7fffffff
@@ -253,35 +253,35 @@
/**
* @param ei_data ELFDATA2LSB or ELFDATA2MSB
* @return 1 if we need to convert, 0 if not
- */
+ */
static int getByteorder(char ei_data) {
if (ei_data == ELFDATA2LSB) {
#if __BYTE_ORDER == __BIG_ENDIAN
return 1;
#else
return 0;
-#endif
+#endif
} else {
#if __BYTE_ORDER == __BIG_ENDIAN
return 0;
#else
return 1;
-#endif
+#endif
}
}
/**
- *
+ *
* @return 0 on success, -1 on error
*/
static int getSectionHdr(char * data,
size_t size,
- Elf32_Ehdr * ehdr,
+ Elf32_Ehdr * ehdr,
Elf32_Half idx,
Elf32_Shdr * ret) {
if (ehdr->e_shnum <= idx)
return -1;
-
+
cat_unpack(&data[ehdr->e_shoff + ehdr->e_shentsize * idx],
ELF_SECTION_SPECS[getByteorder(data[EI_CLASS])],
ELF_SECTION_FIELDS(ret));
@@ -289,19 +289,19 @@
}
/**
- *
+ *
* @return 0 on success, -1 on error
*/
static int getDynTag(char * data,
size_t size,
- Elf32_Ehdr * ehdr,
+ Elf32_Ehdr * ehdr,
Elf32_Off off,
Elf32_Word osize,
unsigned int idx,
Elf32_Dyn * ret) {
if ( (off+osize > size) ||
((idx+1) * ELF_DYN_SIZE > osize) )
- return -1;
+ return -1;
cat_unpack(&data[off + idx*ELF_DYN_SIZE],
ELF_DYN_SPECS[getByteorder(data[EI_CLASS])],
ELF_DYN_FIELDS(ret));
@@ -309,17 +309,17 @@
}
/**
- *
+ *
* @return 0 on success, -1 on error
*/
static int getProgramHdr(char * data,
size_t size,
- Elf32_Ehdr * ehdr,
+ Elf32_Ehdr * ehdr,
Elf32_Half idx,
Elf32_Phdr * ret) {
if (ehdr->e_phnum <= idx)
return -1;
-
+
cat_unpack(&data[ehdr->e_phoff + ehdr->e_phensize * idx],
ELF_PHDR_SPECS[getByteorder(data[EI_CLASS])],
ELF_PHDR_FIELDS(ret));
@@ -340,7 +340,7 @@
elfMagic,
sizeof(elfMagic)))
return -1; /* not an elf */
-
+
switch (data[EI_CLASS]) {
case ELFDATA2LSB:
case ELFDATA2MSB:
@@ -366,7 +366,7 @@
*/
static const char * readStringTable(char * data,
size_t size,
- Elf32_Ehdr * ehdr,
+ Elf32_Ehdr * ehdr,
Elf32_Half strTableOffset,
Elf32_Word sh_name) {
Elf32_Shdr shrd;
@@ -389,7 +389,7 @@
/* application/x-executable, ELF */
struct EXTRACTOR_Keywords * libextractor_elf_extract(char * filename,
char * data,
- size_t size,
+ size_t size,
struct EXTRACTOR_Keywords
* prev) {
Elf32_Ehdr ehdr;
Elf32_Half idx;
@@ -400,24 +400,24 @@
return prev;
addKeyword(&prev,
"application/x-executable",
- EXTRACTOR_MIMETYPE);
+ EXTRACTOR_MIMETYPE);
switch (ehdr.e_type) {
- case ET_REL:
+ case ET_REL:
addKeyword(&prev,
"Relocatable file",
EXTRACTOR_RESOURCE_TYPE);
break;
- case ET_EXEC:
+ case ET_EXEC:
addKeyword(&prev,
"Executable file",
EXTRACTOR_RESOURCE_TYPE);
break;
- case ET_DYN:
+ case ET_DYN:
addKeyword(&prev,
"Shared object file",
EXTRACTOR_RESOURCE_TYPE);
break;
- case ET_CORE:
+ case ET_CORE:
addKeyword(&prev,
"Core file",
EXTRACTOR_RESOURCE_TYPE);
@@ -429,37 +429,37 @@
case EM_M32:
addKeyword(&prev,
"M32",
- EXTRACTOR_CREATED_FOR);
+ EXTRACTOR_CREATED_FOR);
break;
case EM_386:
addKeyword(&prev,
"i386",
- EXTRACTOR_CREATED_FOR);
+ EXTRACTOR_CREATED_FOR);
break;
case EM_68K:
addKeyword(&prev,
"68K",
- EXTRACTOR_CREATED_FOR);
+ EXTRACTOR_CREATED_FOR);
break;
case EM_88K:
addKeyword(&prev,
"88K",
- EXTRACTOR_CREATED_FOR);
+ EXTRACTOR_CREATED_FOR);
break;
case EM_SPARC:
addKeyword(&prev,
"Sparc",
- EXTRACTOR_CREATED_FOR);
+ EXTRACTOR_CREATED_FOR);
break;
case EM_860:
addKeyword(&prev,
"960",
- EXTRACTOR_CREATED_FOR);
+ EXTRACTOR_CREATED_FOR);
break;
case EM_MIPS:
addKeyword(&prev,
"MIPS",
- EXTRACTOR_CREATED_FOR);
+ EXTRACTOR_CREATED_FOR);
break;
default:
break; /* oops */
@@ -480,7 +480,7 @@
Elf32_Addr stringPtr;
Elf32_Half stringIdx;
Elf32_Half six;
-
+
stringPtr = 0;
for (id=0;id<dc;id++) {
@@ -491,7 +491,7 @@
phdr.p_offset,
phdr.p_filesz,
id,
- &dyn))
+ &dyn))
return prev;
if (DT_STRTAB == dyn.d_tag) {
stringPtr = dyn.d_un.d_ptr;
@@ -523,7 +523,7 @@
phdr.p_offset,
phdr.p_filesz,
id,
- &dyn))
+ &dyn))
return prev;
switch(dyn.d_tag) {
case DT_RPATH: {
@@ -542,7 +542,7 @@
EXTRACTOR_SOURCE);
}
break;
- }
+ }
case DT_NEEDED: {
const char * needed;
@@ -557,9 +557,9 @@
EXTRACTOR_DEPENDENCY);
}
break;
- }
}
- }
+ }
+ }
}
}
Modified: Extractor/src/plugins/filenameextractor.c
===================================================================
--- Extractor/src/plugins/filenameextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/filenameextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -32,13 +32,13 @@
const char * filenameRoot = filename;
int res;
- for (res=strlen(filename)-1;res>=0;res--)
+ for (res=strlen(filename)-1;res>=0;res--)
if (filename[res] == DIR_SEPARATOR) {
filenameRoot = &filename[res+1];
break;
}
keyword = malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = prev;
+ keyword->next = prev;
keyword->keyword = convertToUtf8(filenameRoot,
strlen(filenameRoot),
nl_langinfo(CODESET)
Modified: Extractor/src/plugins/gifextractor.c
===================================================================
--- Extractor/src/plugins/gifextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/gifextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -26,7 +26,7 @@
#if DEBUG_GIF
#define PRINT(a,b) fprintf(stderr,a,b)
#else
-#define PRINT(a,b)
+#define PRINT(a,b)
#endif
typedef struct {
@@ -90,7 +90,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -127,7 +127,7 @@
const size_t size,
const GIF_HEADER * header) {
size_t gct_size;
-
+
if ( (header->flags & HEADER_FLAGS__GLOBAL_COLOR_TABLE_FLAG) > 0)
gct_size = 3*(1 << ((header->flags &
HEADER_FLAGS__SIZE_OF_GLOBAL_COLOR_TABLE)+1));
else
@@ -150,7 +150,7 @@
lct_size = 3*(1 << ((descriptor->flags & DESCRIPTOR_FLAGS__PIXEL_SIZE)+1));
else
lct_size = 0;
- return pos + GIF_DESCRIPTOR_SIZE + lct_size;
+ return pos + GIF_DESCRIPTOR_SIZE + lct_size;
}
static struct EXTRACTOR_Keywords * parseComment(const unsigned char * data,
@@ -170,21 +170,21 @@
curr = pos;
length = 0;
while ( (data[curr] != 0) &&
- (curr < size) ) {
+ (curr < size) ) {
length += data[curr];
- if (length >= size)
+ if (length >= size)
break;
memcpy(&keyword[length-data[curr]],
&data[curr]+1,
data[curr]);
keyword[length] = 0;
curr += data[curr] + 1;
- }
+ }
return addKeyword(EXTRACTOR_COMMENT,
keyword,
prev);
}
-
+
struct EXTRACTOR_Keywords * libextractor_gif_extract(const char * filename,
const unsigned char *
data,
@@ -209,9 +209,9 @@
strdup("image/gif"),
result);
tmp = malloc(128);
- snprintf(tmp,
+ snprintf(tmp,
128,
- "%ux%u",
+ "%ux%u",
header.screen_width,
header.screen_height);
result = addKeyword(EXTRACTOR_SIZE,
@@ -253,6 +253,6 @@
}
}
PRINT("returning at %d\n",pos);
- return result;
+ return result;
}
Modified: Extractor/src/plugins/hash/md5extractor.c
===================================================================
--- Extractor/src/plugins/hash/md5extractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/hash/md5extractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -23,13 +23,13 @@
#include "md5.h"
-static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
+static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
const char *phrase,
EXTRACTOR_KeywordType type) {
- EXTRACTOR_KeywordList * keyword;
+ EXTRACTOR_KeywordList * keyword;
keyword = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = oldhead;
+ keyword->next = oldhead;
keyword->keyword = strdup(phrase);
keyword->keywordType = type;
return keyword;
@@ -40,7 +40,7 @@
#define DIGEST_BITS 128
#define DIGEST_HEX_BYTES (DIGEST_BITS / 4)
#define DIGEST_BIN_BYTES (DIGEST_BITS / 8)
-#define MAX_DIGEST_BIN_BYTES DIGEST_BIN_BYTES
+#define MAX_DIGEST_BIN_BYTES DIGEST_BIN_BYTES
struct EXTRACTOR_Keywords * libextractor_hash_md5_extract(const char *
filename,
char * data,
@@ -51,7 +51,7 @@
char buf[16];
int i;
- md5_buffer(data, size, bin_buffer);
+ md5_buffer(data, size, bin_buffer);
hash[0] = '\0';
for (i=0;i<DIGEST_HEX_BYTES / 2; i++) {
snprintf(buf,
@@ -63,6 +63,6 @@
prev = addKeyword(prev,
hash,
EXTRACTOR_HASH_MD5);
-
+
return prev;
}
Modified: Extractor/src/plugins/hash/rmd160extractor.c
===================================================================
--- Extractor/src/plugins/hash/rmd160extractor.c 2005-03-20 23:56:11 UTC
(rev 466)
+++ Extractor/src/plugins/hash/rmd160extractor.c 2005-03-20 23:56:28 UTC
(rev 467)
@@ -599,13 +599,13 @@
#undef FUNCTION_NAME
-static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
+static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
const char *phrase,
EXTRACTOR_KeywordType type) {
- EXTRACTOR_KeywordList * keyword;
+ EXTRACTOR_KeywordList * keyword;
keyword = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = oldhead;
+ keyword->next = oldhead;
keyword->keyword = strdup(phrase);
keyword->keywordType = type;
return keyword;
@@ -614,7 +614,7 @@
#define DIGEST_BITS 160
#define DIGEST_HEX_BYTES (DIGEST_BITS / 4)
#define DIGEST_BIN_BYTES (DIGEST_BITS / 8)
-#define MAX_DIGEST_BIN_BYTES DIGEST_BIN_BYTES
+#define MAX_DIGEST_BIN_BYTES DIGEST_BIN_BYTES
#define rmd160_init(t) rmd160_copy((t),NULL)
#define rmd160_new() rmd160_copy(NULL,NULL)
Modified: Extractor/src/plugins/hash/sha1extractor.c
===================================================================
--- Extractor/src/plugins/hash/sha1extractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/hash/sha1extractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -22,13 +22,13 @@
#include "extractor.h"
#include "sha1.h"
-static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
+static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
const char *phrase,
EXTRACTOR_KeywordType type) {
- EXTRACTOR_KeywordList * keyword;
+ EXTRACTOR_KeywordList * keyword;
keyword = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = oldhead;
+ keyword->next = oldhead;
keyword->keyword = strdup(phrase);
keyword->keywordType = type;
return keyword;
@@ -38,7 +38,7 @@
#define DIGEST_HEX_BYTES (DIGEST_BITS / 4)
#define DIGEST_BIN_BYTES (DIGEST_BITS / 8)
-#define MAX_DIGEST_BIN_BYTES DIGEST_BIN_BYTES
+#define MAX_DIGEST_BIN_BYTES DIGEST_BIN_BYTES
struct EXTRACTOR_Keywords * libextractor_hash_sha1_extract(const char *
filename,
char * data,
@@ -50,7 +50,7 @@
int i;
sha_buffer(data, size, bin_buffer);
-
+
hash[0] = '\0';
for (i=0;i<DIGEST_HEX_BYTES / 2; i++) {
snprintf(buf,
@@ -61,6 +61,6 @@
}
prev = addKeyword(prev,
hash,
- EXTRACTOR_HASH_SHA1);
+ EXTRACTOR_HASH_SHA1);
return prev;
}
Modified: Extractor/src/plugins/htmlextractor.c
===================================================================
--- Extractor/src/plugins/htmlextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/htmlextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -38,18 +38,18 @@
* We now put them all in one big table that is passed
* around inside the parser.
*
- * The CallBacks
- * You may call one ore several or even all callbacks. Except of the
- * XHTMLCallBack, all CallBacks will work as expected and described
- *
- * XHTMLCallBack:
- * The XHTMLCallBack is a special case, because you can decide, if the
- * XHTML specific tags should be handeled as a start- AND endtag, or
- * as an XHTML tag. If you call nothing, except start and endtag, the
- * behaviour is, that you'll get a start AND an endtag called back.
+ * The CallBacks
+ * You may call one ore several or even all callbacks. Except of the
+ * XHTMLCallBack, all CallBacks will work as expected and described
+ *
+ * XHTMLCallBack:
+ * The XHTMLCallBack is a special case, because you can decide, if the
+ * XHTML specific tags should be handeled as a start- AND endtag, or
+ * as an XHTML tag. If you call nothing, except start and endtag, the
+ * behaviour is, that you'll get a start AND an endtag called back.
* If you call XHTMLCallBack, it will only give you the XHTML call back.
- *
- * If you are in doubt or simply confused now, call XHTMLCallBack()
+ *
+ * If you are in doubt or simply confused now, call XHTMLCallBack()
*/
typedef struct PC_ {
/* handle comments and javascript */
@@ -65,7 +65,7 @@
/* End tag e.g. </html>*/
int (*endCallBack) (char *tag, struct PC_ * pc);
-
+
/* handle plain text */
int (*textCallBack) (char *text, struct PC_ * pc);
int (*textStartCallBack) (struct PC_ * pc);
@@ -98,13 +98,13 @@
* 0: ignore, 1: add keyword
*/
int nextTextAction;
-
+
/**
* If nextTextAction == 1, this gives the type of the
* keyword.
*/
EXTRACTOR_KeywordType nextKeywordType;
-
+
/**
* Result of the current pass.
*/
@@ -124,14 +124,14 @@
args = (struct ArgvTable*) calloc(1, sizeof(struct
ArgvTable)*(pc->numArgs+1));
} else {
args = (struct ArgvTable*) realloc(args, sizeof(struct
ArgvTable)*(pc->numArgs+1));
- }
+ }
if (args == NULL) {
fprintf(stderr,
_("Fatal: could not allocate (%s at %s:%d).\n"),
strerror(errno),
__FILE__, __LINE__);
exit(EXIT_FAILURE);
- }
+ }
args[pc->numArgs-1].arg = arg;
args[pc->numArgs-1].val = val;
return args;
@@ -141,12 +141,12 @@
static void freeArgs (struct ArgvTable *args,
struct PC_ * pc) {
int i;
-
+
if (args != NULL) {
for(i=0; i<pc->numArgs; i++) {
free(args[i].arg);
free(args[i].val);
- }
+ }
free(args);
args=NULL;
pc->numArgs=0;
@@ -161,19 +161,19 @@
char *tmp;
const char *tmp2;
int ret=0;
-
+
while( (*html != '\0') && isspace((int) *html)) html++;
-
+
if (*html == '<') return html;
-
+
tmp2 = html;
while ( (*html != '\0') && (*html != '<') ) html++;
-
+
tmp = (char *)calloc(1, (size_t)(html-tmp2+1));
if (!tmp) return "";
-
+
memcpy(tmp, tmp2, (size_t)(html-tmp2));
-
+
if (strlen(tmp) > 0) {
if (pc->textStartCallBack) {
ret = pc->textStartCallBack(pc);
@@ -181,8 +181,8 @@
free(tmp);
return "";
}
- }
- if (pc->textCallBack) {
+ }
+ if (pc->textCallBack) {
if (pc->entityCallBack){ /* that is textCallBack(text)
with entityCallBack(entity) as an extrabonus */
/*printf("entity is here\n");*/
@@ -194,7 +194,7 @@
return "";
}
}
- }
+ }
if (pc->textEndCallBack) {
ret = pc->textEndCallBack(pc);
if (ret != 0) {
@@ -202,8 +202,8 @@
return "";
}
}
- }
- free(tmp);
+ }
+ free(tmp);
if (*html != '\0')
if (*(html+1) == '>') html += 2;
return html;
@@ -213,19 +213,19 @@
char *tmp;
const char *tmp2;
int ret=0;
-
+
while ( (*html == '-') || isspace((int)*html))html++;
-
+
tmp2 = html;
while ( (*html != '\0') && !(*html == '-' && *(html+1) == '-' && *(html+2)
== '>')) html++;
-
+
tmp = (char *)calloc(1, (size_t)(html-tmp2+1));
if (!tmp) return "";
-
+
memcpy(tmp, tmp2, (size_t)(html-tmp2));
-
+
if (*(html+3) != '\0') html += 3;
-
+
if (pc->commentStartCallBack) {
ret = pc->commentStartCallBack(pc);
if (ret != 0) {
@@ -239,7 +239,7 @@
free(tmp);
return "";
}
- }
+ }
if (pc->commentEndCallBack) {
ret = pc->commentEndCallBack(pc);
if (ret != 0) {
@@ -255,27 +255,27 @@
char *tmp;
const char *tmp2;
int ret=0;
-
+
if (*html == '\0')
return html;
- html++;
+ html++;
tmp2 = html;
while(*html != '\0' && *html != '>') html++;
-
+
tmp =(char *) calloc(1, (size_t)(html-tmp2+1));
if (!tmp) return "";
-
+
memcpy(tmp, tmp2, (size_t)(html-tmp2));
-
+
if (pc->endCallBack) {
ret = pc->endCallBack(tmp,pc);
if (ret != 0) {
free(tmp);
return "";
}
- }
- if (*html == '>') html++;
+ }
+ if (*html == '>') html++;
free(tmp);
return html;
}
@@ -284,28 +284,28 @@
const char *tmp;
char *tmp2;
int ret=0;
-
+
html += 4;
while(*html != '\0' && isspace((int)*html)) html++;
-
+
tmp = html;
-
+
while(*html != '\0' && !(*html == '?' && *(html+1) == '>')) html++;
tmp2 = (char *)calloc(1, (size_t)(html-tmp+1));
if (!tmp2) return "";
-
+
memcpy(tmp2, tmp, (size_t)(html-tmp));
-
+
if (pc->phpCallBack) {
ret = pc->phpCallBack(tmp2, pc);
if (ret != 0) {
free(tmp2);
return "";
}
- }
+ }
free(tmp2);
html += 2;
- return html;
+ return html;
}
/* parse the XML tag itself */
@@ -314,18 +314,18 @@
const char *tmp;
int ret;
struct ArgvTable *tmp2 = NULL;
-
+
pc->numArgs = 0;
tmp = html;
while(*html != '\0' && !isspace((int)*html) && *html != '>') html++;
-
+
/* you may want to upper/lower tags, so I leave the tag itself untouched */
tag = (char *)calloc(1, (size_t)(html-tmp+1));
if (!tag) {
return "";
- }
+ }
memcpy(tag, tmp, (size_t)(html-tmp));
-
+
if (*html == '>') {
if (pc->xmlCallBack != NULL) {
ret = pc->xmlCallBack(tag, NULL, 0, pc);
@@ -333,13 +333,13 @@
if (*html == '>') html++;
return((ret != 0) ? (char *) "" : html);
}
- }
+ }
while(*html != '\0' && isspace((int)*html)) html++;
-
+
while(*html != '\0' && *html != '>' ) {
while(isspace((int)*html)) html++;
if (*html == '>') break;
-
+
tmp = html;
while(*html != '\0' && !isspace((int)*html) && *html != '=' && *html !=
'>') html++;
name = (char *)calloc(1, (size_t)(html-tmp+1));
@@ -347,18 +347,18 @@
free(tag);
tag = NULL;
return "";
- }
- memcpy(name, tmp, (size_t)(html-tmp));
+ }
+ memcpy(name, tmp, (size_t)(html-tmp));
if (isspace((int)*html)) {
tmp2 = addArgToTable(tmp2, name, NULL, pc);
while(*html != '\0' && isspace((int)*html) && *html != '>') html++;
- }
+ }
if (*html == '>') {
- tmp2 = addArgToTable(tmp2, name, NULL, pc);
+ tmp2 = addArgToTable(tmp2, name, NULL, pc);
html++;
break;
- }
- if (*html == '=') html++;
+ }
+ if (*html == '=') html++;
if (*html != '"' && *html != '\'') {
tmp = html;
while(*html != '\0' && *html != '>' && !isspace((int)*html)) html++;
@@ -374,7 +374,7 @@
tmp2 = NULL;
}
return "";
- }
+ }
memcpy(value, tmp, (size_t)(html-tmp));
tmp2 = addArgToTable(tmp2, name, value, pc);
} else if (*html == '"') {
@@ -393,7 +393,7 @@
tmp2 = NULL;
}
return "";
- }
+ }
memcpy(value, tmp, (size_t)(html-tmp));
if (*html != '\0')
html++;
@@ -402,7 +402,7 @@
html++;
tmp = html;
while(*html != '\0' && !(*html == '\'' && *(html-1) != '\\')) html++;
-
+
value = (char *)calloc(1, (size_t)(html-tmp+1));
if (!value) {
free(name);
@@ -414,25 +414,25 @@
tmp2 = NULL;
}
return "";
- }
+ }
memcpy(value, tmp, (size_t)(html-tmp));
if (*html != '\0')
html++;
tmp2 = addArgToTable(tmp2, name, value, pc);
- }
+ }
tmp = NULL;
value = NULL;
name = NULL;
- }
- if (*html != '\0') html++;
- ret = pc->xmlCallBack(tag, tmp2, pc->numArgs, pc);
+ }
+ if (*html != '\0') html++;
+ ret = pc->xmlCallBack(tag, tmp2, pc->numArgs, pc);
if (tmp2 != NULL) {
freeArgs(tmp2, pc);
tmp2 = NULL;
- }
+ }
free(tag);
tag = NULL;
- pc->numArgsStatus=0;
+ pc->numArgsStatus=0;
return (ret != 0 ? "" : html);
}
@@ -442,7 +442,7 @@
(*html != '\0') ) {
html++;
}
- if (*html != '\0')
+ if (*html != '\0')
html++;
return html;
}
@@ -450,7 +450,7 @@
/* cannibalistic function, munches the actuall text */
static const char *eatUpText(const char *html){
while(*html != '\0' && *html != '<')
- html++;
+ html++;
return html;
}
@@ -459,10 +459,10 @@
otherwise it gormandizes them up. *burps* */
static const char *parseXML(const char *html, struct PC_ * pc) {
/* conditional expressions inside a conditional expression
- don't try _this_ at home kids! ;-) */
+ don't try _this_ at home kids! ;-) */
html=(((tolower((int)(*(html+1))))==(int)('p')) ?
( (pc->phpCallBack) ? parsePHP (html, pc) : eatUp(html) ) :
- ( (pc->xmlCallBack) ? parseXMLtag(html, pc) : eatUp(html) ) );
+ ( (pc->xmlCallBack) ? parseXMLtag(html, pc) : eatUp(html) ) );
return html;
}
@@ -472,31 +472,31 @@
const char * start = html;
int ret = 0;
struct ArgvTable *tmp2 = NULL;
-
+
pc->numArgs = 0;
tmp = html;
- while(*html != '\0' && !isspace((int)*html) &&
+ while(*html != '\0' && !isspace((int)*html) &&
*html != '>' && *html != '/') html++;
-
+
tag = (char *)calloc(1, (size_t)(html-tmp+1));
if (!tag) {
return "";
- }
+ }
memcpy(tag, tmp, (size_t)(html-tmp));
-
+
if (strncasecmp("script", tag, 6) == 0) {
pc->lhtml_script_passthru = 1;
}
else if (strncasecmp("pre", tag, 3) == 0) {
pc->lhtml_script_passthru = 2;
}
-
+
if (*html == '>') {
if (pc->startCallBack) {
ret = pc->startCallBack(tag, NULL, 0, pc);
free(tag);
tag = NULL;
-
+
/* this check is redundant */
/* if (*html == '>') */ html++;
return((ret != 0) ? "" : html);
@@ -518,26 +518,26 @@
if(pc->XHTMLCallBack){
ret = pc->XHTMLCallBack(tag, NULL, 0, pc);
}
-
+
free(tag);
tag = NULL;
-
+
html += 2;
return((ret != 0) ? "" : html);
}
-
+
while(*html != '\0' && isspace((int)*html)) html++;
-
+
while(*html != '\0' && *html != '>' ) {
while(isspace((int)*html)) html++;
if (*html == '>') break;
-
+
if (*html == '/' && *(html+1) == '>') {
html++; break;
}
-
+
tmp = html;
- while(*html != '\0' && !isspace((int)*html) &&
+ while(*html != '\0' && !isspace((int)*html) &&
*html != '=' && *html != '>') html++;
name = (char *)calloc(1, (size_t)(html-tmp+1));
if (!name) {
@@ -545,9 +545,9 @@
tag = NULL;
return "";
}
-
+
memcpy(name, tmp, (size_t)(html-tmp));
-
+
if (isspace((int)*html)) {
const char *x = html;
while(*x != '\0' && *x != '>' && *x != '=') x++;
@@ -556,35 +556,35 @@
goto namevalue;
}
tmp2 = addArgToTable(tmp2, name, NULL, pc);
- while(*html != '\0' && isspace((int)*html) &&
- *html != '>' &&
- !(*html == '/' && *(html+1) == '>'))
+ while(*html != '\0' && isspace((int)*html) &&
+ *html != '>' &&
+ !(*html == '/' && *(html+1) == '>'))
html++;
} else {
-
+
if (*html == '/') {
html++;
break;
}
-
+
/* html++ is repeated after the while loop
* and may cause deletion of important info */
if (*html == '>') {
tmp2 = addArgToTable(tmp2, name, NULL, pc);
/*html++;*/
- break;
+ break;
}
-
+
namevalue:
if (*html == '=') html++;
-
+
while(isspace(*html)) html++;
-
+
if (*html != '"' && *html != '\'') {
tmp = html;
- while(*html != '\0' && *html != '>' &&
- !isspace((int)*html) &&
- !(*html == '/' && *(html+1) == '>'))
+ while(*html != '\0' && *html != '>' &&
+ !isspace((int)*html) &&
+ !(*html == '/' && *(html+1) == '>'))
html++;
value = (char *)calloc(1, (size_t)(html-tmp+1));
if (value == NULL) {
@@ -592,7 +592,7 @@
name = NULL;
free(tag);
tag = NULL;
-
+
freeArgs(tmp2, pc);
return "";
}
@@ -601,8 +601,8 @@
} else if (*html == '"') {
html++;
tmp = html;
- while (*html != '\0' &&
- !(*html == '"' && *(html-1) != '\\'))
+ while (*html != '\0' &&
+ !(*html == '"' && *(html-1) != '\\'))
html++;
value = (char *) calloc(1, (size_t)(html-tmp+1));
if (value == NULL) {
@@ -610,7 +610,7 @@
name = NULL;
free(tag);
tag = NULL;
-
+
freeArgs(tmp2, pc);
return "";
}
@@ -622,7 +622,7 @@
} else if (*html == '\'') {
html++;
tmp = html;
- while(*html != '\0' && !(*html == '\'' &&
+ while(*html != '\0' && !(*html == '\'' &&
*(html-1) != '\\')) html++;
value = (char *)calloc(1, (size_t)(html-tmp+1));
@@ -631,7 +631,7 @@
name = NULL;
free(tag);
tag = NULL;
-
+
freeArgs(tmp2, pc);
return "";
}
@@ -645,12 +645,12 @@
}
}
if (*html != '\0') html++;
-
+
if (html - start > 2) {
if (pc->startCallBack != NULL && (*(html-2)!='/')) {
ret = pc->startCallBack(tag, tmp2, pc->numArgs, pc);
}
- if (pc->endCallBack != NULL && ret==0 && *(html-2)=='/'
+ if (pc->endCallBack != NULL && ret==0 && *(html-2)=='/'
&& !(pc->XHTMLCallBack)) {
ret = pc->endCallBack(tag, pc);
}
@@ -664,9 +664,9 @@
}
free(tag);
tag = NULL;
-
+
pc->numArgsStatus=0;
-
+
/* this is a bad hack, feel free to write a better one (maybe a more
readable one? ;-)*/
return
(pc->XHTMLCallBack != NULL) ?
@@ -679,90 +679,90 @@
const char *tmp;
int ret=0;
struct ArgvTable *tmp2 = NULL;
-
+
pc->numArgs = 0;
tmp = html;
while(*html != '\0' && !isspace((int)*html) && *html != '>') html++;
-
+
tag = (char *)calloc(1, (size_t)(html-tmp+1));
if (!tag) {
return "";
}
-
+
memcpy(tag, tmp, (size_t)(html-tmp));
-
+
if (*html == '>') {
if (pc->declCallBack) {
ret = pc->declCallBack(tag, NULL, 0, pc);
free(tag);
tag = NULL;
-
+
if (*html == '>') html++;
return((ret != 0) ? "" : html);
}
}
-
+
while(*html != '\0' && isspace((int)*html)) html++;
-
+
while(*html != '\0' && *html != '>') {
while(isspace((int)*html)) html++;
- if (*html == '>') break;
- tmp = html;
- switch(*tmp) {
- case '\'' :
+ if (*html == '>') break;
+ tmp = html;
+ switch(*tmp) {
+ case '\'' :
html++;
tmp = html;
- while(*html != '\0' && !(*html == '\'' && *html != '\\'))
+ while(*html != '\0' && !(*html == '\'' && *html != '\\'))
html++;
break;
case '"' :
html++;
tmp = html;
- while(*html != '\0' && !(*html == '"' && *html != '\\'))
+ while(*html != '\0' && !(*html == '"' && *html != '\\'))
html++;
break;
default :
- while(*html != '\0' && !isspace((int)*html) && *html != '=' && *html !=
'>')
+ while(*html != '\0' && !isspace((int)*html) && *html != '=' && *html !=
'>')
html++;
break;
}
-
+
name = (char *) calloc(1, (size_t)(html-tmp+1));
if (!name) {
free(tag);
tag = NULL;
return "";
}
-
+
memcpy(name, tmp, (size_t)(html-tmp));
-
+
if (isspace((int)*html)) {
tmp2 = addArgToTable(tmp2, name, NULL, pc);
- while(*html != '\0' && isspace((int)*html) && *html != '>')
+ while(*html != '\0' && isspace((int)*html) && *html != '>')
html++;
continue;
}
-
+
if (*html == '>') {
tmp2 = addArgToTable(tmp2, name, NULL, pc);
html++;
break;
}
-
+
if (*(html+1) == '>') {
tmp2 = addArgToTable(tmp2, name, NULL, pc);
html += 2;
break;
}
-
- if (*html == '=') html++;
- switch(*html){
- case '\'' :
+
+ if (*html == '=') html++;
+ switch(*html){
+ case '\'' :
html++;
tmp = html;
- while(*html != '\0' && !(*html == '\'' && *(html-1) != '\\'))
+ while(*html != '\0' && !(*html == '\'' && *(html-1) != '\\'))
html++;
-
+
value = (char *) calloc(1, (size_t)(html-tmp+1));
if (!value) {
free(name);
@@ -773,13 +773,13 @@
freeArgs(tmp2, pc);
return "";
}
-
+
memcpy(value, tmp, (size_t)(html-tmp));
if (*html != '\0')
html++;
tmp2 = addArgToTable(tmp2, name, value, pc);
break;
- case '"' :
+ case '"' :
html++;
tmp = html;
while (*html != '\0' && !(*html == '"' && *(html-1) != '\\'))
@@ -794,16 +794,16 @@
freeArgs(tmp2, pc);
return "";
}
-
+
memcpy(value, tmp, (size_t)(html-tmp));
- if (*html != '\0')
+ if (*html != '\0')
html++;
tmp2 = addArgToTable(tmp2, name, value, pc);
break;
- default :
+ default :
html++;
tmp = html;
- while(*html != '\0' && *html != '>' && !isspace((int)*html))
+ while(*html != '\0' && *html != '>' && !isspace((int)*html))
html++;
value = (char *) calloc(1, (size_t)(html-tmp+1));
if (!value) {
@@ -815,26 +815,26 @@
freeArgs(tmp2, pc);
return "";
}
-
+
memcpy(value, tmp, (size_t)(html-tmp));
tmp2 = addArgToTable(tmp2, name, value, pc);
break;
}
tmp = NULL;
}
-
+
if (*html != '\0') html++;
-
+
if (pc->declCallBack) {
ret = pc->declCallBack(tag, tmp2, pc->numArgs, pc);
freeArgs(tmp2, pc);
free(tag);
- tag = NULL;
+ tag = NULL;
return((ret != 0) ? "" : html);
- }
+ }
freeArgs(tmp2, pc);
pc->numArgsStatus=0;
-
+
return html;
}
@@ -845,12 +845,12 @@
while(*tmp != '\0'){
tmp1 = tmp;
while(*tmp != '\0' && *tmp != '&')tmp++;
-
+
text = (char *)calloc(1, (size_t)(tmp-tmp1+1));
if (text == NULL) {
return "";
}
-
+
memcpy(text, tmp1, (size_t)(tmp-tmp1));
/* the chunk of text before the first entity will
not be called, if it starts with an entity*/
@@ -859,9 +859,9 @@
ret = pc->textCallBack(text, pc);
}
free(text);
- text = NULL;
+ text = NULL;
tmp1 = "";
- }
+ }
if(*tmp == '&'){
tmp++;
tmp2=tmp;
@@ -893,11 +893,11 @@
while(*html != '\0') {
/* while(isspace(*html)){html++;} there may be leading blanks in some
autogenerated files
add this or not, that is the question ;-)) */
-
+
if (pc->lhtml_script_passthru != 0) {
const char *text;
char *tmp;
-
+
text = html;
if (pc->lhtml_script_passthru == 1 ){
while(*text != '\0') {
@@ -924,12 +924,12 @@
}
tmp = (char *) malloc((size_t)(text-html+1));
if (tmp == NULL) {
- fprintf(stderr,
+ fprintf(stderr,
_("Fatal: could not allocate (%s at %s:%d).\n"),
strerror(errno), __FILE__, __LINE__);
return;
}
-
+
strncpy(tmp, html, (size_t)(text-html));
tmp[text-html] = '\0'; /* strncpy does not zero-terminate! */
if (pc->textCallBack != NULL) {
@@ -937,21 +937,21 @@
if (ret != 0) {
free(tmp);
tmp = NULL;
-
+
return;
}
}
-
+
free(tmp);
tmp = NULL;
-
+
pc->lhtml_script_passthru = 0;
html = text;
}
-
+
if(*html == '<'){
html++;
-
+
switch (*html){
case '!' :
html++;
@@ -1005,7 +1005,7 @@
if (keyword == NULL)
return next;
result = (EXTRACTOR_KeywordList*)malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = strdup(keyword);
result->keywordType = type;
return result;
@@ -1043,7 +1043,7 @@
struct ArgvTable * args,
int numargs) {
int i;
- for (i=0;i<numargs;i++)
+ for (i=0;i<numargs;i++)
if (0 == strcasecmp(args[i].arg, arg))
return args[i].val;
return NULL;
@@ -1053,10 +1053,10 @@
char * name;
EXTRACTOR_KeywordType type;
} tagmap[] = {
- { "author" , EXTRACTOR_AUTHOR},
+ { "author" , EXTRACTOR_AUTHOR},
{ "description" , EXTRACTOR_DESCRIPTION},
{ "language", EXTRACTOR_LANGUAGE},
- { "rights", EXTRACTOR_COPYRIGHT},
+ { "rights", EXTRACTOR_COPYRIGHT},
{ "publisher", EXTRACTOR_PUBLISHER},
{ "date", EXTRACTOR_DATE},
{ "keywords", EXTRACTOR_KEYWORDS},
@@ -1065,8 +1065,8 @@
-static int starttag(char *tag,
- struct ArgvTable *args,
+static int starttag(char *tag,
+ struct ArgvTable *args,
int numargs,
struct PC_ * pc) {
int i;
@@ -1075,11 +1075,11 @@
pc->nextTextAction = 1;
pc->nextKeywordType = EXTRACTOR_TITLE;
return 0;
- }
+ }
if (0 == strcasecmp(tag,"meta")) {
i = 0;
while (tagmap[i].name != NULL) {
- if (hasTag("name",tagmap[i].name,args, numargs))
+ if (hasTag("name",tagmap[i].name,args, numargs))
pc->result = addKeyword(tagmap[i].type,
getTag("content",
args, numargs),
@@ -1094,8 +1094,8 @@
"text/html",
pc->result);
return 0;
- }
-#endif
+ }
+#endif
if ( (tag != NULL) &&
( (0 == strcasecmp(tag, "body")) ||
(0 == strcasecmp(tag, "/body")) ) )
@@ -1174,7 +1174,7 @@
return prev;
j++;
}
- }
+ }
memset(&pc,
0,
@@ -1186,14 +1186,14 @@
if (size > 1024 * 32)
xsize = 1024 * 32;
else
- xsize = size;
+ xsize = size;
/* the parser requires 0-termination. We just
overwrite the last character in data and
restore it later, assuming that it can
- hardly be a keyword in a valid HTML text...
+ hardly be a keyword in a valid HTML text...
*/
backup = data[xsize-1];
- data[xsize-1] = '\0';
+ data[xsize-1] = '\0';
parse(data, &pc);
data[xsize-1] = backup;
return pc.result;
Modified: Extractor/src/plugins/id3v23extractor.c
===================================================================
--- Extractor/src/plugins/id3v23extractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/id3v23extractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -36,13 +36,13 @@
#include "convert.h"
-static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
+static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
char *phrase,
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * keyword;
-
+
keyword = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = oldhead;
+ keyword->next = oldhead;
keyword->keyword = phrase;
keyword->keywordType = type;
return keyword;
@@ -90,7 +90,7 @@
/* mimetype = audio/mpeg */
-struct EXTRACTOR_Keywords *
+struct EXTRACTOR_Keywords *
libextractor_id3v23_extract(const char * filename,
const unsigned char * data,
const size_t size,
@@ -125,12 +125,12 @@
ehdrSize = ( ( (data[10]) << 24 ) |
( (data[11]) << 16 ) |
( (data[12]) << 8 ) |
- ( (data[12]) << 0 ) );
+ ( (data[12]) << 0 ) );
padding = ( ( (data[15]) << 24 ) |
( (data[16]) << 16 ) |
( (data[17]) << 8 ) |
- ( (data[18]) << 0 ) );
+ ( (data[18]) << 0 ) );
pos += 4 + ehdrSize;
if (padding < tsize)
tsize -= padding;
Modified: Extractor/src/plugins/id3v24extractor.c
===================================================================
--- Extractor/src/plugins/id3v24extractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/id3v24extractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -36,13 +36,13 @@
#include "convert.h"
-static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
+static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
char *phrase,
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * keyword;
-
+
keyword = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = oldhead;
+ keyword->next = oldhead;
keyword->keyword = phrase;
keyword->keywordType = type;
return keyword;
@@ -89,7 +89,7 @@
/* mimetype = audio/mpeg */
-struct EXTRACTOR_Keywords *
+struct EXTRACTOR_Keywords *
libextractor_id3v24_extract(const char * filename,
const unsigned char * data,
const size_t size,
@@ -143,7 +143,7 @@
( (data[pos+5] & 0x7F) << 14 ) |
( (data[pos+6] & 0x7F) << 7 ) |
( (data[pos+7] & 0x7F) << 0 ) );
-
+
if ( (pos + 10 + csize > tsize) ||
(csize > tsize) ||
(csize == 0) )
@@ -186,7 +186,7 @@
"UTF-16BE");
break;
case 0x03 :
- word = malloc(csize+1);
+ word = malloc(csize+1);
memcpy(word,
&data[pos+11],
csize);
Modified: Extractor/src/plugins/id3v2extractor.c
===================================================================
--- Extractor/src/plugins/id3v2extractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/id3v2extractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -29,13 +29,13 @@
#define DEBUG_EXTRACT_ID3v2 0
-static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
+static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
char *phrase,
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * keyword;
-
+
keyword = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = oldhead;
+ keyword->next = oldhead;
keyword->keyword = phrase;
keyword->keywordType = type;
return keyword;
@@ -104,7 +104,7 @@
( (data[7] & 0x7F) << 14 ) |
( (data[8] & 0x7F) << 07 ) |
( (data[9] & 0x7F) << 00 ) );
-
+
if (tsize + 10 > size)
return prev;
pos = 10;
Modified: Extractor/src/plugins/jpegextractor.c
===================================================================
--- Extractor/src/plugins/jpegextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/jpegextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -37,7 +37,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -56,14 +56,14 @@
char result = **data;
(*data)++;
return result;
- } else
+ } else
return -1;
}
*/
/**
* Read length, convert to unsigned int.
- * All 2-byte quantities in JPEG markers are MSB first
+ * All 2-byte quantities in JPEG markers are MSB first
* @return -1 on error
*/
static int readLength(unsigned char ** data,
@@ -83,19 +83,19 @@
/**
* @return the next marker or -1 on error.
*/
-static int next_marker(unsigned char ** data,
+static int next_marker(unsigned char ** data,
unsigned char * end) {
int c;
c = NEXTC(data, end);
- while ( (c != 0xFF) && (c != -1) )
- c = NEXTC(data, end);
+ while ( (c != 0xFF) && (c != -1) )
+ c = NEXTC(data, end);
do {
c = NEXTC(data, end);
} while ( (c == 0xFF) && (c != -1) );
return c;
}
-static void skip_variable(unsigned char ** data,
+static void skip_variable(unsigned char ** data,
unsigned char * end) {
int length;
@@ -108,7 +108,7 @@
(*data) += length;
}
-static char * process_COM(unsigned char ** data,
+static char * process_COM(unsigned char ** data,
unsigned char * end) {
unsigned int length;
int ch;
@@ -117,7 +117,7 @@
length = readLength(data, end);
if (length <= 0)
- return NULL;
+ return NULL;
comment = malloc(length+1);
pos = 0;
while (length > 0) {
@@ -125,8 +125,8 @@
if ( (ch == '\r') ||
(ch == '\n') )
comment[pos++] = '\n';
- else if (isprint(ch))
- comment[pos++] = ch;
+ else if (isprint(ch))
+ comment[pos++] = ch;
length--;
}
comment[pos] = '\0';
@@ -160,12 +160,12 @@
case -1: /* end of file */
case M_SOS:
case M_EOI:
- goto RETURN; /* this used to be "return result", but this
+ goto RETURN; /* this used to be "return result", but this
makes certain compilers unhappy...*/
case M_APP0: {
int len = readLength(&data, end);
if (len < 0x8)
- goto RETURN;
+ goto RETURN;
if (0 == strncmp(data,
"JFIF",
4)) {
@@ -213,7 +213,7 @@
char * val;
int len = readLength(&data, end);
if (len < 0x9)
- goto RETURN;
+ goto RETURN;
val = malloc(128);
snprintf(val, 128,
"%ux%u",
@@ -222,7 +222,7 @@
result = addKeyword(EXTRACTOR_SIZE,
val,
result);
- data = &data[len];
+ data = &data[len];
break;
}
case M_COM:
Modified: Extractor/src/plugins/lowerextractor.c
===================================================================
--- Extractor/src/plugins/lowerextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/lowerextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -26,7 +26,7 @@
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
- next->next = *list;
+ next->next = *list;
next->keyword = strdup(keyword);
next->keywordType = type;
*list = next;
Modified: Extractor/src/plugins/manextractor.c
===================================================================
--- Extractor/src/plugins/manextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/manextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -65,14 +65,14 @@
const char * buf,
const size_t size) {
int quot;
-
+
quot = 0;
while ( (*end < size) &&
- ( ((quot & 1) != 0) ||
+ ( ((quot & 1) != 0) ||
( (buf[*end] != ' ') ) ) ) {
if (buf[*end] == '\"')
quot++;
- (*end)++;
+ (*end)++;
}
if ((quot & 1) == 1)
(*end) = size+1;
@@ -84,7 +84,7 @@
int pos;
size_t xsize;
const size_t xlen = strlen(".TH ");
-
+
pos = 0;
if (size < xlen)
return prev;
@@ -100,12 +100,12 @@
(buf[xsize] != '\n') )
xsize++;
size = xsize;
-
+
if (0 == strncmp(".TH ",
&buf[pos],
xlen)) {
int end;
-
+
pos += xlen;
end = pos;
NEXT(&end, buf, size); if (end > size) return prev;
@@ -113,19 +113,19 @@
prev = addKeyword(EXTRACTOR_TITLE,
stndup(&buf[pos],
end - pos),
- prev);
+ prev);
pos = end + 1;
}
if (pos >= size) return prev;
end = pos;
- NEXT(&end, buf, size); if (end > size) return prev;
+ NEXT(&end, buf, size); if (end > size) return prev;
if (buf[pos] == '\"')
pos++;
if ( (end-pos >= 1) && (end - pos <= 4) ) {
switch (buf[pos]) {
case '1':
prev = addKeyword(EXTRACTOR_CATEGORY,
- strdup(_("Commands")),
+ strdup(_("Commands")),
prev);
break;
case '2':
@@ -177,7 +177,7 @@
prev = addKeyword(EXTRACTOR_DATE,
stndup(&buf[pos],
end - pos),
- prev);
+ prev);
pos = end + 1;
}
end = pos;
@@ -186,7 +186,7 @@
prev = addKeyword(EXTRACTOR_SOURCE,
stndup(&buf[pos],
end - pos),
- prev);
+ prev);
pos = end + 1;
}
end = pos;
@@ -195,9 +195,9 @@
prev = addKeyword(EXTRACTOR_BOOKTITLE,
stndup(&buf[pos],
end - pos),
- prev);
+ prev);
pos = end + 1;
- }
+ }
}
return prev;
@@ -216,7 +216,7 @@
gzFile gz;
char * buf;
int len;
-
+
gz = gzopen(filename, "rb");
buf = malloc(MAX_READ);
len = gzread(gz, buf, MAX_READ);
Modified: Extractor/src/plugins/mimeextractor.c
===================================================================
--- Extractor/src/plugins/mimeextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/mimeextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -30,7 +30,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -53,7 +53,7 @@
* @param len the length of the file
* @return always 1
**/
-static int defaultDetector(char * data,
+static int defaultDetector(char * data,
size_t len,
void * arg) {
return 1;
@@ -65,7 +65,7 @@
* @param len the length of the file
* @return always 0
**/
-static int disableDetector(char * data,
+static int disableDetector(char * data,
size_t len,
void * arg) {
return 0;
@@ -101,7 +101,7 @@
{ 0, 0, NULL },
#define ACON_XPATTERN 12
{ 8, 4, "ACON"},
- { 0, 0, NULL},
+ { 0, 0, NULL},
};
/**
@@ -110,7 +110,7 @@
* entries in the main table, so this "AND" (all match) semantics are
* the only reasonable answer.
**/
-static int xPatternMatcher(char * data,
+static int xPatternMatcher(char * data,
size_t len,
ExtraPattern * arg) {
while (arg->pattern != NULL) {
@@ -152,8 +152,8 @@
static Pattern patterns[] = {
{ "\xFF\xD8", 2, "image/jpeg", DEFAULT},
- { "\211PNG\r\n\032\n", 8, "image/png", DEFAULT},
- { "/* XPM */", 9, "image/x-xpm", DEFAULT},
+ { "\211PNG\r\n\032\n", 8, "image/png", DEFAULT},
+ { "/* XPM */", 9, "image/x-xpm", DEFAULT},
{ "GIF8", 4, "image/gif", DEFAULT},
{ "P1", 2, "image/x-portable-bitmap", DEFAULT},
{ "P2", 2, "image/x-portable-graymap", DEFAULT},
@@ -168,9 +168,9 @@
{ "hsi1", 4, "image/x-jpeg-proprietary", DEFAULT},
{ "\x2E\x52\x4d\x46", 4, "video/real", DEFAULT},
{ "\x2e\x72\x61\xfd", 4, "audio/real", DEFAULT},
- { "\177ELF", 4, "application/elf", DEFAULT},
+ { "\177ELF", 4, "application/elf", DEFAULT},
/* FIXME: correct MIME-type for an ELF!? */
- { "\xca\xfe\xba\xbe", 4, "application/java", DEFAULT},
+ { "\xca\xfe\xba\xbe", 4, "application/java", DEFAULT},
/* FIXME: correct MIME for a class-file? */
{ "gimp xcf", 8, "image/xcf", DEFAULT},
{ "IIN1", 4, "image/tiff", DEFAULT},
@@ -183,13 +183,13 @@
{ "RIFF", 4, "audio/x-wav", XPATTERN(WAVE_XPATTERN)},
{ "RIFX", 4, "video/avi", XPATTERN(AVI_XPATTERN)},
{ "RIFX", 4, "audio/x-wav", XPATTERN(WAVE_XPATTERN)},
- { "RIFF", 4, "audio/midi", XPATTERN(RMID_XPATTERN)},
- { "RIFX", 4, "audio/midi", XPATTERN(RMID_XPATTERN)},
- { "RIFF", 4, "image/x-animated-cursor", XPATTERN(ACON_XPATTERN)},
- { "RIFX", 4, "image/x-animated-cursor", XPATTERN(ACON_XPATTERN)},
+ { "RIFF", 4, "audio/midi", XPATTERN(RMID_XPATTERN)},
+ { "RIFX", 4, "audio/midi", XPATTERN(RMID_XPATTERN)},
+ { "RIFF", 4, "image/x-animated-cursor", XPATTERN(ACON_XPATTERN)},
+ { "RIFX", 4, "image/x-animated-cursor", XPATTERN(ACON_XPATTERN)},
{ "\211GND\r\n\032\n", 8, "application/gnunet-directory", DEFAULT},
{ "{\\rtf", 5, "application/rtf", DEFAULT},
- { "\xf7\x02", 2, "application/x-dvi", DEFAULT},
+ { "\xf7\x02", 2, "application/x-dvi", DEFAULT},
{ "\x1F\x8B\x08\x00", 4, "application/x-gzip", DEFAULT},
{ "BZh91AY&SY", 10, "application/bz2", DEFAULT},
{ "\xED\xAB\xEE\xDB", 4, "application/x-rpm", DEFAULT}, /* binary */
Modified: Extractor/src/plugins/mp3extractor.c
===================================================================
--- Extractor/src/plugins/mp3extractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/mp3extractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA.
- Some of this code is based on AVInfo 1.0 alpha 11
+ Some of this code is based on AVInfo 1.0 alpha 11
(c) George Shuklin, gs]AT[shounen.ru, 2002-2004
http://shounen.ru/soft/avinfo/
@@ -47,19 +47,19 @@
static const char *const genre_names[] = {
gettext_noop("Blues"),
- gettext_noop("Classic Rock"),
- gettext_noop("Country"),
- gettext_noop("Dance"),
- gettext_noop("Disco"),
- gettext_noop("Funk"),
+ gettext_noop("Classic Rock"),
+ gettext_noop("Country"),
+ gettext_noop("Dance"),
+ gettext_noop("Disco"),
+ gettext_noop("Funk"),
gettext_noop("Grunge"),
gettext_noop("Hip-Hop"),
- gettext_noop("Jazz"),
- gettext_noop("Metal"),
+ gettext_noop("Jazz"),
+ gettext_noop("Metal"),
gettext_noop("New Age"),
gettext_noop("Oldies"),
- gettext_noop("Other"),
- gettext_noop("Pop"),
+ gettext_noop("Other"),
+ gettext_noop("Pop"),
gettext_noop("R&B"),
gettext_noop("Rap"),
gettext_noop("Reggae"),
@@ -68,57 +68,57 @@
gettext_noop("Industrial"),
gettext_noop("Alternative"),
gettext_noop("Ska"),
- gettext_noop("Death Metal"),
+ gettext_noop("Death Metal"),
gettext_noop("Pranks"),
- gettext_noop("Soundtrack"),
+ gettext_noop("Soundtrack"),
gettext_noop("Euro-Techno"),
- gettext_noop("Ambient"),
+ gettext_noop("Ambient"),
gettext_noop("Trip-Hop"),
gettext_noop("Vocal"),
gettext_noop("Jazz+Funk"),
- gettext_noop("Fusion"),
- gettext_noop("Trance"),
- gettext_noop("Classical"),
+ gettext_noop("Fusion"),
+ gettext_noop("Trance"),
+ gettext_noop("Classical"),
gettext_noop("Instrumental"),
gettext_noop("Acid"),
gettext_noop("House"),
gettext_noop("Game"),
- gettext_noop("Sound Clip"),
+ gettext_noop("Sound Clip"),
gettext_noop("Gospel"),
- gettext_noop("Noise"),
+ gettext_noop("Noise"),
gettext_noop("Alt. Rock"),
- gettext_noop("Bass"),
- gettext_noop("Soul"),
+ gettext_noop("Bass"),
+ gettext_noop("Soul"),
gettext_noop("Punk"),
gettext_noop("Space"),
gettext_noop("Meditative"),
gettext_noop("Instrumental Pop"),
- gettext_noop("Instrumental Rock"),
- gettext_noop("Ethnic"),
+ gettext_noop("Instrumental Rock"),
+ gettext_noop("Ethnic"),
gettext_noop("Gothic"),
- gettext_noop("Darkwave"),
+ gettext_noop("Darkwave"),
gettext_noop("Techno-Industrial"),
gettext_noop("Electronic"),
gettext_noop("Pop-Folk"),
- gettext_noop("Eurodance"),
- gettext_noop("Dream"),
+ gettext_noop("Eurodance"),
+ gettext_noop("Dream"),
gettext_noop("Southern Rock"),
gettext_noop("Comedy"),
- gettext_noop("Cult"),
- gettext_noop("Gangsta Rap"),
- gettext_noop("Top 40"),
+ gettext_noop("Cult"),
+ gettext_noop("Gangsta Rap"),
+ gettext_noop("Top 40"),
gettext_noop("Christian Rap"),
gettext_noop("Pop/Funk"),
gettext_noop("Jungle"),
gettext_noop("Native American"),
- gettext_noop("Cabaret"),
+ gettext_noop("Cabaret"),
gettext_noop("New Wave"),
gettext_noop("Psychedelic"),
gettext_noop("Rave"),
- gettext_noop("Showtunes"),
+ gettext_noop("Showtunes"),
gettext_noop("Trailer"),
- gettext_noop("Lo-Fi"),
- gettext_noop("Tribal"),
+ gettext_noop("Lo-Fi"),
+ gettext_noop("Tribal"),
gettext_noop("Acid Punk"),
gettext_noop("Acid Jazz"),
gettext_noop("Polka"),
@@ -130,53 +130,53 @@
gettext_noop("Folk/Rock"),
gettext_noop("National Folk"),
gettext_noop("Swing"),
- gettext_noop("Fast-Fusion"),
+ gettext_noop("Fast-Fusion"),
gettext_noop("Bebob"),
gettext_noop("Latin"),
gettext_noop("Revival"),
gettext_noop("Celtic"),
gettext_noop("Bluegrass"),
- gettext_noop("Avantgarde"),
+ gettext_noop("Avantgarde"),
gettext_noop("Gothic Rock"),
- gettext_noop("Progressive Rock"),
+ gettext_noop("Progressive Rock"),
gettext_noop("Psychedelic Rock"),
- gettext_noop("Symphonic Rock"),
+ gettext_noop("Symphonic Rock"),
gettext_noop("Slow Rock"),
- gettext_noop("Big Band"),
+ gettext_noop("Big Band"),
gettext_noop("Chorus"),
gettext_noop("Easy Listening"),
- gettext_noop("Acoustic"),
+ gettext_noop("Acoustic"),
gettext_noop("Humour"),
gettext_noop("Speech"),
gettext_noop("Chanson"),
- gettext_noop("Opera"),
+ gettext_noop("Opera"),
gettext_noop("Chamber Music"),
gettext_noop("Sonata"),
- gettext_noop("Symphony"),
+ gettext_noop("Symphony"),
gettext_noop("Booty Bass"),
- gettext_noop("Primus"),
+ gettext_noop("Primus"),
gettext_noop("Porn Groove"),
gettext_noop("Satire"),
- gettext_noop("Slow Jam"),
- gettext_noop("Club"),
- gettext_noop("Tango"),
+ gettext_noop("Slow Jam"),
+ gettext_noop("Club"),
+ gettext_noop("Tango"),
gettext_noop("Samba"),
- gettext_noop("Folklore"),
- gettext_noop("Ballad"),
- gettext_noop("Power Ballad"),
+ gettext_noop("Folklore"),
+ gettext_noop("Ballad"),
+ gettext_noop("Power Ballad"),
gettext_noop("Rhythmic Soul"),
- gettext_noop("Freestyle"),
+ gettext_noop("Freestyle"),
gettext_noop("Duet"),
gettext_noop("Punk Rock"),
- gettext_noop("Drum Solo"),
- gettext_noop("A Cappella"),
+ gettext_noop("Drum Solo"),
+ gettext_noop("A Cappella"),
gettext_noop("Euro-House"),
gettext_noop("Dance Hall"),
gettext_noop("Goa"),
gettext_noop("Drum & Bass"),
gettext_noop("Club-House"),
- gettext_noop("Hardcore"),
- gettext_noop("Terror"),
+ gettext_noop("Hardcore"),
+ gettext_noop("Terror"),
gettext_noop("Indie"),
gettext_noop("BritPop"),
gettext_noop("Negerpunk"),
@@ -187,7 +187,7 @@
gettext_noop("Black Metal"),
gettext_noop("Crossover"),
gettext_noop("Contemporary Christian"),
- gettext_noop("Christian Rock"),
+ gettext_noop("Christian Rock"),
gettext_noop("Merengue"),
gettext_noop("Salsa"),
gettext_noop("Thrash Metal"),
@@ -244,11 +244,11 @@
#define INVALID_ID3 2
/**
- * Remove trailing whitespace from the end of a string
+ * Remove trailing whitespace from the end of a string
*/
static char * unpad(char * string) {
char * end = &string[strlen(string) - 1];
- while ( (end >= string) &&
+ while ( (end >= string) &&
(' ' == end[0]) )
(end--)[0]='\0';
return string;
@@ -264,7 +264,7 @@
pos = &data[size - 128];
if (0 != strncmp((const char *)"TAG",(const char *)pos, 3))
- return INVALID_ID3;
+ return INVALID_ID3;
pos += 3;
id3->title = convertToUtf8(pos,
@@ -288,15 +288,15 @@
return OK;
}
-static struct EXTRACTOR_Keywords *
-addkword(EXTRACTOR_KeywordList *oldhead,
+static struct EXTRACTOR_Keywords *
+addkword(EXTRACTOR_KeywordList *oldhead,
char *phrase,
EXTRACTOR_KeywordType type) {
-
+
EXTRACTOR_KeywordList * keyword;
-
+
keyword = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = oldhead;
+ keyword->next = oldhead;
keyword->keyword = strdup(phrase);
keyword->keywordType = type;
return keyword;
@@ -304,7 +304,7 @@
-static struct EXTRACTOR_Keywords *
+static struct EXTRACTOR_Keywords *
mp3parse(char * data,
size_t size,
struct EXTRACTOR_Keywords * prev) {
@@ -333,7 +333,7 @@
memcpy(&header,
&data[pos],
sizeof(header));
- if ((header&sync_mask)==sync_mask)
+ if ((header&sync_mask)==sync_mask)
break;/*found header sync*/
pos++;
counter++; /*next try*/
@@ -343,36 +343,36 @@
};/*give up to find mp3 header*/
prev = addkword(prev,
- "audio/mpeg",
- EXTRACTOR_MIMETYPE);
+ "audio/mpeg",
+ EXTRACTOR_MIMETYPE);
do { /*ok, now we found a mp3 frame header*/
frames++;
switch (header & mpeg_ver_mask){
- case 0x1000:
+ case 0x1000:
mpeg_ver = MPEG_ERR; /*error*/
break;
- case 0x800:
+ case 0x800:
prev = addkword(prev,
- "MPEG V2",
- EXTRACTOR_RESOURCE_TYPE);
+ "MPEG V2",
+ EXTRACTOR_RESOURCE_TYPE);
mpeg_ver = MPEG_V2;
break;
case 0x1800:
prev = addkword(prev,
- "MPEG V1",
- EXTRACTOR_RESOURCE_TYPE);
+ "MPEG V1",
+ EXTRACTOR_RESOURCE_TYPE);
mpeg_ver = MPEG_V1;
break;
case 0:
prev = addkword(prev,
- "MPEG V25",
- EXTRACTOR_RESOURCE_TYPE);
+ "MPEG V25",
+ EXTRACTOR_RESOURCE_TYPE);
mpeg_ver = MPEG_V25;
break;
}
switch(header&mpeg_layer_mask){
- case 0x400:
+ case 0x400:
layer_ver=LAYER_2;
break;
case 0x200:
@@ -386,9 +386,9 @@
}
if (!layer_ver||!mpeg_ver)
return prev; /*unknown mpeg type*/
- if (mpeg_ver<3)
- idx_num=(mpeg_ver-1)*3+layer_ver-1;
- else
+ if (mpeg_ver<3)
+ idx_num=(mpeg_ver-1)*3+layer_ver-1;
+ else
idx_num=2+layer_ver;
bitrate = 1000*bitrate_table[(header&bitrate_mask)>>20][idx_num];
if (bitrate<0) {
@@ -400,15 +400,15 @@
frames--;
break;
} /*error in header*/
- if ((header&ch_mask)==ch_mask)
+ if ((header&ch_mask)==ch_mask)
ch=1;
- else
+ else
ch=2; /*stereo non stereo select*/
frame_size =
144*bitrate/(sample_rate?sample_rate:1)+((header&pad_mask)>>17);
avg_bps += bitrate/1000;
pos += frame_size-4;
- if (frames > max_frames_scan)
+ if (frames > max_frames_scan)
break; /*optimization*/
if (avg_bps/frames!=bitrate/1000)
vbr_flag=1;
@@ -419,7 +419,7 @@
sizeof(header));
} while ((header&sync_mask)==sync_mask);
- if (!frames)
+ if (!frames)
return prev; /*no valid frames*/
avg_bps = avg_bps/frames;
if (max_frames_scan){ /*if not all frames scaned*/
@@ -427,7 +427,7 @@
} else{
length=1152*frames/(sample_rate?sample_rate:0xFFFFFFFF);
}
-
+
format = malloc(512);
snprintf(format,
512,
@@ -439,14 +439,14 @@
vbr_flag ? _("(variable bps)"):"");
prev = addkword(prev,
format,
- EXTRACTOR_FORMAT);
+ EXTRACTOR_FORMAT);
free(format);
return prev;
}
/* mimetype = audio/mpeg */
-struct EXTRACTOR_Keywords *
+struct EXTRACTOR_Keywords *
libextractor_mp3_extract(char * filename,
char * data,
size_t size,
@@ -454,29 +454,29 @@
id3tag info;
char * word;
- if (0 != get_id3(data, size, &info))
+ if (0 != get_id3(data, size, &info))
return klist;
- if (strlen(info.title) > 0)
- klist = addkword(klist, info.title, EXTRACTOR_TITLE);
+ if (strlen(info.title) > 0)
+ klist = addkword(klist, info.title, EXTRACTOR_TITLE);
if (strlen(info.artist) > 0)
klist = addkword(klist, info.artist, EXTRACTOR_ARTIST);
- if (strlen(info.album) > 0)
+ if (strlen(info.album) > 0)
klist = addkword(klist, info.album, EXTRACTOR_ALBUM);
- if (strlen(info.year) > 0)
+ if (strlen(info.year) > 0)
klist = addkword(klist, info.year, EXTRACTOR_DATE);
- if (strlen(info.genre) > 0)
+ if (strlen(info.genre) > 0)
klist = addkword(klist, info.genre, EXTRACTOR_GENRE);
- if (strlen(info.genre) > 0)
+ if (strlen(info.genre) > 0)
klist = addkword(klist, info.comment, EXTRACTOR_COMMENT);
/* A keyword that has all of the information together) */
word = (char*) malloc(strlen(info.artist) + strlen(info.title) +
strlen(info.album) + 6);
- sprintf(word,
+ sprintf(word,
"%s: %s (%s)",
- info.artist,
- info.title,
+ info.artist,
+ info.title,
info.album);
klist = addkword(klist, word, EXTRACTOR_DESCRIPTION);
free(word);
Modified: Extractor/src/plugins/mpegextractor.c
===================================================================
--- Extractor/src/plugins/mpegextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/mpegextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -18,7 +18,7 @@
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
- This code was based on AVInfo 1.0 alpha 11
+ This code was based on AVInfo 1.0 alpha 11
(c) George Shuklin, gs]AT[shounen.ru, 2002-2004
http://shounen.ru/soft/avinfo/
@@ -36,7 +36,7 @@
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
- next->next = *list;
+ next->next = *list;
next->keyword = keyword;
next->keywordType = type;
*list = next;
@@ -54,9 +54,9 @@
static unsigned int fread_be(unsigned char * data) {
int x;
unsigned int result = 0;
-
+
for (x=3;x>=0;x--)
- result |= data[4-x] << (x*8);
+ result |= data[4-x] << (x*8);
return result;
}
@@ -79,7 +79,7 @@
return prev;
if ( ! ( (xdata[0]==0x00) &&
- (xdata[1]==0x00) &&
+ (xdata[1]==0x00) &&
(xdata[2]==0x01) &&
( (xdata[3]==0xB3) || (xdata[3]==0xBA) ) ) )
return prev;
@@ -94,7 +94,7 @@
version = 2;
else
return prev; /* unsupported mpeg version */
-
+
if (version == 1) {
bitrate = round_double((double)((fread_be(&xdata[8]) & 0x7FFFFE) >> 1) *
0.4);
pos = 12;
@@ -113,7 +113,7 @@
if (pos + 4 >= xsize)
return prev;
temp = fread_be(&xdata[pos]);
- }
+ }
} else {
if (pos + 4 >= xsize)
return prev;
@@ -124,8 +124,8 @@
temp = fread_be(&xdata[pos]);
}
}
- pos += 4;
-
+ pos += 4;
+
if (pos + 4 >= xsize)
return prev;
/* Now read byte by byte until we find the 0x000001B3 instead of actually
@@ -140,14 +140,14 @@
return prev;
temp |= xdata[pos++];
}
- } else
+ } else
pos = 4; /* video only */
-
+
if (pos + 16 >= xsize)
return prev;
width = (xdata[pos] << 4) + (xdata[pos+1] & 0xF);
height = ((xdata[pos+1] & 0xF0) << 4) + xdata[pos+2];
-
+
addKeyword(&prev,
strdup("video/mpeg"),
EXTRACTOR_MIMETYPE);
Modified: Extractor/src/plugins/oggextractor.c
===================================================================
--- Extractor/src/plugins/oggextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/oggextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -46,7 +46,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = strdup(keyword);
result->keywordType = type;
return result;
@@ -86,9 +86,9 @@
return prev;
}
if (OGG_HEADER != ntohl(*(int*)data)) {
- return prev;
+ return prev;
}
-
+
callbacks.read_func = &readError;
callbacks.seek_func = &seekError;
callbacks.close_func = &closeOk;
@@ -101,7 +101,7 @@
return prev;
}
comments = ov_comment(&vf, -1);
-
+
if (NULL == comments) {
#if DEBUG_EXTRACT_OGG
fprintf(stderr,
@@ -125,17 +125,17 @@
prev = addKeyword(EXTRACTOR_LOCATION,get_comment(comments, "location"),
prev);
prev = addKeyword(EXTRACTOR_DESCRIPTION, get_comment(comments,
"description"), prev);
prev = addKeyword(EXTRACTOR_VERSIONNUMBER, get_comment(comments, "version"),
prev);
- prev = addKeyword(EXTRACTOR_RESOURCE_IDENTIFIER, get_comment(comments,
"isrc"), prev);
+ prev = addKeyword(EXTRACTOR_RESOURCE_IDENTIFIER, get_comment(comments,
"isrc"), prev);
prev = addKeyword(EXTRACTOR_ORGANIZATION, get_comment(comments,
"organization"), prev);
prev = addKeyword(EXTRACTOR_COPYRIGHT, get_comment(comments, "copyright"),
prev);
- /* we have determined for sure that this is an
+ /* we have determined for sure that this is an
ogg-vorbis stream, we should add this as a keyword, too */
- prev = addKeyword(EXTRACTOR_MIMETYPE,
- "application/ogg",
+ prev = addKeyword(EXTRACTOR_MIMETYPE,
+ "application/ogg",
prev);
/* build a description from artist, title and album */
{
- EXTRACTOR_KeywordList * keyword = malloc(sizeof(EXTRACTOR_KeywordList));
+ EXTRACTOR_KeywordList * keyword = malloc(sizeof(EXTRACTOR_KeywordList));
char * word;
int len = 1+2+2+1;
if (get_comment(comments, "artist") != NULL)
@@ -144,7 +144,7 @@
len += strlen(get_comment(comments, "title"));
if (get_comment(comments, "album") != NULL)
len += strlen(get_comment(comments, "album"));
-
+
word = malloc(len);
word[0] = 0;
if (get_comment(comments, "artist") != NULL) {
@@ -152,9 +152,9 @@
}
if (get_comment(comments, "title") != NULL) {
strcat(word,": ");
- strcat(word, get_comment(comments, "title"));
+ strcat(word, get_comment(comments, "title"));
}
- if (get_comment(comments, "album") != NULL) {
+ if (get_comment(comments, "album") != NULL) {
strcat(word," (");
strcat(word, get_comment(comments, "album"));
strcat(word, ")");
@@ -162,8 +162,8 @@
keyword->next = prev;
keyword->keyword = word;
keyword->keywordType = EXTRACTOR_DESCRIPTION;
- prev = keyword;
-
+ prev = keyword;
+
}
ov_clear(&vf);
Modified: Extractor/src/plugins/ole2/gsf-impl-utils.h
===================================================================
--- Extractor/src/plugins/ole2/gsf-impl-utils.h 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/ole2/gsf-impl-utils.h 2005-03-20 23:56:28 UTC (rev
467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-impl-utils.h:
+ * gsf-impl-utils.h:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf-infile-impl.h
===================================================================
--- Extractor/src/plugins/ole2/gsf-infile-impl.h 2005-03-20 23:56:11 UTC
(rev 466)
+++ Extractor/src/plugins/ole2/gsf-infile-impl.h 2005-03-20 23:56:28 UTC
(rev 467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-infile-impl.h:
+ * gsf-infile-impl.h:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf-infile-msole.c
===================================================================
--- Extractor/src/plugins/ole2/gsf-infile-msole.c 2005-03-20 23:56:11 UTC
(rev 466)
+++ Extractor/src/plugins/ole2/gsf-infile-msole.c 2005-03-20 23:56:28 UTC
(rev 467)
@@ -362,11 +362,11 @@
if (prev == entry) {
g_warning ("Invalid OLE file with a cycle in its directory
tree");
} else
- ole_dirent_new (ole, prev, parent);
+ ole_dirent_new (ole, prev, parent);
if (next == entry) {
g_warning ("Invalid OLE file with a cycle in its directory
tree");
} else
- ole_dirent_new (ole, next, parent);
+ ole_dirent_new (ole, next, parent);
if (dirent->is_directory)
ole_dirent_new (ole, child, dirent);
@@ -713,7 +713,7 @@
{
GsfInfileMSOle *ole = GSF_INFILE_MSOLE (input);
- (void) offset;
+ (void) offset;
(void) whence;
ole->cur_block = BAT_MAGIC_UNUSED;
@@ -776,7 +776,7 @@
if (gsf_input_seek (GSF_INPUT (sb_file),
(gsf_off_t)(child->bat.block [i] <<
info->sb.shift), G_SEEK_SET) < 0 ||
(data = gsf_input_read (GSF_INPUT (sb_file),
- info->sb.size,
+ info->sb.size,
child->stream.buf + (i << info->sb.shift))) ==
NULL) {
g_warning ("failure reading block %d", i);
@@ -851,7 +851,7 @@
ole->bat.num_blocks = 0;
ole->cur_block = BAT_MAGIC_UNUSED;
ole->stream.buf = NULL;
- ole->stream.buf_size = 0;
+ ole->stream.buf_size = 0;
}
static void
Modified: Extractor/src/plugins/ole2/gsf-infile-msole.h
===================================================================
--- Extractor/src/plugins/ole2/gsf-infile-msole.h 2005-03-20 23:56:11 UTC
(rev 466)
+++ Extractor/src/plugins/ole2/gsf-infile-msole.h 2005-03-20 23:56:28 UTC
(rev 467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-infile-msole.h:
+ * gsf-infile-msole.h:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf-infile.h
===================================================================
--- Extractor/src/plugins/ole2/gsf-infile.h 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/ole2/gsf-infile.h 2005-03-20 23:56:28 UTC (rev
467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-infile.h:
+ * gsf-infile.h:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf-input-memory.c
===================================================================
--- Extractor/src/plugins/ole2/gsf-input-memory.c 2005-03-20 23:56:11 UTC
(rev 466)
+++ Extractor/src/plugins/ole2/gsf-input-memory.c 2005-03-20 23:56:28 UTC
(rev 467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-input-memory.c:
+ * gsf-input-memory.c:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf-input.c
===================================================================
--- Extractor/src/plugins/ole2/gsf-input.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/ole2/gsf-input.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -160,7 +160,7 @@
/**
* gsf_input_name :
- * @input :
+ * @input :
*
* Returns @input's name in utf8 form, DO NOT FREE THIS STRING
**/
@@ -173,7 +173,7 @@
/**
* gsf_input_container :
- * @input :
+ * @input :
*
* Returns, but does not add a reference to @input's container.
* Potentially NULL
@@ -429,7 +429,7 @@
*
* Returns : A utility quark to flag a GError as being an input problem.
*/
-GQuark
+GQuark
gsf_input_error (void)
{
static GQuark quark;
@@ -479,7 +479,7 @@
if (res) {
g_object_unref (G_OBJECT (src));
return gsf_input_uncompress (res);
- }
+ }
}
}
#endif
@@ -536,7 +536,7 @@
if (len > 7 && !strncmp (uri, "file:/", 6)) {
/* dumb attempt to translate this into a local path */
input = gsf_input_stdio_new (uri+7, err);
- }
+ }
/* else: unknown or unhandled protocol - bail */
#endif
}
Modified: Extractor/src/plugins/ole2/gsf-msole-impl.h
===================================================================
--- Extractor/src/plugins/ole2/gsf-msole-impl.h 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/ole2/gsf-msole-impl.h 2005-03-20 23:56:28 UTC (rev
467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-msole-impl.h:
+ * gsf-msole-impl.h:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf-shared-memory.c
===================================================================
--- Extractor/src/plugins/ole2/gsf-shared-memory.c 2005-03-20 23:56:11 UTC
(rev 466)
+++ Extractor/src/plugins/ole2/gsf-shared-memory.c 2005-03-20 23:56:28 UTC
(rev 467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-shared-memory.c:
+ * gsf-shared-memory.c:
*
* Copyright (C) 2002-2004 Morten Welinder (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf-utils.c
===================================================================
--- Extractor/src/plugins/ole2/gsf-utils.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/ole2/gsf-utils.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-utils.c:
+ * gsf-utils.c:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf-utils.h
===================================================================
--- Extractor/src/plugins/ole2/gsf-utils.h 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/ole2/gsf-utils.h 2005-03-20 23:56:28 UTC (rev
467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf-utils.h:
+ * gsf-utils.h:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
Modified: Extractor/src/plugins/ole2/gsf.h
===================================================================
--- Extractor/src/plugins/ole2/gsf.h 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/ole2/gsf.h 2005-03-20 23:56:28 UTC (rev 467)
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t;
c-basic-offset: 8 -*- */
/*
- * gsf.h:
+ * gsf.h:
*
* Copyright (C) 2002-2004 Jody Goldberg (address@hidden)
*
@@ -39,7 +39,7 @@
/* FIXME:
* gsf_off_t is really supposed to be the widest type off_t can be configured
* to on the platform
- */
+ */
typedef gint64 gsf_off_t;
#define GSF_OFF_T_FORMAT G_GINT64_FORMAT
Modified: Extractor/src/plugins/ole2/ole2extractor.c
===================================================================
--- Extractor/src/plugins/ole2/ole2extractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/ole2/ole2extractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -44,11 +44,11 @@
g_type_init(); /* really needed??? */
}
-static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
+static struct EXTRACTOR_Keywords * addKeyword(EXTRACTOR_KeywordList *oldhead,
const char *phrase,
EXTRACTOR_KeywordType type) {
- EXTRACTOR_KeywordList * keyword;
+ EXTRACTOR_KeywordList * keyword;
if (strlen(phrase) == 0)
return oldhead;
if (0 == strcmp(phrase, "\"\""))
@@ -58,7 +58,7 @@
if (0 == strcmp(phrase, " "))
return oldhead;
keyword = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- keyword->next = oldhead;
+ keyword->next = oldhead;
keyword->keyword = strdup(phrase);
keyword->keywordType = type;
return keyword;
@@ -229,21 +229,21 @@
char const *res = NULL;
GsfMSOleMetaDataPropMap const *map = NULL;
unsigned i = 0;
-
+
if (section->dict != NULL) {
if (id & 0x1000000) {
id &= ~0x1000000;
d (printf ("LINKED "););
}
-
+
res = g_hash_table_lookup (section->dict, GINT_TO_POINTER (id));
-
+
if (res != NULL) {
d (printf (res););
return res;
}
}
-
+
if (section->type == GSF_MSOLE_META_DATA_COMPONENT) {
map = component_props;
i = G_N_ELEMENTS (component_props);
@@ -256,7 +256,7 @@
d (printf (map[i].name););
return map[i].name;
}
-
+
map = common_props;
i = G_N_ELEMENTS (common_props);
while (i-- > 0)
@@ -264,16 +264,16 @@
d (printf (map[i].name););
return map[i].name;
}
-
+
d (printf ("_UNKNOWN_(0x%x %d)", id, id););
-
+
return NULL;
}
static GValue *
msole_prop_parse(GsfMSOleMetaDataSection *section,
- guint32 type,
- guint8 const **data,
+ guint32 type,
+ guint8 const **data,
guint8 const *data_end)
{
GValue *res;
@@ -281,19 +281,19 @@
guint32 len;
gsize gslen;
gboolean const is_vector = type & LE_VT_VECTOR;
-
+
g_return_val_if_fail (!(type & (unsigned)(~0x1fff)), NULL); /* not valid in
a prop set */
-
+
type &= 0xfff;
-
+
if (is_vector) {
unsigned i, n;
-
+
g_return_val_if_fail (*data + 4 <= data_end, NULL);
-
+
n = GSF_LE_GET_GUINT32 (*data);
*data += 4;
-
+
d (printf (" array with %d elem\n", n);
gsf_mem_dump (*data, (unsigned)(data_end - *data)););
for (i = 0 ; i < n ; i++) {
@@ -309,152 +309,152 @@
}
return NULL;
}
-
+
res = g_new0 (GValue, 1);
switch (type) {
case LE_VT_EMPTY : d (puts ("VT_EMPTY"););
/* value::unset == empty */
break;
-
+
case LE_VT_NULL : d (puts ("VT_NULL"););
/* value::unset == null too :-) do we need to distinguish ? */
break;
-
+
case LE_VT_I2 : d (puts ("VT_I2"););
g_return_val_if_fail (*data + 2 <= data_end, NULL);
g_value_init (res, G_TYPE_INT);
g_value_set_int (res, GSF_LE_GET_GINT16 (*data));
*data += 2;
break;
-
+
case LE_VT_I4 : d (puts ("VT_I4"););
g_return_val_if_fail (*data + 4 <= data_end, NULL);
g_value_init (res, G_TYPE_INT);
g_value_set_int (res, GSF_LE_GET_GINT32 (*data));
*data += 4;
break;
-
+
case LE_VT_R4 : d (puts ("VT_R4"););
g_return_val_if_fail (*data + 4 <= data_end, NULL);
g_value_init (res, G_TYPE_FLOAT);
g_value_set_float (res, GSF_LE_GET_FLOAT (*data));
*data += 4;
break;
-
+
case LE_VT_R8 : d (puts ("VT_R8"););
g_return_val_if_fail (*data + 8 <= data_end, NULL);
g_value_init (res, G_TYPE_DOUBLE);
g_value_set_double (res, GSF_LE_GET_DOUBLE (*data));
*data += 8;
break;
-
+
case LE_VT_CY : d (puts ("VT_CY"););
break;
-
+
case LE_VT_DATE : d (puts ("VT_DATE"););
break;
-
+
case LE_VT_BSTR : d (puts ("VT_BSTR"););
break;
-
+
case LE_VT_DISPATCH : d (puts ("VT_DISPATCH"););
break;
-
+
case LE_VT_BOOL : d (puts ("VT_BOOL"););
g_return_val_if_fail (*data + 1 <= data_end, NULL);
g_value_init (res, G_TYPE_BOOLEAN);
g_value_set_boolean (res, **data ? TRUE : FALSE);
*data += 1;
break;
-
+
case LE_VT_VARIANT : d (printf ("VT_VARIANT containing a "););
g_free (res);
type = GSF_LE_GET_GUINT32 (*data);
*data += 4;
return msole_prop_parse (section, type, data, data_end);
-
+
case LE_VT_UI1 : d (puts ("VT_UI1"););
g_return_val_if_fail (*data + 1 <= data_end, NULL);
g_value_init (res, G_TYPE_UCHAR);
g_value_set_uchar (res, (guchar)(**data));
*data += 1;
break;
-
+
case LE_VT_UI2 : d (puts ("VT_UI2"););
g_return_val_if_fail (*data + 2 <= data_end, NULL);
g_value_init (res, G_TYPE_UINT);
g_value_set_uint (res, GSF_LE_GET_GUINT16 (*data));
*data += 2;
break;
-
+
case LE_VT_UI4 : d (puts ("VT_UI4"););
g_return_val_if_fail (*data + 4 <= data_end, NULL);
g_value_init (res, G_TYPE_UINT);
*data += 4;
d (printf ("%u\n", GSF_LE_GET_GUINT32 (*data)););
break;
-
+
case LE_VT_I8 : d (puts ("VT_I8"););
g_return_val_if_fail (*data + 8 <= data_end, NULL);
g_value_init (res, G_TYPE_INT64);
*data += 8;
break;
-
+
case LE_VT_UI8 : d (puts ("VT_UI8"););
g_return_val_if_fail (*data + 8 <= data_end, NULL);
g_value_init (res, G_TYPE_UINT64);
*data += 8;
break;
-
+
case LE_VT_LPSTR : d (puts ("VT_LPSTR"););
/* be anal and safe */
g_return_val_if_fail (*data + 4 <= data_end, NULL);
-
+
len = GSF_LE_GET_GUINT32 (*data);
-
+
g_return_val_if_fail (len < 0x10000, NULL);
g_return_val_if_fail (*data + 4 + len*section->char_size <= data_end,
NULL);
-
+
gslen = 0;
str = g_convert_with_iconv (*data + 4,
len * section->char_size,
section->iconv_handle, &gslen, NULL, NULL);
len = (guint32)gslen;
-
+
g_value_init (res, G_TYPE_STRING);
g_value_set_string (res, str);
g_free (str);
*data += 4 + len;
break;
-
+
case LE_VT_LPWSTR : d (puts ("VT_LPWSTR"););
/* be anal and safe */
g_return_val_if_fail (*data + 4 <= data_end, NULL);
-
+
len = GSF_LE_GET_GUINT32 (*data);
-
+
g_return_val_if_fail (len < 0x10000, NULL);
g_return_val_if_fail (*data + 4 + len <= data_end, NULL);
-
+
str = g_convert (*data + 4, len*2,
"UTF-8", "UTF-16LE", &gslen, NULL, NULL);
len = (guint32)gslen;
-
+
g_value_init (res, G_TYPE_STRING);
g_value_set_string (res, str);
g_free (str);
*data += 4 + len;
break;
-
+
case LE_VT_FILETIME : d (puts ("VT_FILETIME"););
g_return_val_if_fail (*data + 8 <= data_end, NULL);
-
+
g_value_init (res, G_TYPE_STRING);
{
/* ft * 100ns since Jan 1 1601 */
guint64 ft = GSF_LE_GET_GUINT64 (*data);
-
+
ft /= 10000000; /* convert to seconds */
#ifdef _MSC_VER
ft -= 11644473600i64; /* move to Jan 1 1970 */
@@ -463,7 +463,7 @@
#endif
str = g_strdup(ctime((time_t*)&ft));
-
+
g_value_set_string (res, str);
*data += 8;
@@ -486,7 +486,7 @@
case LE_VT_CLSID : d (puts ("VT_CLSID"););
*data += 16;
break;
-
+
case LE_VT_ERROR :
case LE_VT_UNKNOWN :
case LE_VT_DECIMAL :
@@ -504,13 +504,13 @@
g_free (res);
res = NULL;
break;
-
+
default :
warning ("Unknown property type %d (0x%x)", type, type);
g_free (res);
res = NULL;
};
-
+
d ( if (res != NULL && G_IS_VALUE (res)) {
char *val = g_strdup_value_contents (res);
d(printf ("%s\n", val););
@@ -533,52 +533,52 @@
gsf_off_t size = ((i+1) >= section->num_props)
? section->size-4 : props[i+1].offset;
char const *prop_name;
-
+
g_return_val_if_fail (i < section->num_props, NULL);
g_return_val_if_fail (size >= props[i].offset + 4, NULL);
-
+
size -= props[i].offset; /* includes the type id */
if (gsf_input_seek (in, section->offset+props[i].offset, G_SEEK_SET) ||
NULL == (data = gsf_input_read (in, size, NULL))) {
warning ("failed to read prop #%d", i);
return NULL;
}
-
+
type = GSF_LE_GET_GUINT32 (data);
data += 4;
-
+
/* dictionary is magic */
if (props[i].id == 0) {
guint32 len, id, i, n;
gsize gslen;
char *name;
guint8 const *start = data;
-
+
g_return_val_if_fail (section->dict == NULL, NULL);
-
+
section->dict = g_hash_table_new_full (
g_direct_hash, g_direct_equal,
NULL, g_free);
-
+
d (gsf_mem_dump (data-4, size););
n = type;
for (i = 0 ; i < n ; i++) {
id = GSF_LE_GET_GUINT32 (data);
len = GSF_LE_GET_GUINT32 (data + 4);
-
+
g_return_val_if_fail (len < 0x10000, NULL);
-
+
gslen = 0;
name = g_convert_with_iconv (data + 8,
len * section->char_size,
section->iconv_handle, &gslen, NULL, NULL);
len = (guint32)gslen;
data += 8 + len;
-
+
d (printf ("\t%u == %s\n", id, name););
g_hash_table_replace (section->dict,
GINT_TO_POINTER (id), name);
-
+
/* MS documentation blows goats !
* The docs claim there are padding bytes in the dictionary.
* Their examples show padding bytes.
@@ -587,13 +587,13 @@
if (section->char_size != 1 && (data - start) % 4)
data += 4 - ((data - start) % 4);
}
-
+
return NULL;
}
-
+
d (printf ("%u) ", i););
prop_name = msole_prop_id_to_gsf (section, props[i].id);
-
+
d (printf (" @ %x %x = ", (unsigned)props[i].offset, (unsigned)size););
return msole_prop_parse (section, type, &data, data + size);
}
@@ -614,12 +614,12 @@
* Returns an iconv converter for @codepage -> utf8.
**/
static GIConv
-gsf_msole_iconv_open_codepage_for_import(char const *to,
+gsf_msole_iconv_open_codepage_for_import(char const *to,
int codepage)
{
GIConv iconv_handle;
g_return_val_if_fail (to != NULL, (GIConv)(-1));
-
+
/* sometimes it is stored as signed short */
if (codepage == 65001 || codepage == -535) {
iconv_handle = g_iconv_open (to, "UTF-8");
@@ -637,20 +637,20 @@
if (iconv_handle != (GIConv)(-1))
return iconv_handle;
}
-
+
/* Try aliases. */
if (codepage == 10000) {
/* gnu iconv. */
iconv_handle = g_iconv_open (to, "MACROMAN");
if (iconv_handle != (GIConv)(-1))
return iconv_handle;
-
+
/* glibc. */
iconv_handle = g_iconv_open (to, "MACINTOSH");
if (iconv_handle != (GIConv)(-1))
return iconv_handle;
}
-
+
warning ("Unable to open an iconv handle from codepage %d -> %s",
codepage, to);
return (GIConv)(-1);
@@ -683,18 +683,18 @@
GsfMSOleMetaDataSection *sections;
GsfMSOleMetaDataProp *props;
- if (NULL == data)
- return prev;
-
+ if (NULL == data)
+ return prev;
+
/* NOTE : high word is the os, low word is the os version
* 0 = win16
* 1 = mac
* 2 = win32
*/
os = GSF_LE_GET_GUINT16 (data + 6);
-
+
version = GSF_LE_GET_GUINT16 (data + 2);
-
+
num_sections = GSF_LE_GET_GUINT32 (data + 24);
if (GSF_LE_GET_GUINT16 (data + 0) != 0xfffe
|| (version != 0 && version != 1)
@@ -702,7 +702,7 @@
|| num_sections > 100) { /* arbitrary sanity check */
return prev;
}
-
+
/* extract the section info */
sections = (GsfMSOleMetaDataSection *)g_alloca (sizeof
(GsfMSOleMetaDataSection)* num_sections);
for (i = 0 ; i < num_sections ; i++) {
@@ -721,7 +721,7 @@
warning ("Unknown property section type, treating it as USER");
d(gsf_mem_dump (data, 16););
}
-
+
sections [i].offset = GSF_LE_GET_GUINT32 (data + 16);
#ifndef NO_DEBUG_OLE_PROPS
d(printf ("0x%x\n", (guint32)sections [i].offset););
@@ -732,7 +732,7 @@
NULL == (data = gsf_input_read (in, 8, NULL))) {
return prev;
}
-
+
sections[i].iconv_handle = (GIConv)-1;
sections[i].char_size = 1;
sections[i].dict = NULL;
@@ -746,16 +746,16 @@
g_free (props);
return prev;
}
-
+
props [j].id = GSF_LE_GET_GUINT32 (data);
props [j].offset = GSF_LE_GET_GUINT32 (data + 4);
}
-
+
/* order prop info by offset to facilitate bounds checking */
qsort (props, sections[i].num_props,
sizeof (GsfMSOleMetaDataProp),
msole_prop_cmp);
-
+
sections[i].iconv_handle = (GIConv)-1;
sections[i].char_size = 1;
for (j = 0; j < sections[i].num_props; j++) /* first codepage */
@@ -776,7 +776,7 @@
}
if (sections[i].iconv_handle == (GIConv)-1)
sections[i].iconv_handle = gsf_msole_iconv_open_for_import (1252);
-
+
for (j = 0; j < sections[i].num_props; j++) /* then dictionary */
if (props[j].id == 0) {
GValue *v = msole_prop_read (in, sections+i, props, j);
@@ -784,8 +784,8 @@
if (G_VALUE_TYPE(v) == G_TYPE_STRING) {
gchar * contents = g_strdup_value_contents(v);
free(contents);
- } else {
-
+ } else {
+
/* FIXME: do something with non-strings... */
}
if (G_IS_VALUE (v))
@@ -800,13 +800,13 @@
gchar * contents = NULL;
int pc;
int ipc;
-
+
if (G_VALUE_TYPE(v) == G_TYPE_STRING) {
contents = g_strdup_value_contents(v);
} else {
/* convert other formats? */
contents = g_strdup_value_contents(v);
- }
+ }
pc = 0;
if (contents != NULL) {
for (ipc=strlen(contents)-1;ipc>=0;ipc--)
@@ -819,7 +819,7 @@
}
if (pc > 0) {
int pos = 0;
- const char * prop
+ const char * prop
= msole_prop_id_to_gsf(sections+i, props[j].id);
if (prop != NULL) {
while (tmap[pos].text != NULL) {
@@ -833,7 +833,7 @@
contents,
tmap[pos].type);
}
- }
+ }
if (contents != NULL)
free(contents);
}
@@ -843,7 +843,7 @@
g_free (v);
}
}
-
+
gsf_iconv_close (sections[i].iconv_handle);
g_free (props);
if (sections[i].dict != NULL)
@@ -865,7 +865,7 @@
"Win32",
EXTRACTOR_OS);
break;
- }
+ }
return prev;
}
@@ -876,12 +876,12 @@
size = gsf_input_size(src);
if (size < 0x374) /* == 0x375?? */
- return prev;
+ return prev;
buf = malloc(size);
- gsf_input_read(src, size, buf);
+ gsf_input_read(src, size, buf);
if ( (buf[0] != 0x0F) ||
(buf[1] != 0x0) ||
- (0 != strncmp(&buf[2],
+ (0 != strncmp(&buf[2],
"SfxDocumentInfo",
strlen("SfxDocumentInfo"))) ||
(buf[0x11] != 0x0B) ||
@@ -905,7 +905,7 @@
prev = addKeyword(prev,
&buf[0x117],
EXTRACTOR_COMMENT);
- buf[0x296] = '\0';
+ buf[0x296] = '\0';
if (buf[0x216] + buf[0x217] > 0)
prev = addKeyword(prev,
&buf[0x218],
@@ -926,17 +926,17 @@
guint8 const *data;
size_t len;
int i;
-
- input = gsf_input_memory_new((guint8 const *) date,
- (gsf_off_t) size,
+
+ input = gsf_input_memory_new((guint8 const *) date,
+ (gsf_off_t) size,
FALSE);
- if (input == NULL)
- return prev;
-
+ if (input == NULL)
+ return prev;
+
infile = gsf_infile_msole_new(input, NULL);
g_object_unref(G_OBJECT(input));
-
- if (infile == NULL)
+
+ if (infile == NULL)
return prev;
if (GSF_IS_INFILE(infile) &&
@@ -944,16 +944,16 @@
GsfInfile * in = GSF_INFILE (infile);
GsfInput * src;
const char * name;
-
+
for (i=0;i<gsf_infile_num_children(in);i++) {
src = gsf_infile_child_by_index (in, i);
name = gsf_infile_name_by_index (in, i);
- if ( (0 == strcmp(name, "\005SummaryInformation"))
- || (0 == strcmp(name, "\005DocumentSummaryInformation")) ) {
+ if ( (0 == strcmp(name, "\005SummaryInformation"))
+ || (0 == strcmp(name, "\005DocumentSummaryInformation")) ) {
prev = process(src,
prev);
- }
+ }
if (0 == strcmp(name, "SfxDocumentInfo")) {
prev = processSO(src,
prev);
Modified: Extractor/src/plugins/oo/ooextractor.c
===================================================================
--- Extractor/src/plugins/oo/ooextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/oo/ooextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -38,7 +38,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -51,7 +51,7 @@
} Matches;
static Matches tmap[] = {
- { "meta:generator", EXTRACTOR_SOFTWARE },
+ { "meta:generator", EXTRACTOR_SOFTWARE },
{ "meta:page-count", EXTRACTOR_PAGE_COUNT },
{ "meta:creation-date", EXTRACTOR_CREATION_DATE },
{ "dc:date", EXTRACTOR_DATE },
@@ -59,7 +59,7 @@
{ "dc:language", EXTRACTOR_LANGUAGE },
{ "dc:title", EXTRACTOR_TITLE },
{ "dc:description", EXTRACTOR_DESCRIPTION },
- { "dc:subject", EXTRACTOR_SUBJECT },
+ { "dc:subject", EXTRACTOR_SUBJECT },
{ "meta:keyword", EXTRACTOR_KEYWORDS },
{ "meta:user-defined meta:name=\"Info 1\"", EXTRACTOR_UNKNOWN },
{ "meta:user-defined meta:name=\"Info 2\"", EXTRACTOR_UNKNOWN },
@@ -105,7 +105,7 @@
unzClose(uf);
return prev; /* problems... */
}
-
+
if (UNZ_OK != unzOpenCurrentFilePassword(uf,NULL)) {
unzClose(uf);
return prev; /* problems... */
@@ -123,7 +123,7 @@
unzClose(uf);
return prev; /* out of memory */
}
-
+
if (buf_size != unzReadCurrentFile(uf,buf,buf_size)) {
free(buf);
unzCloseCurrentFile(uf);
@@ -150,10 +150,10 @@
pbuf = buf;
- while (1) {
+ while (1) {
strcpy(needle, "<");
strcat(needle, tmap[i].text);
- strcat(needle, ">");
+ strcat(needle, ">");
spos = strstr(pbuf, needle);
if (NULL == spos) {
strcpy(needle, tmap[i].text);
@@ -165,7 +165,7 @@
epos = spos;
while ( (epos[0] != '\0') &&
(epos[0] != '"') )
- epos++;
+ epos++;
} else {
oc = 0;
spos += strlen(needle);
@@ -191,13 +191,13 @@
key[epos-spos] = '\0';
prev = addKeyword(tmap[i].type,
key,
- prev);
+ prev);
pbuf = epos;
} else
break;
- }
+ }
}
- }
+ }
free(buf);
unzClose(uf);
return prev;
Modified: Extractor/src/plugins/pack.c
===================================================================
--- Extractor/src/plugins/pack.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/pack.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -2,7 +2,7 @@
Catlib Copyright Notice
The author of this software is Christopher Adam Telfer
-Copyright (c) 1998, 1999, 2000, 2001, 2002
+Copyright (c) 1998, 1999, 2000, 2001, 2002
by Christopher Adam Telfer. All Rights Reserved.
Permission to use, copy, modify, and distribute this software for any
@@ -23,10 +23,10 @@
MODIFICATIONS.
*/
-
+
#include "platform.h"
#include "pack.h"
-
+
typedef unsigned char byte;
typedef unsigned short half;
typedef unsigned long word;
@@ -35,7 +35,7 @@
typedef signed long sword;
-/*
+/*
"bhwAcslPBHWCSL"
Small letters: do not convert (not implemented for arrays and P)
@@ -45,7 +45,7 @@
h - half-word
w - word
a - array (32-byte unsigned long + that many bytes)
- c - signed 8 bit value
+ c - signed 8 bit value
s - signed 16 bit value
l - signed 32 bit value
p - (unpack only) value is a pointer to a pointer. Generate the buffer
@@ -55,7 +55,7 @@
of the arguments specified by the letter
*/
-int cat_pack(void * buf,
+int cat_pack(void * buf,
const char *fmt,
...) {
va_list ap;
@@ -68,15 +68,15 @@
void * arr;
struct cat_bvec *cbvp;
char *cp;
-
+
va_start(ap, fmt);
-
+
npacked = 0;
bp = (byte *)buf;
while( *fmt ) {
nreps = 0;
-
+
if ( isdigit(*fmt) ) {
/* We use cp instead of fmt to keep the 'const' qualifier of fmt */
nreps = strtoul(fmt, &cp, 0);
@@ -98,7 +98,7 @@
npacked += 1;
}
}
- break;
+ break;
case 'h':
case 's':
@@ -116,8 +116,8 @@
npacked += 2;
}
}
- break;
-
+ break;
+
case 'H':
case 'S':
if ( ! nreps ) {
@@ -134,8 +134,8 @@
npacked += 2;
}
}
- break;
-
+ break;
+
case 'l':
case 'w':
if ( ! nreps ) {
@@ -157,7 +157,7 @@
}
}
break;
-
+
case 'L':
case 'W':
if ( ! nreps ) {
@@ -179,7 +179,7 @@
}
}
break;
-
+
case 'A':
if ( ! nreps ) {
blen = va_arg(ap, word);
@@ -206,14 +206,14 @@
}
}
break;
-
+
default:
va_end(ap);
return -1;
}
++fmt;
}
-
+
va_end(ap);
return npacked;
}
@@ -235,7 +235,7 @@
unsigned int nreps, i, isnonprefixed = 1; /* used for 'a' types only */
struct cat_bvec *cbvp;
char *cp;
-
+
bp = (byte *)buf;
npacked = 0;
@@ -243,15 +243,15 @@
while ( *fmt ) {
nreps = 1;
-
+
if ( isdigit(*fmt) ) {
/* We use cp instead of format to keep the 'const' qualifier of fmt */
- nreps = strtoul(fmt, &cp, 0);
+ nreps = strtoul(fmt, &cp, 0);
fmt = cp;
if ( *fmt == 'a' )
isnonprefixed = 0;
}
-
+
switch (*fmt) {
case 'B':
case 'b':
@@ -262,9 +262,9 @@
npacked += 1;
}
break;
-
-
-
+
+
+
case 'h':
halfp = va_arg(ap, half*);
for ( i = 0 ; i < nreps ; ++i ) {
@@ -274,7 +274,7 @@
npacked += 2;
}
break;
-
+
case 'H':
halfp = va_arg(ap, half*);
for ( i = 0 ; i < nreps ; ++i ) {
@@ -284,8 +284,8 @@
npacked += 2;
}
break;
-
-
+
+
case 'w':
wordp = va_arg(ap, word*);
for ( i = 0 ; i < nreps ; ++i ) {
@@ -297,7 +297,7 @@
npacked += 4;
}
break;
-
+
case 'W':
wordp = va_arg(ap, word*);
for ( i = 0 ; i < nreps ; ++i ) {
@@ -309,9 +309,9 @@
npacked += 4;
}
break;
-
+
case 'A':
- if ( isnonprefixed ) {
+ if ( isnonprefixed ) {
maxlen = va_arg(ap, word);
arr = va_arg(ap, void *);
@@ -332,26 +332,26 @@
for ( i = 0 ; i < nreps ; ++i ) {
maxlen = cbvp->len;
arr = cbvp->data;
-
+
len = *bp++ << 24;
len |= *bp++ << 16;
len |= *bp++ << 8;
len |= *bp++;
-
+
if ( len > maxlen )
return -1;
-
+
memmove(arr, bp, len);
cbvp->len = len;
bp += len;
-
+
++cbvp;
npacked += len;
}
isnonprefixed = 1;
}
break;
-
+
case 'C':
case 'c':
sbytep = va_arg(ap, sbyte*);
@@ -365,8 +365,8 @@
npacked += 1;
}
break;
-
-
+
+
case 's':
shalfp = va_arg(ap, shalf*);
for ( i = 0 ; i < nreps ; ++i ) {
@@ -380,7 +380,7 @@
npacked += 2;
}
break;
-
+
case 'S':
shalfp = va_arg(ap, shalf*);
for ( i = 0 ; i < nreps ; ++i ) {
@@ -394,7 +394,7 @@
npacked += 2;
}
break;
-
+
case 'l':
swordp = va_arg(ap, sword*);
for ( i = 0 ; i < nreps ; ++i ) {
@@ -426,7 +426,7 @@
npacked += 4;
}
break;
-
+
case 'P':
cbvp = va_arg(ap, struct cat_bvec *);
for ( i = 0 ; i < nreps ; ++i ) {
@@ -452,7 +452,7 @@
npacked += len;
}
break;
-
+
default:
va_end(ap);
return -1;
Modified: Extractor/src/plugins/pack.h
===================================================================
--- Extractor/src/plugins/pack.h 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/pack.h 2005-03-20 23:56:28 UTC (rev 467)
@@ -2,7 +2,7 @@
Catlib Copyright Notice
The author of this software is Christopher Adam Telfer
-Copyright (c) 1998, 1999, 2000, 2001, 2002
+Copyright (c) 1998, 1999, 2000, 2001, 2002
by Christopher Adam Telfer. All Rights Reserved.
Permission to use, copy, modify, and distribute this software for any
@@ -28,7 +28,7 @@
#ifndef __CAT_PACK_H
#define __CAT_PACK_H
-/*
+/*
"bhwAcslPBHWCSL"
Small letters: do not convert (not implemented for arrays and P)
@@ -38,14 +38,14 @@
h - half-word
w - word
a - array (32-byte unsigned long + that many bytes)
- c - signed 8 bit value
+ c - signed 8 bit value
s - signed 16 bit value
l - signed 32 bit value
p - (unpack only) value is a pointer to a pointer. Generate the buffer
to hold the data.
*/
-int cat_pack(void * buf, const char *fmt, ... );
+int cat_pack(void * buf, const char *fmt, ... );
int cat_unpack(const void * buf, const char *fmt, ... );
Modified: Extractor/src/plugins/pdf/Decrypt.cc
===================================================================
--- Extractor/src/plugins/pdf/Decrypt.cc 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/pdf/Decrypt.cc 2005-03-20 23:56:28 UTC (rev
467)
@@ -21,8 +21,8 @@
static Guchar passwordPad[32] = {
0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41,
- 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08,
- 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80,
+ 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08,
+ 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80,
0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a
};
Modified: Extractor/src/plugins/pdf/FontEncoding.cc
===================================================================
--- Extractor/src/plugins/pdf/FontEncoding.cc 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/pdf/FontEncoding.cc 2005-03-20 23:56:28 UTC (rev
467)
@@ -97,7 +97,7 @@
int h, i, code2;
// insert name in hash table
- h = hash(name);
+ h = hash(name);
for (i = 0; i < fontEncHashSize; ++i) {
code2 = hashTab[h];
if (code2 < 0) {
Modified: Extractor/src/plugins/pdf/Stream.cc
===================================================================
--- Extractor/src/plugins/pdf/Stream.cc 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/pdf/Stream.cc 2005-03-20 23:56:28 UTC (rev 467)
@@ -250,7 +250,7 @@
obj.free();
}
str = new FlateStream(str, pred, columns, colors, bits);
- }
+ }
#if 0
else if (!strcmp(name, "JBIG2Decode")) {
if (params->isDict()) {
@@ -260,7 +260,7 @@
globals.free();
} else if (!strcmp(name, "JPXDecode")) {
str = new JPXStream(str);
- }
+ }
#endif
else {
error(getPos(), "Unknown filter '%s'", name);
@@ -1532,7 +1532,7 @@
eatBits(1);
code1 = lookBits(13);
} while ((code1 >> 1) != 0x001);
- eatBits(12);
+ eatBits(12);
if (encoding > 0) {
eatBits(1);
nextLine2D = !(code1 & 1);
Modified: Extractor/src/plugins/pdf/gfile.cc
===================================================================
--- Extractor/src/plugins/pdf/gfile.cc 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/pdf/gfile.cc 2005-03-20 23:56:28 UTC (rev 467)
@@ -14,7 +14,7 @@
#endif
#ifndef WIN32
#include <pwd.h>
-#endif
+#endif
#include "GString.h"
#include "gfile.h"
#include <sys/types.h>
Modified: Extractor/src/plugins/pdf/pdfextractor.cc
===================================================================
--- Extractor/src/plugins/pdf/pdfextractor.cc 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/pdf/pdfextractor.cc 2005-03-20 23:56:28 UTC (rev
467)
@@ -48,25 +48,25 @@
char * keyword,
struct EXTRACTOR_Keywords *
next) {
EXTRACTOR_KeywordList * result;
-
+
if (keyword == NULL)
return next;
result = (EXTRACTOR_KeywordList*) malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
}
-
-
- static struct EXTRACTOR_Keywords * printInfoString(Dict *infoDict,
- char *key,
+
+
+ static struct EXTRACTOR_Keywords * printInfoString(Dict *infoDict,
+ char *key,
EXTRACTOR_KeywordType type,
struct EXTRACTOR_Keywords
* next) {
Object obj;
GString *s1;
char * s;
-
+
if (infoDict->lookup(key, &obj)->isString()) {
s1 = obj.getString();
s = s1->getCString();
@@ -87,13 +87,13 @@
con = (char*) convertToUtf8((const char*) u, 2, "UNICODE");
strcat(result, con);
free(con);
- }
+ }
next = addKeyword(type,
strdup(result),
next);
free(result);
} else {
- next = addKeyword(type,
+ next = addKeyword(type,
convertToUtf8(s,
strlen(s),
"ISO-8859-1"),
@@ -103,9 +103,9 @@
obj.free();
return next;
}
-
- static struct EXTRACTOR_Keywords * printInfoDate(Dict *infoDict,
- char *key,
+
+ static struct EXTRACTOR_Keywords * printInfoDate(Dict *infoDict,
+ char *key,
EXTRACTOR_KeywordType type,
struct EXTRACTOR_Keywords *
next) {
Object obj;
@@ -134,7 +134,7 @@
con = (char*) convertToUtf8((const char*) u, 2, "UNICODE");
strcat(result, con);
free(con);
- }
+ }
next = addKeyword(type,
strdup(result),
next);
@@ -151,7 +151,7 @@
return next;
}
-
+
/* which mime-types should not be subjected to
the PDF extractor? (no use trying!) */
static char * blacklist[] = {
@@ -178,9 +178,9 @@
"video/asf",
"video/quicktime",
NULL,
- };
-
+ };
+
static const char *
extractLast (const EXTRACTOR_KeywordType type,
EXTRACTOR_KeywordList * keywords)
@@ -204,7 +204,7 @@
Object info;
struct EXTRACTOR_Keywords * result;
const char * mime;
-
+
/* if the mime-type of the file is blacklisted, don't
run the printable extactor! */
mime = extractLast(EXTRACTOR_MIMETYPE,
@@ -218,7 +218,7 @@
j++;
}
- }
+ }
fileName = new GString(filename);
/* errorInit(); -- keep commented out, otherwise errors are printed to
stderr for non-pdf files! */
@@ -229,34 +229,34 @@
freeParams();
return prev;
}
-
+
result = addKeyword(EXTRACTOR_MIMETYPE,
strdup("application/pdf"),
prev);
doc->getDocInfo(&info);
if (info.isDict()) {
- result = printInfoString(info.getDict(),
- "Title",
+ result = printInfoString(info.getDict(),
+ "Title",
EXTRACTOR_TITLE,
result);
- result = printInfoString(info.getDict(),
- "Subject",
+ result = printInfoString(info.getDict(),
+ "Subject",
EXTRACTOR_SUBJECT,
result);
- result = printInfoString(info.getDict(),
+ result = printInfoString(info.getDict(),
"Keywords",
EXTRACTOR_KEYWORDS,
result);
- result = printInfoString(info.getDict(),
+ result = printInfoString(info.getDict(),
"Author",
EXTRACTOR_AUTHOR,
result);
- result = printInfoString(info.getDict(),
+ result = printInfoString(info.getDict(),
"Creator",
EXTRACTOR_CREATOR,
result);
- result = printInfoString(info.getDict(),
- "Producer",
+ result = printInfoString(info.getDict(),
+ "Producer",
EXTRACTOR_PRODUCER,
result);
{
@@ -273,11 +273,11 @@
strdup(pcnt),
result);
}
- result = printInfoDate(info.getDict(),
- "CreationDate",
+ result = printInfoDate(info.getDict(),
+ "CreationDate",
EXTRACTOR_CREATION_DATE,
result);
- result = printInfoDate(info.getDict(),
+ result = printInfoDate(info.getDict(),
"ModDate",
EXTRACTOR_MODIFICATION_DATE,
result);
@@ -286,7 +286,7 @@
info.free();
delete doc;
freeParams();
-
- return result;
+
+ return result;
}
}
Modified: Extractor/src/plugins/pngextractor.c
===================================================================
--- Extractor/src/plugins/pngextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/pngextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -40,7 +40,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -58,17 +58,17 @@
char * name;
EXTRACTOR_KeywordType type;
} tagmap[] = {
- { "Author" , EXTRACTOR_AUTHOR},
+ { "Author" , EXTRACTOR_AUTHOR},
{ "Description" , EXTRACTOR_DESCRIPTION},
{ "Comment", EXTRACTOR_COMMENT},
- { "Copyright", EXTRACTOR_COPYRIGHT},
+ { "Copyright", EXTRACTOR_COPYRIGHT},
{ "Source", EXTRACTOR_SOURCE},
{ "Creation Time", EXTRACTOR_DATE},
{ "Title", EXTRACTOR_TITLE},
{ "Software", EXTRACTOR_SOFTWARE},
{ "Disclaimer", EXTRACTOR_DISCLAIMER},
{ "Warning", EXTRACTOR_WARNING},
- { "Signature", EXTRACTOR_RESOURCE_IDENTIFIER},
+ { "Signature", EXTRACTOR_RESOURCE_IDENTIFIER},
{ NULL, EXTRACTOR_UNKNOWN},
};
@@ -83,7 +83,7 @@
off = strnlen(data, length) + 1;
if (off >= length)
return prev; /* failed to find '\0' */
- keyword = convertToUtf8(&data[off],
+ keyword = convertToUtf8(&data[off],
length-off,
"ISO-8859-1");
i = 0;
@@ -111,7 +111,7 @@
int compressed;
char * buf;
uLongf bufLen;
- int ret;
+ int ret;
pos = strnlen(data, length)+1;
if (pos+3 >= length)
@@ -135,7 +135,7 @@
pos += strnlen(translated, length-pos)+1;
if (pos >= length)
return prev;
-
+
if (compressed) {
bufLen = 1024 + 2 * (length - pos);
while (1) {
@@ -167,10 +167,10 @@
free(buf);
} else {
keyword = stndup(&data[pos], length - pos);
- }
+ }
i = 0;
while (tagmap[i].name != NULL) {
- if (0 == strcmp(tagmap[i].name,
+ if (0 == strcmp(tagmap[i].name,
data))
return addKeyword(tagmap[i].type,
keyword, /* already in utf-8 */
@@ -195,7 +195,7 @@
128,
"%ux%u",
htonl(getIntAt(&data[4])),
- htonl(getIntAt(&data[8])));
+ htonl(getIntAt(&data[8])));
return addKeyword(EXTRACTOR_SIZE,
tmp,
prev);
@@ -293,19 +293,19 @@
length = htonl(getIntAt(pos)); pos+=4;
/* printf("Length: %u, pos %u\n", length, pos - data); */
if ( (pos+4+length+4 > end) ||
- (pos+4+length+4 < pos + 4 + length) )
+ (pos+4+length+4 < pos + 4 + length) )
break;
-
+
if (0 == strncmp(pos, "IHDR", 4))
result = processIHDR(pos, length, result);
- if (0 == strncmp(pos, "iTXt", 4))
+ if (0 == strncmp(pos, "iTXt", 4))
result = processiTXt(pos, length, result);
- if (0 == strncmp(pos, "tEXt", 4))
+ if (0 == strncmp(pos, "tEXt", 4))
result = processtEXt(pos, length, result);
- if (0 == strncmp(pos, "zTXt", 4))
+ if (0 == strncmp(pos, "zTXt", 4))
result = processzTXt(pos, length, result);
pos += 4+length+4; /* Chunk type, data, crc */
}
- return result;
+ return result;
}
Modified: Extractor/src/plugins/printable/bloomfilter.c
===================================================================
--- Extractor/src/plugins/printable/bloomfilter.c 2005-03-20 23:56:11 UTC
(rev 466)
+++ Extractor/src/plugins/printable/bloomfilter.c 2005-03-20 23:56:28 UTC
(rev 467)
@@ -28,7 +28,7 @@
*
* A property of the bloom filter is that sometimes we will have
* a match even if the element is not on the disk (then we do
- * an unnecessary disk access), but what's most important is that
+ * an unnecessary disk access), but what's most important is that
* we never get a single "false negative".
*
* @author Igor Wronsky
@@ -42,17 +42,17 @@
/**
* Sets a bit active in the bitArray. Increment bit-specific
* usage counter on disk only if below 4bit max (==15).
- *
+ *
* @param bitArray memory area to set the bit in
* @param bitIdx which bit to set
*/
-static void setBit(unsigned char * bitArray,
+static void setBit(unsigned char * bitArray,
unsigned int bitIdx) {
unsigned int arraySlot;
unsigned int targetBit;
arraySlot = bitIdx / 8;
- targetBit = (1L << (bitIdx % 8));
+ targetBit = (1L << (bitIdx % 8));
bitArray[arraySlot] |= targetBit;
}
@@ -63,13 +63,13 @@
* @param bitIdx which bit to test
* @return 1 if the bit is set, 0 if not.
*/
-static int testBit(unsigned char * bitArray,
+static int testBit(unsigned char * bitArray,
unsigned int bitIdx) {
unsigned int slot;
unsigned int targetBit;
slot = bitIdx / 8;
- targetBit = (1L << (bitIdx % 8));
+ targetBit = (1L << (bitIdx % 8));
return (bitArray[slot] & targetBit) != 0;
}
@@ -87,7 +87,7 @@
typedef void (*BitIterator)(Bloomfilter * bf,
unsigned int bit,
void * arg);
-
+
/**
* Call an iterator for each bit that the bloomfilter
* must test or set for this element.
@@ -114,8 +114,8 @@
while (bitCount > 0) {
while (slot < (sizeof(HashCode160)/
sizeof(unsigned int))) {
- callback(bf,
- (((unsigned int*)&tmp[round&1])[slot]) % (bf->bitArraySize*8),
+ callback(bf,
+ (((unsigned int*)&tmp[round&1])[slot]) % (bf->bitArraySize*8),
arg);
slot++;
bitCount--;
@@ -149,7 +149,7 @@
/**
* Callback: test if all bits are set
*
- * @param bf the filter
+ * @param bf the filter
* @param bit the bit to test
* @param arg pointer set to NO if bit is not set
*/
@@ -174,10 +174,10 @@
HashCode160 * e) {
int res;
- if (NULL == bf)
+ if (NULL == bf)
return 1;
res = 1;
- iterateBits(bf,
+ iterateBits(bf,
(BitIterator)&testBitCallback,
&res,
e);
@@ -193,7 +193,7 @@
void addToBloomfilter(Bloomfilter * bf,
HashCode160 * e) {
- if (NULL == bf)
+ if (NULL == bf)
return;
iterateBits(bf,
&setBitCallback,
Modified: Extractor/src/plugins/printable/bloomfilter.h
===================================================================
--- Extractor/src/plugins/printable/bloomfilter.h 2005-03-20 23:56:11 UTC
(rev 466)
+++ Extractor/src/plugins/printable/bloomfilter.h 2005-03-20 23:56:28 UTC
(rev 467)
@@ -28,7 +28,7 @@
#include "sha1.h"
typedef struct {
- /** How many bits we set for each stored element */
+ /** How many bits we set for each stored element */
unsigned int addressesPerElement;
/** The actual bloomfilter bit array */
unsigned char * bitArray;
@@ -53,4 +53,4 @@
void addToBloomfilter(Bloomfilter * bf,
HashCode160 * e);
-#endif
+#endif
Modified: Extractor/src/plugins/printable/dictionary-builder.c
===================================================================
--- Extractor/src/plugins/printable/dictionary-builder.c 2005-03-20
23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/printable/dictionary-builder.c 2005-03-20
23:56:28 UTC (rev 467)
@@ -6,7 +6,7 @@
#include "bloomfilter.h"
#include "sha1.c"
-#include "bloomfilter.c"
+#include "bloomfilter.c"
#define ADDR_PER_ELEMENT 46
@@ -23,30 +23,30 @@
FILE *dictin;
char * bn;
#define ALLOCSIZE 1024*1024
-
+
if (argc<2) {
- fprintf(stderr,
+ fprintf(stderr,
_("Please provide the name of the language you are building\n"
"a dictionary for. For example:\n"));
fprintf(stderr, "$ ./dictionary-builder en > en.c\n");
exit(-1);
}
-
+
fn = malloc(strlen(argv[1]) + 6);
strcpy(fn, argv[1]);
strcat(fn, ".txt");
dictin=fopen(fn,"r");
free(fn);
if (dictin==NULL) {
- fprintf(stderr,
+ fprintf(stderr,
_("Error opening file '%s': %s\n"),
argv[1],strerror(errno));
exit(-1);
}
-
+
words = malloc(sizeof(char*) * ALLOCSIZE); /* don't we LOVE constant size
buffers? */
if (words == NULL) {
- fprintf(stderr,
+ fprintf(stderr,
_("Error allocating: %s\n."),
strerror(errno));
exit(-1);
@@ -54,18 +54,18 @@
cnt = 0;
memset(&line[0], 0, 2048);
while (1 == fscanf(dictin, "%s", (char*)&line)) {
- words[cnt] = strdup(line);
+ words[cnt] = strdup(line);
cnt++;
memset(&line[0], 0, 2048);
if (cnt > ALLOCSIZE) {
- fprintf(stderr,
+ fprintf(stderr,
_("Increase ALLOCSIZE (in %s).\n"),
__FILE__);
exit(-1);
}
-
+
}
-
+
bf.addressesPerElement = ADDR_PER_ELEMENT;
bf.bitArraySize = cnt*4;
bf.bitArray = malloc(bf.bitArraySize);
@@ -82,7 +82,7 @@
"#include \"bloomfilter.h\"\n");
/* use int[] instead of char[] since it cuts the memory use of
- gcc down to a quarter; don't use long long since various
+ gcc down to a quarter; don't use long long since various
gcc versions then output tons of warnings about "decimal constant
is so large that it is unsigned" (even for unsigned long long[]
that warning is generated and dramatically increases compile times). */
@@ -90,7 +90,7 @@
"static int bits[] = { ");
for (i=0;i<bf.bitArraySize/sizeof(int);i++)
fprintf(stdout,
- "%dL,",
+ "%dL,",
(((int*)bf.bitArray)[i]));
fprintf(stdout,
"};\n");
Modified: Extractor/src/plugins/printable/printableextractor.c
===================================================================
--- Extractor/src/plugins/printable/printableextractor.c 2005-03-20
23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/printable/printableextractor.c 2005-03-20
23:56:28 UTC (rev 467)
@@ -47,7 +47,7 @@
char * keyword) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
- next->next = list;
+ next->next = list;
next->keyword = keyword;
next->keywordType = EXTRACTOR_UNKNOWN;
return next;
@@ -55,7 +55,7 @@
/**
- *
+ *
* @param word (alphabetic characters without spaces)
* @return 0 if it is no word, 1 if it is
**/
@@ -83,8 +83,8 @@
if (isupper(word[i]))
count++;
}
- if ( ((count==1) && (isupper(word[0]))) ||
- (count == strlen(word)) ){
+ if ( ((count==1) && (isupper(word[0]))) ||
+ (count == strlen(word)) ){
lower = strdup(word);
for (i=strlen(lower)-1;i>=0;i--)
lower[i] = tolower(lower[i]);
@@ -94,12 +94,12 @@
i = testBloomfilter(&FILTER_NAME,
&hc);
free(lower);
- } else
+ } else
i=0;
}
if (i) {
switch(strlen(word)) {
- case 1:
+ case 1:
*strlenthreshold = 6 * (*strlenthreshold);
break;
case 2:
@@ -129,7 +129,7 @@
if (*strlenthreshold < 0.25)
*strlenthreshold = 0.25;
}
-
+
return i;
}
@@ -140,7 +140,7 @@
if (*tail != NULL) {
(*tail)->next = addKeyword(NULL, keyword);
*tail = (*tail)->next;
- } else {
+ } else {
*tail = addKeyword(NULL, keyword);
*head = *tail;
}
@@ -180,7 +180,7 @@
free(keyword);
if (isprint(sxdup[0])) {
i=0;
- while ( (! isprint(sxdup[i+1]))
+ while ( (! isprint(sxdup[i+1]))
&& (i<len-1) )
i++;
free(sxdup);
@@ -191,7 +191,7 @@
}
}
addKeywordToList(xstrndup(keyword, max),
- head,
+ head,
tail);
free(keyword);
p=0;
@@ -230,7 +230,7 @@
if (wordTest(keyword, thresh)) {
addKeywordToList(keyword,
head,
- tail);
+ tail);
return;
}
i = 0;
@@ -238,7 +238,7 @@
i += process(xstrndup(&keyword[i], MAXBLEN),
thresh,
head,
- tail);
+ tail);
}
process(strdup(&keyword[i]),
thresh,
@@ -299,7 +299,7 @@
numWords = 0;
continue;
}
- }
+ }
/* found sentence! build & advance start! */
if (start == NULL)
@@ -344,7 +344,7 @@
pos = last->next;
numSentences++;
numWords = 0;
- continue;
+ continue;
}
*tail = last;
}
@@ -396,7 +396,7 @@
struct EXTRACTOR_Keywords * head = NULL;
struct EXTRACTOR_Keywords * tail = NULL;
double thresh = 2.0;
-
+
/* if the mime-type of the file is blacklisted, don't
run the printable extactor! */
mime = EXTRACTOR_extractLast(EXTRACTOR_MIMETYPE,
@@ -409,8 +409,8 @@
return prev;
j++;
}
- }
-
+ }
+
last = 0;
pos = 0;
while (last < size) {
@@ -450,7 +450,7 @@
&head,
&tail);
while ( (last < size) &&
- (isspace(data[last])) )
+ (isspace(data[last])) )
last++;
}
processSentences(&head, &tail);
Modified: Extractor/src/plugins/printable/sha1.c
===================================================================
--- Extractor/src/plugins/printable/sha1.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/printable/sha1.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -269,11 +269,11 @@
struct sha1_context ctx;
sha1_starts( &ctx );
- sha1_update( &ctx,
+ sha1_update( &ctx,
data,
size);
- sha1_finish( &ctx, hc->data );
+ sha1_finish( &ctx, hc->data );
}
#ifdef TEST
@@ -285,7 +285,7 @@
* those are the standard FIPS 180-1 test vectors
*/
-static char *msg[] =
+static char *msg[] =
{
"abc",
"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
Modified: Extractor/src/plugins/psextractor.c
===================================================================
--- Extractor/src/plugins/psextractor.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/psextractor.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -29,7 +29,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = strdup(keyword);
result->keywordType = type;
return result;
@@ -42,10 +42,10 @@
char * res;
while ( ( pos < size) &&
- ( (data[pos] == (char)0x0d) ||
- (data[pos] == (char)0x0a) ) )
+ ( (data[pos] == (char)0x0d) ||
+ (data[pos] == (char)0x0a) ) )
pos++;
-
+
if (pos >= size)
return NULL; /* end of file */
end = pos;
@@ -58,7 +58,7 @@
&data[pos],
end-pos);
res[end-pos] = '\0';
-
+
return res;
}
@@ -79,7 +79,7 @@
}
prev = addKeyword(type,
key,
- prev);
+ prev);
}
return prev;
}
@@ -103,9 +103,9 @@
{ "%%Magnification: ", EXTRACTOR_UNKNOWN },
/* Also widely used but not supported since they
- probably make no sense:
+ probably make no sense:
"%%BoundingBox: ",
- "%%DocumentNeededResources: ",
+ "%%DocumentNeededResources: ",
"%%DocumentSuppliedResources: ",
"%%DocumentProcSets: ",
"%%DocumentData: ", */
@@ -152,7 +152,7 @@
int i;
int lastLine;
const char * mime;
-
+
/* if the mime-type of the file is blacklisted, don't
run the printable extactor! */
mime = EXTRACTOR_extractLast(EXTRACTOR_MIMETYPE,
@@ -165,7 +165,7 @@
return prev;
j++;
}
- }
+ }
pos = 0;
@@ -176,15 +176,15 @@
if (pos != strlen(psheader)) {
return prev; /* no ps */
}
-
+
prev = addKeyword(EXTRACTOR_MIMETYPE,
"application/postscript",
prev);
/* skip rest of first line */
- while ( (pos<size) && (data[pos] != '\n') )
- pos++;
-
+ while ( (pos<size) && (data[pos] != '\n') )
+ pos++;
+
lastLine = -1;
line = strdup(psheader);
@@ -192,22 +192,22 @@
"%%EndComments", this should allow us to not read through most of
the file for all the sane applications... For Windows-generated
PS files, we will bail out at the end of the file. */
- while (0 != strncmp("%%EndComments",
+ while (0 != strncmp("%%EndComments",
line,
- strlen("%%EndComments"))) {
+ strlen("%%EndComments"))) {
free(line);
line = readline(data, size, pos);
if (line == NULL)
break;
i=0;
while (tests[i].prefix != NULL) {
- prev = testmeta(line,
+ prev = testmeta(line,
tests[i].prefix,
tests[i].type,
prev);
i++;
}
-
+
/* %%+ continues previous meta-data type... */
if ( (lastLine != -1) &&
(0 == strncmp(line, "%%+ ", strlen("%%+ "))) ) {
@@ -225,7 +225,7 @@
pos += strlen(line)+1; /* skip newline, too; guarantee progress! */
}
free(line);
-
+
return prev;
}
Modified: Extractor/src/plugins/qtextractor.c
===================================================================
--- Extractor/src/plugins/qtextractor.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/qtextractor.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -256,7 +256,7 @@
/* flags that indicate how a trak is supposed to be used */
unsigned int flags;
-
+
/* decoder data pass information to the AAC decoder */
void *decoder_config;
int decoder_config_len;
@@ -307,7 +307,7 @@
unsigned int modification_time;
unsigned int timescale; /* base clock frequency is Hz */
unsigned int duration;
-
+
int64_t moov_first_offset;
int trak_count;
@@ -335,15 +335,15 @@
void * buf,
int len) {
int min;
-
+
min = len;
if ( (this->inputLen < this->inputPos) ||
(this->inputPos < 0) )
return -1; /* invalid pos/len */
if (this->inputLen - this->inputPos < min)
min = this->inputLen - this->inputPos;
- memcpy(buf,
- &this->input[this->inputPos],
+ memcpy(buf,
+ &this->input[this->inputPos],
min);
this->inputPos += min;
return min;
@@ -353,7 +353,7 @@
* lazyqt special debugging functions
**********************************************************************/
-/* define DEBUG_ATOM_LOAD as 1 to get a verbose parsing of the relevant
+/* define DEBUG_ATOM_LOAD as 1 to get a verbose parsing of the relevant
* atoms */
#define DEBUG_ATOM_LOAD 0
@@ -375,7 +375,7 @@
/* Define DEBUG_DUMP_MOOV as 1 to dump the raw moov atom to disk. This is
* particularly useful in debugging a file with a compressed moov (cmov)
- * atom. The atom will be dumped to the filename specified as
+ * atom. The atom will be dumped to the filename specified as
* RAW_MOOV_FILENAME. */
#define DEBUG_DUMP_MOOV 0
#define RAW_MOOV_FILENAME "moovatom.raw"
@@ -511,7 +511,7 @@
ATOM_PREAMBLE_SIZE)
break;
- atom_size = BE_32(&atom_preamble[0]);
+ atom_size = BE_32(&atom_preamble[0]);
atom_size <<= 16; /* <<= 32 causes compiler warning if we */
atom_size <<= 16; /* are not running on 64 bit. */
atom_size |= BE_32(&atom_preamble[4]);
@@ -616,7 +616,7 @@
static int mp4_read_descr_len(unsigned char *s, ext_uint32_t *length) {
ext_uint8_t b;
ext_uint8_t numBytes = 0;
-
+
*length = 0;
do {
@@ -691,7 +691,7 @@
break;
}
}
-
+
debug_atom_load(" qt: parsing %s trak atom\n",
(trak->type == MEDIA_VIDEO) ? "video" :
(trak->type == MEDIA_AUDIO) ? "audio" : "other");
@@ -712,7 +712,7 @@
trak->properties.video.width =
BE_16(&trak_atom[i + 0x50]);
trak->properties.video.height =
- BE_16(&trak_atom[i + 0x54]);
+ BE_16(&trak_atom[i + 0x54]);
}
}
} else if (current_atom == ELST_ATOM) {
@@ -784,7 +784,7 @@
* fix at the end of the stsd parser */
i += hack_adjust;
}
-
+
if (trak->type == MEDIA_VIDEO) {
/* initialize to sane values */
@@ -796,7 +796,7 @@
trak->properties.video.palette_count = 0;
/* fetch video parameters */
- if( BE_16(&trak_atom[i + 0x2C]) &&
+ if( BE_16(&trak_atom[i + 0x2C]) &&
BE_16(&trak_atom[i + 0x2E]) ) {
trak->properties.video.width =
BE_16(&trak_atom[i + 0x2C]);
@@ -824,9 +824,9 @@
/* compute the greyscale palette */
color_index = 255;
- color_dec = 256 /
+ color_dec = 256 /
(trak->properties.video.palette_count - 1);
- for (j = 0;
+ for (j = 0;
j < trak->properties.video.palette_count;
j++) {
@@ -890,12 +890,12 @@
trak->properties.audio.bits / 8;
trak->properties.audio.samples_per_frame =
trak->properties.audio.channels;
- trak->properties.audio.bytes_per_frame =
- trak->properties.audio.bytes_per_sample *
+ trak->properties.audio.bytes_per_frame =
+ trak->properties.audio.bytes_per_sample *
trak->properties.audio.samples_per_frame;
- trak->properties.audio.samples_per_packet =
+ trak->properties.audio.samples_per_packet =
trak->properties.audio.samples_per_frame;
- trak->properties.audio.bytes_per_packet =
+ trak->properties.audio.bytes_per_packet =
trak->properties.audio.bytes_per_sample;
/* special case time: some ima4-encoded files don't have the
@@ -903,7 +903,7 @@
if (BE_32(&trak_atom[i + 0x10]) == IMA4_FOURCC) {
trak->properties.audio.samples_per_packet = 64;
trak->properties.audio.bytes_per_packet = 34;
- trak->properties.audio.bytes_per_frame = 34 *
+ trak->properties.audio.bytes_per_frame = 34 *
trak->properties.audio.channels;
trak->properties.audio.bytes_per_sample = 2;
trak->properties.audio.samples_per_frame = 64 *
@@ -917,19 +917,19 @@
if (BE_32(&trak_atom[i + 0x0C]) > 0x24) {
if (BE_32(&trak_atom[i + 0x30]))
- trak->properties.audio.samples_per_packet =
+ trak->properties.audio.samples_per_packet =
BE_32(&trak_atom[i + 0x30]);
if (BE_32(&trak_atom[i + 0x34]))
- trak->properties.audio.bytes_per_packet =
+ trak->properties.audio.bytes_per_packet =
BE_32(&trak_atom[i + 0x34]);
if (BE_32(&trak_atom[i + 0x38]))
- trak->properties.audio.bytes_per_frame =
+ trak->properties.audio.bytes_per_frame =
BE_32(&trak_atom[i + 0x38]);
if (BE_32(&trak_atom[i + 0x3C]))
- trak->properties.audio.bytes_per_sample =
+ trak->properties.audio.bytes_per_sample =
BE_32(&trak_atom[i + 0x3C]);
trak->properties.audio.samples_per_frame =
- (trak->properties.audio.bytes_per_frame /
+ (trak->properties.audio.bytes_per_frame /
trak->properties.audio.bytes_per_packet) *
trak->properties.audio.samples_per_packet;
@@ -946,7 +946,7 @@
trak->properties.audio.vbr = 1;
/* check for a MS-style WAVE format header */
- if ((current_atom_size >= 0x48) &&
+ if ((current_atom_size >= 0x48) &&
(BE_32(&trak_atom[i + 0x44]) == WAVE_ATOM)) {
trak->properties.audio.wave_present = 1;
} else {
@@ -983,12 +983,12 @@
} else if (current_atom == ESDS_ATOM) {
ext_uint32_t len;
-
+
debug_atom_load(" qt/mpeg-4 esds atom\n");
- if ((trak->type == MEDIA_VIDEO) ||
+ if ((trak->type == MEDIA_VIDEO) ||
(trak->type == MEDIA_AUDIO)) {
-
+
j = i + 8;
if( trak_atom[j++] == 0x03 ) {
j += mp4_read_descr_len( &trak_atom[j], &len );
@@ -1290,9 +1290,9 @@
/* This is a little support function used to process the edit list when
* building a frame table. */
#define MAX_DURATION 0x7FFFFFFF
-static void get_next_edit_list_entry(qt_trak *trak,
+static void get_next_edit_list_entry(qt_trak *trak,
int *edit_list_index,
- unsigned int *edit_list_media_time,
+ unsigned int *edit_list_media_time,
int64_t *edit_list_duration,
unsigned int global_timescale) {
@@ -1309,9 +1309,9 @@
/* otherwise, find an edit list entries whose media time != -1 */
if (trak->edit_list_table[*edit_list_index].media_time != -1) {
- *edit_list_media_time =
+ *edit_list_media_time =
trak->edit_list_table[*edit_list_index].media_time;
- *edit_list_duration =
+ *edit_list_duration =
trak->edit_list_table[*edit_list_index].track_duration;
/* duration is in global timescale units; convert to trak timescale */
@@ -1325,8 +1325,8 @@
*edit_list_index = *edit_list_index + 1;
}
- /* on the way out, check if this is the last edit list entry; if so,
- * don't let the duration expire (so set it to an absurdly large value)
+ /* on the way out, check if this is the last edit list entry; if so,
+ * don't let the duration expire (so set it to an absurdly large value)
*/
if (*edit_list_index == trak->edit_list_count)
*edit_list_duration = MAX_DURATION;
@@ -1353,7 +1353,7 @@
/* AUDIO and OTHER frame types follow the same rules; VIDEO and vbr audio
* frame types follow a different set */
- if ((trak->type == MEDIA_VIDEO) ||
+ if ((trak->type == MEDIA_VIDEO) ||
(trak->properties.audio.vbr)) {
/* in this case, the total number of frames is equal to the number of
@@ -1448,11 +1448,11 @@
debug_edit_list(" %d: (before) pts = %lld...", i,
trak->frames[i].pts);
- if (trak->frames[i].pts < edit_list_media_time)
+ if (trak->frames[i].pts < edit_list_media_time)
trak->frames[i].pts = edit_list_pts_counter;
else {
if (i < trak->frame_count - 1)
- frame_duration =
+ frame_duration =
(trak->frames[i + 1].pts - trak->frames[i].pts);
debug_edit_list("duration = %lld...", frame_duration);
@@ -1521,7 +1521,7 @@
/* compute the actual chunk size */
trak->frames[j].size =
- (trak->frames[j].size *
+ (trak->frames[j].size *
trak->properties.audio.channels) /
trak->properties.audio.samples_per_frame *
trak->properties.audio.bytes_per_frame;
@@ -1574,7 +1574,7 @@
/* create a new trak structure */
info->trak_count++;
- info->traks = (qt_trak *)realloc(info->traks,
+ info->traks = (qt_trak *)realloc(info->traks,
info->trak_count * sizeof(qt_trak));
parse_trak_atom (&info->traks[info->trak_count - 1], &moov_atom[i - 4]);
@@ -1668,10 +1668,10 @@
/* iterate through 1..n-1 reference entries and decide on the right one */
for (i = 1; i < info->reference_count; i++) {
- if (info->references[i].qtim_version >
+ if (info->references[i].qtim_version >
info->references[info->chosen_reference].qtim_version)
info->chosen_reference = i;
- else if ((info->references[i].data_rate >
+ else if ((info->references[i].data_rate >
info->references[info->chosen_reference].data_rate))
info->chosen_reference = i;
}
@@ -1711,7 +1711,7 @@
/* seek to the start of moov atom */
info->inputPos = info->moov_first_offset;
- if (readBuf(info, moov_atom, moov_atom_size) !=
+ if (readBuf(info, moov_atom, moov_atom_size) !=
moov_atom_size) {
free(moov_atom);
info->last_error = QT_FILE_READ_ERROR;
@@ -1896,29 +1896,29 @@
fseek(file, blockStart + blockLen, SEEK_SET);
continue;
}
-
+
subBlockStart = ftell(file);
subBlockLen = fread_be(file, 4); /* tkhd length */
fread(fourcc, sizeof(char), 4, file);
if(memcmp(fourcc, "tkhd", 4)!=0)
return;
-
+
/* Now in the track header */
/* 84: width (2 bytes) */
fseek(file, subBlockStart + 84, SEEK_SET);
width = fread_be(file, 2);
-
+
/* 88: height (2 bytes) */
fseek(file, subBlockStart + 88, SEEK_SET);
height = fread_be(file, 2);
-
+
/* Note on above: Apple's docs say that width/height are 4-byte integers,
* but all files I've seen have the data stored in the high-order two
* bytes, with the low-order two being 0x0000. Interpreting it the
* "official" way would make width/height be thousands of pixels each.
*/
-
+
/* Skip rest of tkhd */
fseek(file, subBlockStart + subBlockLen, SEEK_SET);
@@ -1987,7 +1987,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = strdup(keyword);
result->keywordType = type;
return result;
@@ -1996,7 +1996,7 @@
/* mimetypes:
video/quicktime: mov,qt: Quicktime animation;
video/x-quicktime: mov,qt: Quicktime animation;
- application/x-quicktimeplayer: qtl: Quicktime list;
+ application/x-quicktimeplayer: qtl: Quicktime list;
*/
struct EXTRACTOR_Keywords * libextractor_qt_extract(char * filename,
char * data,
Modified: Extractor/src/plugins/realextractor.c
===================================================================
--- Extractor/src/plugins/realextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/realextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -62,7 +62,7 @@
UINT8[copyright_len] copyright;
UINT16 comment_len;
UINT8[comment_len] comment;
- */
+ */
} Content_Description;
/* author, copyright and comment are supposed to be ASCII */
@@ -72,7 +72,7 @@
#define RAFF4_HEADER 0x2E7261FD
-static struct EXTRACTOR_Keywords *
+static struct EXTRACTOR_Keywords *
addKeyword(EXTRACTOR_KeywordType type,
char * keyword,
struct EXTRACTOR_Keywords * next) {
@@ -81,7 +81,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -90,39 +90,39 @@
static struct EXTRACTOR_Keywords *
processMediaProperties(const Media_Properties * prop,
struct EXTRACTOR_Keywords * prev) {
-
+
UINT8 mime_type_size;
UINT32 prop_size;
char * data;
prop_size = ntohl(prop->size);
if (prop_size <= sizeof(Media_Properties))
- return prev;
+ return prev;
if (0 != prop->object_version)
return prev;
if (prop_size <= prop->stream_name_size + sizeof(UINT8)
+ sizeof(Media_Properties))
- return prev;
-
+ return prev;
+
mime_type_size = prop->data[prop->stream_name_size];
if (prop_size <= prop->stream_name_size + sizeof(UINT8) +
+ mime_type_size + sizeof(Media_Properties))
- return prev;
-
+ return prev;
+
data = malloc(mime_type_size+1);
memcpy(data,&prop->data[prop->stream_name_size+1],mime_type_size);
data[mime_type_size]='\0';
-
+
return addKeyword(EXTRACTOR_MIMETYPE,
data,
prev);
}
-static struct EXTRACTOR_Keywords *
+static struct EXTRACTOR_Keywords *
processContentDescription(const Content_Description * prop,
struct EXTRACTOR_Keywords * prev) {
-
+
UINT16 author_len;
UINT16 copyright_len;
UINT16 comment_len;
@@ -135,7 +135,7 @@
prop_size = ntohl(prop->size);
if (prop_size <= sizeof(Content_Description))
- return prev;
+ return prev;
if (0 != prop->object_version)
return prev;
title_len = ntohs(prop->title_len);
@@ -145,33 +145,33 @@
author_len = ntohs( *(UINT16*)&prop->data[title_len]);
-
- if (prop_size <= title_len + sizeof(UINT16)
+
+ if (prop_size <= title_len + sizeof(UINT16)
+ author_len + sizeof(Content_Description))
return prev;
copyright_len =ntohs( *(UINT16*)&prop->data[title_len+
author_len+
sizeof(UINT16)]);
-
- if (prop_size <= title_len + 2*sizeof(UINT16)
+
+ if (prop_size <= title_len + 2*sizeof(UINT16)
+ author_len + copyright_len + sizeof(Content_Description))
return prev;
-
+
comment_len = ntohs( *(UINT16*)&prop->data[title_len+
author_len+
copyright_len+
2*sizeof(UINT16)]);
-
- if (prop_size < title_len + 3*sizeof(UINT16)
- + author_len + copyright_len + comment_len
+
+ if (prop_size < title_len + 3*sizeof(UINT16)
+ + author_len + copyright_len + comment_len
+ sizeof(Content_Description))
return prev;
-
+
title = malloc(title_len+1);
memcpy(title,&prop->data[0],title_len);
title[title_len]='\0';
-
+
prev = addKeyword(EXTRACTOR_TITLE,
title,
prev);
@@ -209,34 +209,34 @@
return prev;
}
-typedef struct RAFF4_header {
- unsigned short version;
- unsigned short revision;
- unsigned short header_length;
+typedef struct RAFF4_header {
+ unsigned short version;
+ unsigned short revision;
+ unsigned short header_length;
unsigned short compression_type;
- unsigned int granularity;
- unsigned int total_bytes;
+ unsigned int granularity;
+ unsigned int total_bytes;
unsigned int bytes_per_minute;
unsigned int bytes_per_minute2;
- unsigned short interleave_factor;
+ unsigned short interleave_factor;
unsigned short interleave_block_size;
- unsigned int user_data;
- float sample_rate;
+ unsigned int user_data;
+ float sample_rate;
unsigned short sample_size;
- unsigned short channels;
- unsigned char interleave_code[5];
+ unsigned short channels;
+ unsigned char interleave_code[5];
unsigned char compression_code[5];
unsigned char is_interleaved;
- unsigned char copy_byte;
- unsigned char stream_type;
+ unsigned char copy_byte;
+ unsigned char stream_type;
/*
unsigned char tlen;
unsigned char title[tlen];
- unsigned char alen;
+ unsigned char alen;
unsigned char author[alen];
- unsigned char clen;
+ unsigned char clen;
unsigned char copyright[clen];
- unsigned char aplen;
+ unsigned char aplen;
unsigned char app[aplen]; */
} RAFF4_header;
@@ -259,20 +259,20 @@
const unsigned char * pos;
const unsigned char * end;
struct EXTRACTOR_Keywords * result;
- unsigned int length;
+ unsigned int length;
const RAFF4_header * hdr;
unsigned char tlen;
unsigned char alen;
unsigned char clen;
unsigned char aplen;
- if (size <= 2*sizeof(int))
- return prev;
-
- if (RAFF4_HEADER == ntohl(*(int*)data)) {
+ if (size <= 2*sizeof(int))
+ return prev;
+
+ if (RAFF4_HEADER == ntohl(*(int*)data)) {
/* HELIX */
if (size <= RAFF4_HDR_SIZE + 16 + 4)
- return prev;
+ return prev;
prev = addKeyword(EXTRACTOR_MIMETYPE,
strdup("audio/vnd.rn-realaudio"),
prev);
@@ -287,7 +287,7 @@
return prev;
clen = data[18 + tlen + alen + RAFF4_HDR_SIZE];
if (tlen + alen + clen + RAFF4_HDR_SIZE + 20 > size)
- return prev;
+ return prev;
aplen = data[19 + tlen + clen + alen + RAFF4_HDR_SIZE];
if (tlen + alen + clen + aplen + RAFF4_HDR_SIZE + 20 > size)
return prev;
@@ -313,7 +313,7 @@
aplen),
prev);
return prev;
-
+
}
if (REAL_HEADER == ntohl(*(int*)data)) {
/* old real */
@@ -347,8 +347,8 @@
break;
}
}
- return result;
- }
+ return result;
+ }
return prev;
}
Modified: Extractor/src/plugins/riffextractor.c
===================================================================
--- Extractor/src/plugins/riffextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/riffextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -17,7 +17,7 @@
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
- This code was based on AVInfo 1.0 alpha 11
+ This code was based on AVInfo 1.0 alpha 11
(c) George Shuklin, gs]AT[shounen.ru, 2002-2004
http://shounen.ru/soft/avinfo/
@@ -35,7 +35,7 @@
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
- next->next = *list;
+ next->next = *list;
next->keyword = keyword;
next->keywordType = type;
*list = next;
@@ -62,7 +62,7 @@
word[c-8] = '\0';
addKeyword(&prev,
strdup(buffer+c),
- EXTRACTOR_UNKNOWN); /* eh, what exactly is it */
+ EXTRACTOR_UNKNOWN); /* eh, what exactly is it */
}
return prev;
}
@@ -71,12 +71,12 @@
/**
* Read the specified number of bytes as a little-endian (least
- * significant byte first) integer.
+ * significant byte first) integer.
*/
static unsigned int fread_le(char * data) {
int x;
unsigned int result = 0;
-
+
for(x=0;x<4; x++)
result |= ((unsigned char)data[x]) << (x*8);
return result;
@@ -103,17 +103,17 @@
unsigned int height;
char codec[5];
char * format;
-
+
if (xsize < 32)
return prev;
- if ( (memcmp(&xdata[0],
+ if ( (memcmp(&xdata[0],
"RIFF", 4) !=0) ||
- (memcmp(&xdata[8],
- "AVI ",
+ (memcmp(&xdata[8],
+ "AVI ",
4) !=0) )
return prev;
-
+
if (memcmp(&xdata[12],
"LIST",
4) != 0)
@@ -132,11 +132,11 @@
* 1000 / fps);
width = fread_le(&xdata[64]);
height = fread_le(&xdata[68]);
-
+
/* pos: begin of video stream header */
pos = blockLen + 32;
-
+
if ( (pos < blockLen) ||
(pos + 32 > xsize) ||
(pos > xsize) )
@@ -160,8 +160,8 @@
&xdata[pos+24],
4);
codec[4] = '\0';
-
- format = malloc(256);
+
+ format = malloc(256);
snprintf(format,
256,
_("codec: %s, %u fps, %u ms"),
@@ -171,7 +171,7 @@
addKeyword(&prev,
format,
EXTRACTOR_FORMAT);
- format = malloc(256);
+ format = malloc(256);
snprintf(format,
256,
"%ux%u",
Modified: Extractor/src/plugins/rpm/rpmextractor.c
===================================================================
--- Extractor/src/plugins/rpm/rpmextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/rpm/rpmextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -48,9 +48,9 @@
if (f->len - f->pos >= n)
min = n;
- else
+ else
min = f->len - f->pos;
- memcpy(dst,
+ memcpy(dst,
&f->data[f->pos],
min);
f->pos += min;
@@ -405,7 +405,7 @@
* Alignment needs (and sizeof scalars types) for internal rpm data types.
*/
/address@hidden@*/ /address@hidden@*/
-static int typeSizes[] = {
+static int typeSizes[] = {
0, /*!< RPM_NULL_TYPE */
1, /*!< RPM_CHAR_TYPE */
1, /*!< RPM_INT8_TYPE */
@@ -655,7 +655,7 @@
*/
typedef
int (*HDRisentry) (/address@hidden@*/Header h, int_32 tag)
- /address@hidden/;
+ /address@hidden/;
/** \ingroup header
* Free data allocated when retrieved from header.
@@ -1327,7 +1327,7 @@
key.info.tag = tag;
- entry2 = entry =
+ entry2 = entry =
bsearch(&key, h->index, h->indexUsed, sizeof(*h->index), indexCmp);
if (entry == NULL)
return NULL;
@@ -1377,7 +1377,7 @@
{
int_32 count = entry->info.count;
int rc = 1; /* XXX 1 on success. */
-
+
if (p)
switch (entry->info.type) {
case RPM_BIN_TYPE:
@@ -1443,7 +1443,7 @@
/address@hidden@*/
char * t;
int i;
-
+
/address@hidden@*/
if (minMem) {
*p = malloc(tableSize);
@@ -1548,7 +1548,7 @@
/**
* Does locale match entry in header i18n table?
- *
+ *
* \verbatim
* The range [l,le) contains the next locale to match:
* address@hidden
@@ -1649,7 +1649,7 @@
(lang = getenv("LC_MESSAGES")) == NULL &&
(lang = getenv("LANG")) == NULL)
return entry->data;
-
+
/address@hidden@*/
if ((table = findEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE)) ==
NULL)
return entry->data;
@@ -1916,7 +1916,7 @@
*tag = entry->info.tag;
rc = copyEntry(entry, type, p, c, do_copy);
-
+
/* XXX 1 on success */
return ((rc == 1) ? 1 : 0);
}
@@ -1975,13 +1975,13 @@
/**
* Sanity check on no. of tags.
* This check imposes a limit of 65K tags, more than enough.
- */
+ */
#define hdrchkTags(_ntags) ((_ntags) & 0xffff0000)
/**
* Sanity check on data size and/or offset.
* This check imposes a limit of 16Mb, more than enough.
- */
+ */
#define hdrchkData(_nbytes) ((_nbytes) & 0xff000000)
@@ -2130,7 +2130,7 @@
Header h = NULL;
entryInfo pe;
char * dataStart;
- indexEntry entry;
+ indexEntry entry;
int rdlen;
int i;
@@ -2330,7 +2330,7 @@
goto exit;
reserved = block[i++];
}
-
+
il = ntohl(block[i]); i++;
dl = ntohl(block[i]); i++;
@@ -2351,7 +2351,7 @@
if (timedRead(fd, (char *)&ei[2], len) != len)
goto exit;
/address@hidden@*/
-
+
h = headerLoad(ei);
exit:
@@ -2546,7 +2546,7 @@
if (!entry) return 1;
/* Make sure entry points to the first occurence of this tag. */
- while (entry > h->index && (entry - 1)->info.tag == tag)
+ while (entry > h->index && (entry - 1)->info.tag == tag)
entry--;
/* Free data for tags being removed. */
@@ -2784,7 +2784,7 @@
* @return rpmRC return code
*/
static rpmRC readPackageHeaders(FD_t fd,
- /address@hidden@*/ /address@hidden@*/ struct rpmlead * leadPtr,
+ /address@hidden@*/ /address@hidden@*/ struct rpmlead * leadPtr,
/address@hidden@*/ /address@hidden@*/ Header * sigs,
/address@hidden@*/ /address@hidden@*/ Header * hdrPtr)
/address@hidden fd, *leadPtr, *sigs, *hdrPtr @*/
@@ -2837,7 +2837,7 @@
/*
* We switched the way we do relocateable packages. We fix some of
- * it up here, though the install code still has to be a bit
+ * it up here, though the install code still has to be a bit
* careful. This fixup makes queries give the new values though,
* which is quite handy.
*/
@@ -2847,7 +2847,7 @@
defaultPrefix =
stripTrailingChar(alloca_strdup(defaultPrefix), '/');
(void) headerAddEntry(*hdr, RPMTAG_PREFIXES, RPM_STRING_ARRAY_TYPE,
- &defaultPrefix, 1);
+ &defaultPrefix, 1);
}
/*
@@ -2874,11 +2874,11 @@
default:
return RPMRC_FAIL;
/address@hidden@*/ break;
- }
+ }
if (hdrPtr == NULL)
*hdr = headerFree(*hdr);
-
+
return RPMRC_OK;
}
@@ -2956,13 +2956,13 @@
headerMergeLegacySigs(*hdrp, sig);
sig = rpmFreeSignature(sig);
}
-
+
if (isSource) *isSource = lead.type == RPMLEAD_SOURCE;
/address@hidden@*/
if (major) *major = lead.major;
if (minor) *minor = lead.minor;
/address@hidden@*/
-
+
exit:
return rc;
}
@@ -2978,7 +2978,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = strdup(keyword);
result->keywordType = type;
return result;
@@ -3028,13 +3028,13 @@
int minor;
int i;
char verb[40];
-
+
handle.data = data;
handle.pos = 0;
handle.len = size;
if (0 != rpmReadPackageHeader(&handle,
&hdr,
- &isSource,
+ &isSource,
&major,
&minor)) {
return prev;
@@ -3051,7 +3051,7 @@
else
sprintf(verb,
_("Binary RPM %d.%d"),
- major,
+ major,
minor);
prev = addKeyword(EXTRACTOR_UNKNOWN,
verb,
@@ -3064,15 +3064,15 @@
&c,
0)) {
i=0;
- while (tests[i].rtype != 0) {
+ while (tests[i].rtype != 0) {
if (tests[i].rtype == tag) {
switch (type) {
- case RPM_STRING_ARRAY_TYPE: {
+ case RPM_STRING_ARRAY_TYPE: {
char * tmp;
const char * p2;
int c2;
int size;
-
+
c2 = c;
p2 = p;
size = 0;
@@ -3081,7 +3081,7 @@
p2 = strchr(p2, 0);
p2++;
}
-
+
tmp = malloc(size+1);
tmp[0] = '\0';
while (c--) {
@@ -3091,11 +3091,11 @@
}
prev = addKeyword(tests[i].type,
tmp,
- prev);
+ prev);
free(tmp);
break;
}
- case RPM_I18NSTRING_TYPE: {
+ case RPM_I18NSTRING_TYPE: {
char * tmp;
const char * p2;
int c2;
@@ -3110,7 +3110,7 @@
p2 = strchr(p2, 0);
p2++;
}
-
+
tmp = malloc(size+1);
tmp[0] = '\0';
p2 = p;
@@ -3122,7 +3122,7 @@
}
prev = addKeyword(tests[i].type,
tmp,
- prev);
+ prev);
free(tmp);
break;
}
@@ -3139,27 +3139,27 @@
tmp[strlen(tmp)-1] = '\0'; /* eat linefeed */
prev = addKeyword(tests[i].type,
tmp,
- prev);
+ prev);
} else {
char tmp[14];
-
+
sprintf(tmp, "%d", *(int*)p);
prev = addKeyword(tests[i].type,
tmp,
- prev);
+ prev);
}
break;
}
}
- }
+ }
i++;
}
if ( ( (type == RPM_BIN_TYPE) ||
(type == RPM_I18NSTRING_TYPE) ||
(type == RPM_STRING_ARRAY_TYPE) ) &&
(p != NULL) ) {
- free((void*)p);
- }
+ free((void*)p);
+ }
}
headerFreeIterator(hi);
headerFree(hdr);
Modified: Extractor/src/plugins/splitextractor.c
===================================================================
--- Extractor/src/plugins/splitextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/splitextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -29,7 +29,7 @@
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
- next->next = *list;
+ next->next = *list;
next->keyword = strdup(keyword);
next->keywordType = type;
*list = next;
Modified: Extractor/src/plugins/tarextractor.c
===================================================================
--- Extractor/src/plugins/tarextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/tarextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -42,7 +42,7 @@
return next;
}
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -81,19 +81,19 @@
} USTarHeader;
-static struct EXTRACTOR_Keywords *
+static struct EXTRACTOR_Keywords *
tar_extract(const char * data,
size_t size,
struct EXTRACTOR_Keywords * prev) {
TarHeader * tar;
USTarHeader * ustar;
- size_t pos;
+ size_t pos;
if (0 != (size % 512) )
return prev; /* cannot be tar! */
if (size < 1024)
return prev;
- size -= 1024; /* last 2 blocks are all zeros */
+ size -= 1024; /* last 2 blocks are all zeros */
/* fixme: we may want to check that the last
1024 bytes are all zeros here... */
@@ -108,13 +108,13 @@
ustar = (USTarHeader*) &data[pos];
if (0 == strncmp("ustar",
&ustar->magic[0],
- strlen("ustar")))
+ strlen("ustar")))
pos += 512; /* sizeof(USTarHeader); */
else
pos += 257; /* sizeof(TarHeader); minus gcc alignment... */
} else {
pos += 257; /* sizeof(TarHeader); minus gcc alignment... */
- }
+ }
memcpy(buf, &tar->filesize[0], 12);
buf[12] = '\0';
if (1 != sscanf(buf, "%12llo", &fsize)) /* octal! Yuck yuck! */
@@ -188,11 +188,11 @@
}
gzclose(gzf);
prev = tar_extract(buf, bufSize, prev);
- free(buf);
+ free(buf);
return prev;
} else {
/* try for uncompressed tar */
return tar_extract(data, size, prev);
- }
+ }
}
Modified: Extractor/src/plugins/templateextractor.c
===================================================================
--- Extractor/src/plugins/templateextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/templateextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -29,7 +29,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
Modified: Extractor/src/plugins/thumbnail/thumbnailextractor.c
===================================================================
--- Extractor/src/plugins/thumbnail/thumbnailextractor.c 2005-03-20
23:56:11 UTC (rev 466)
+++ Extractor/src/plugins/thumbnail/thumbnailextractor.c 2005-03-20
23:56:28 UTC (rev 467)
@@ -41,7 +41,7 @@
if (keyword == NULL)
return next;
result = malloc(sizeof(EXTRACTOR_KeywordList));
- result->next = next;
+ result->next = next;
result->keyword = keyword;
result->keywordType = type;
return result;
@@ -49,9 +49,9 @@
/* which mime-types maybe subjected to
- the thumbnail extractor (ImageMagick
+ the thumbnail extractor (ImageMagick
crashes and/or prints errors for bad
- formats, so we need to be rather
+ formats, so we need to be rather
conservative here) */
static char * whitelist[] = {
"image/jpeg",
@@ -87,12 +87,12 @@
unsigned char marker;
const char * mime;
int j;
-
+
/* if the mime-type of the file is not whitelisted
do not run the thumbnail extactor! */
mime = EXTRACTOR_extractLast(EXTRACTOR_MIMETYPE,
prev);
- if (mime == NULL)
+ if (mime == NULL)
return prev;
j = 0;
while (whitelist[j] != NULL) {
@@ -103,7 +103,7 @@
if (whitelist[j] == NULL)
return prev;
- magick_wand = NewMagickWand();
+ magick_wand = NewMagickWand();
status = MagickReadImageBlob(magick_wand, data, size);
if (status == MagickFalse) {
DestroyMagickWand(magick_wand);
@@ -124,8 +124,8 @@
DestroyMagickWand(magick_wand);
return prev;
}
-
+
if (height > THUMBSIZE) {
width = width * THUMBSIZE / height;
height = THUMBSIZE;
@@ -140,7 +140,7 @@
MagickSetImageChannelDepth(magick_wand,
RedChannel,
2);
- MagickCommentImage(magick_wand, "");
+ MagickCommentImage(magick_wand, "");
MagickSetImageChannelDepth(magick_wand,
GreenChannel,
2);
@@ -159,10 +159,10 @@
}
thumb = MagickGetImageBlob(magick_wand, &length);
DestroyMagickWand(magick_wand);
- if (thumb == NULL)
+ if (thumb == NULL)
return prev;
-
-
+
+
/* encode! */
binary = malloc(2 + length + (length+256) / 254);
if (binary == NULL)
@@ -179,8 +179,8 @@
if (end > length)
end = length;
memset(markers, 0, sizeof(markers));
- for (i=pos;i<end;i++)
- markers[thumb[i]&7] |= 1 << (thumb[i] >> 3);
+ for (i=pos;i<end;i++)
+ markers[thumb[i]&7] |= 1 << (thumb[i] >> 3);
marker = 1;
while (markers[marker&7] & (1 << (marker >> 3))) {
marker++;
@@ -208,7 +208,7 @@
/**
* This function can be used to decode the binary data
- * stream produced by the thumbnailextractor.
+ * stream produced by the thumbnailextractor.
*
* @param in 0-terminated string from the meta-data
* @return 1 on error, 0 on success
@@ -223,7 +223,7 @@
size_t i;
size_t end;
size_t inSize;
-
+
inSize = strlen(in);
if (inSize == 0) {
*out = NULL;
@@ -233,7 +233,7 @@
buf = malloc(inSize); /* slightly more than needed ;-) */
*out = buf;
-
+
pos = 0;
wpos = 0;
while (pos < inSize) {
@@ -241,7 +241,7 @@
if (end > inSize)
end = inSize;
marker = in[pos++];
- for (i=pos;i<end;i++)
+ for (i=pos;i<end;i++)
buf[wpos++] = (in[i] == marker) ? 0 : in[i];
pos = end;
}
Modified: Extractor/src/plugins/tiffextractor.c
===================================================================
--- Extractor/src/plugins/tiffextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/tiffextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -29,7 +29,7 @@
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
- next->next = *list;
+ next->next = *list;
next->keyword = keyword;
next->keywordType = type;
*list = next;
@@ -64,7 +64,7 @@
&(p)->value_or_offset
static char * DIRECTORY_ENTRY_SPECS[] = {
"hhww",
- "HHWW"
+ "HHWW"
};
#define TAG_LENGTH 0x101
@@ -115,7 +115,7 @@
int current_ifd;
long long length = -1;
long long width = -1;
-
+
if (size < TIFF_HEADER_SIZE)
return prev; /* can not be tiff */
if ( (data[0] == 0x49) &&
@@ -128,7 +128,7 @@
return prev; /* can not be tiff */
#if __BYTE_ORDER == __BIG_ENDIAN
byteOrder = 1-byteOrder;
-#endif
+#endif
cat_unpack(data,
TIFF_HEADER_SPECS[byteOrder],
TIFF_HEADER_FIELDS(&hdr));
@@ -159,7 +159,7 @@
for (i=0;i<len;i++) {
DIRECTORY_ENTRY entry;
off = current_ifd + 2 + DIRECTORY_ENTRY_SIZE*i;
-
+
cat_unpack(&data[off],
DIRECTORY_ENTRY_SPECS[byteOrder],
DIRECTORY_ENTRY_FIELDS(&entry));
@@ -174,7 +174,7 @@
if (width != -1) {
char * tmp;
tmp = malloc(128);
- sprintf(tmp, "%ux%u",
+ sprintf(tmp, "%ux%u",
(unsigned int) width,
(unsigned int) length);
addKeyword(&prev,
@@ -182,17 +182,17 @@
EXTRACTOR_SIZE);
free(tmp);
}
- break;
+ break;
case TAG_WIDTH:
if ( (entry.type == TYPE_SHORT) &&
- (byteOrder == 1) )
+ (byteOrder == 1) )
width = entry.value_or_offset >> 16;
else
width = entry.value_or_offset;
if (length != -1) {
char * tmp;
tmp = malloc(128);
- sprintf(tmp, "%ux%u",
+ sprintf(tmp, "%ux%u",
(unsigned int) width,
(unsigned int) length);
addKeyword(&prev,
@@ -251,13 +251,13 @@
break;
}
}
-
+
off = current_ifd + 2 + DIRECTORY_ENTRY_SIZE * len;
if (byteOrder == 0)
current_ifd = data[off+3]<<24|data[off+2]<<16|data[off+1]<<8|data[off];
else
current_ifd = data[off]<<24|data[off+1]<<16|data[off+2]<<8|data[off+3];
- }
+ }
return prev;
}
Modified: Extractor/src/plugins/wavextractor.c
===================================================================
--- Extractor/src/plugins/wavextractor.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/plugins/wavextractor.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -21,8 +21,8 @@
(PD) 2004 The Bitzi Corporation
http://bitzi.com/
(PD) 2001 The Bitzi Corporation
- Please see file COPYING or http://bitzi.com/publicdomain
- for more info.
+ Please see file COPYING or http://bitzi.com/publicdomain
+ for more info.
*/
@@ -35,7 +35,7 @@
EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
- next->next = *list;
+ next->next = *list;
next->keyword = keyword;
next->keywordType = type;
*list = next;
@@ -44,14 +44,14 @@
#if BIG_ENDIAN_HOST
static short toLittleEndian16(short in) {
char *ptr = (char *)∈
-
- return ((ptr[1] & 0xFF) << 8) | (ptr[0] & 0xFF);
+
+ return ((ptr[1] & 0xFF) << 8) | (ptr[0] & 0xFF);
}
static unsigned int toLittleEndian32(unsigned int in) {
char *ptr = (char *)∈
-
- return ((ptr[3] & 0xFF) << 24) | ((ptr[2] & 0xFF) << 16) | ((ptr[1] & 0xFF)
<< 8) | (ptr[0] & 0xFF);
+
+ return ((ptr[3] & 0xFF) << 24) | ((ptr[2] & 0xFF) << 16) | ((ptr[1] & 0xFF)
<< 8) | (ptr[0] & 0xFF);
}
#endif
@@ -74,21 +74,21 @@
int bytesProcessed;
char * scratch;
-
+
if ( (bufLen < 44) ||
- (buf[0] != 'R' || buf[1] != 'I' ||
+ (buf[0] != 'R' || buf[1] != 'I' ||
buf[2] != 'F' || buf[3] != 'F' ||
- buf[8] != 'W' || buf[9] != 'A' ||
+ buf[8] != 'W' || buf[9] != 'A' ||
buf[10] != 'V' || buf[11] != 'E' ||
- buf[12] != 'f' || buf[13] != 'm' ||
+ buf[12] != 'f' || buf[13] != 'm' ||
buf[14] != 't' || buf[15] != ' ') )
return prev; /* not a WAV file */
-
- channels = *((unsigned short *)&buf[22]);
- sampleRate = *((unsigned int *)&buf[24]);
- sampleSize = *((unsigned short *)&buf[34]);
- dataLen = *((unsigned int *)&buf[40]);
+ channels = *((unsigned short *)&buf[22]);
+ sampleRate = *((unsigned int *)&buf[24]);
+ sampleSize = *((unsigned short *)&buf[34]);
+ dataLen = *((unsigned int *)&buf[40]);
+
#if BIG_ENDIAN_HOST
channels = toLittleEndian16(channels);
sampleSize = toLittleEndian16(sampleSize);
@@ -96,17 +96,17 @@
dataLen = toLittleEndian32(dataLen);
#endif
- if (sampleSize != 8 && sampleSize != 16)
+ if (sampleSize != 8 && sampleSize != 16)
return prev; /* invalid sample size found in wav file */
if (channels == 0)
return prev; /* invalid channels value -- avoid division by 0! */
samples = dataLen / (channels * (sampleSize >> 3));
-
+
scratch = malloc(256);
snprintf(scratch,
256,
"%u ms, %d Hz, %s",
- (samples < sampleRate)
+ (samples < sampleRate)
? (samples * 1000 / sampleRate)
: (samples / sampleRate) * 1000,
sampleRate,
Modified: Extractor/src/test/keywordlisttest.c
===================================================================
--- Extractor/src/test/keywordlisttest.c 2005-03-20 23:56:11 UTC (rev
466)
+++ Extractor/src/test/keywordlisttest.c 2005-03-20 23:56:28 UTC (rev
467)
@@ -1,4 +1,4 @@
-/**
+/**
* @file test/keywordlisttest.c
* @brief testcase for libextractor keyword list manipulation
* @author Christian Grothoff
@@ -27,7 +27,7 @@
};
EXTRACTOR_KeywordList * head;
EXTRACTOR_KeywordList * pos;
-
+
head = NULL;
i = 0;
while (keywords[i] != NULL) {
Modified: Extractor/src/test/multiload.c
===================================================================
--- Extractor/src/test/multiload.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/test/multiload.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -1,4 +1,4 @@
-/**
+/**
* @file test/multiload.c
* @brief testcase for libextractor plugin loading that loads the same
* plugins multiple times!
Modified: Extractor/src/test/plugintest.c
===================================================================
--- Extractor/src/test/plugintest.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/test/plugintest.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -1,4 +1,4 @@
-/**
+/**
* @file test/plugintest.c
* @brief testcase for dynamic loading and unloading of plugins
*/
@@ -68,9 +68,9 @@
while (list1 != NULL) {
if ( (strcmp(list1->keyword, "resolv") == 0) ||
(strcmp(list1->keyword, "conf") == 0) ||
- (strcmp(list1->keyword, "resolv.conf") == 0) )
+ (strcmp(list1->keyword, "resolv.conf") == 0) )
i++;
- list1 = list1->next;
+ list1 = list1->next;
}
if (i != 3) {
printf("Wrong keyword extracted.\n");
@@ -78,7 +78,7 @@
list);
return -1;
}
-
+
EXTRACTOR_removeAll(arg);
EXTRACTOR_freeKeywords(list);
Modified: Extractor/src/test/trivialtest.c
===================================================================
--- Extractor/src/test/trivialtest.c 2005-03-20 23:56:11 UTC (rev 466)
+++ Extractor/src/test/trivialtest.c 2005-03-20 23:56:28 UTC (rev 467)
@@ -1,4 +1,4 @@
-/**
+/**
* @file test/trivialtest.c
* @brief trivial testcase for libextractor plugin loading
* @author Christian Grothoff
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r467 - in Extractor: doc doc/lj libltdl src/include src/main src/plugins src/plugins/hash src/plugins/ole2 src/plugins/oo src/plugins/pdf src/plugins/printable src/plugins/rpm src/plugins/thumbnail src/test,
grothoff <=