-verbose flag for stdout

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10873 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2007-11-16 23:35:21 +00:00
parent 89b0fbb53c
commit 3419f905a9
3 changed files with 3 additions and 10 deletions

View File

@@ -433,7 +433,7 @@ u_long F1finfo(GPPort *port,char *name)
return(flen);
}
long F1getdata(GPPort*port,char *name, u_char *data, int verbose)
long F1getdata(GPPort*port,char *name, u_char *data)
{
long filelen;
long total = 0;
@@ -456,15 +456,8 @@ long F1getdata(GPPort*port,char *name, u_char *data, int verbose)
}
p = p + len;
total = total + len;
if(verbose){
fprintf(stderr, "%6ld/", total);
fprintf(stderr, "%6ld", filelen);
fprintf(stderr, "\b\b\b\b\b\b\b\b\b\b\b\b\b");
}
}
F1fclose(port);
if(verbose)
fprintf(stderr, "\n");
return(total);
}

View File

@@ -4,7 +4,7 @@
#include "common.h"
int F1ok (GPPort*);
long F1getdata (GPPort*,char *, u_char *, int);
long F1getdata (GPPort*,char *, u_char *);
int F1status (GPPort*,int);
char F1newstatus (GPPort *port, int, char *);
int F1howmany (GPPort *);

View File

@@ -153,7 +153,7 @@ get_picture_information(GPPort *port,int *pmx_num, int outit)
strcpy(name, "/PIC_CAM/PIC00000/PIC_INF.PMF");
F1ok(port);
len = F1getdata(port, name, buf, 0);
len = F1getdata(port, name, buf);
n = buf[26] * 256 + buf[27]; /* how many files */
*pmx_num = buf[31]; /* ??? */