|
|
|
|
@ -35,7 +35,7 @@
|
|
|
|
|
if(LIBRAW_FATAL_ERROR(ret)) \
|
|
|
|
|
{ \
|
|
|
|
|
libraw_close(iprc); \
|
|
|
|
|
return -1; \
|
|
|
|
|
return (void*)-1; \
|
|
|
|
|
} \
|
|
|
|
|
} \
|
|
|
|
|
}while(0)
|
|
|
|
|
@ -62,7 +62,7 @@ char *get_next_file()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// thread routine
|
|
|
|
|
int process_files(void *q)
|
|
|
|
|
void* process_files(void *q)
|
|
|
|
|
{
|
|
|
|
|
int ret;
|
|
|
|
|
int count=0;
|
|
|
|
|
@ -72,7 +72,7 @@ int process_files(void *q)
|
|
|
|
|
if(!iprc)
|
|
|
|
|
{
|
|
|
|
|
fprintf(stderr,"Cannot create libraw handle\n");
|
|
|
|
|
return -1;
|
|
|
|
|
return (void*)-1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
while((fn = get_next_file()))
|
|
|
|
|
@ -101,7 +101,7 @@ int process_files(void *q)
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
libraw_close(iprc);
|
|
|
|
|
return count;
|
|
|
|
|
return (void*)count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void usage(const char*p)
|
|
|
|
|
@ -165,12 +165,12 @@ int main(int ac, char *av[])
|
|
|
|
|
pthread_create(&threads[i],NULL,process_files,NULL);
|
|
|
|
|
for(i=0;i<max_threads;i++)
|
|
|
|
|
{
|
|
|
|
|
int *iptr;
|
|
|
|
|
void *vptr;
|
|
|
|
|
if(threads[i])
|
|
|
|
|
{
|
|
|
|
|
pthread_join(threads[i],&iptr);
|
|
|
|
|
if(iptr)
|
|
|
|
|
printf("Thread %d : %d files\n",i,(int)iptr);
|
|
|
|
|
pthread_join(threads[i],&vptr);
|
|
|
|
|
if(vptr)
|
|
|
|
|
printf("Thread %d : %d files\n",i,(int)vptr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|