renaming a member of the metadata struct
This commit is contained in:
parent
8a663a95ee
commit
12c3218a93
@ -2,9 +2,10 @@
|
||||
* floatimg.h
|
||||
* ugly code from tTh
|
||||
* http://la.buvette.org/photos/cumul
|
||||
* https://git.tetalab.org/tTh/FloatImg
|
||||
*/
|
||||
|
||||
#define FIMG_VERSION (181)
|
||||
#define FIMG_VERSION (182)
|
||||
#define RELEASE_NAME ("noname")
|
||||
/*
|
||||
* in memory descriptor
|
||||
@ -35,7 +36,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
char magic[8]; // this is not an asciiz !
|
||||
struct timeval timestamp;
|
||||
uint64_t pid; // process id of the creator
|
||||
uint64_t cpid; // process id of the creator
|
||||
int32_t count;
|
||||
float fval;
|
||||
char idcam[32];
|
||||
|
@ -46,7 +46,7 @@ fprintf(stderr, "seconds sc. epoch = %ld\n", pmd->timestamp.tv_sec);
|
||||
doubletime = (double)pmd->timestamp.tv_sec + \
|
||||
(double)pmd->timestamp.tv_usec / 1e6;
|
||||
fprintf(stderr, "dtime of day = %e\n", doubletime);
|
||||
fprintf(stderr, "creator pid = %ld\n", pmd->pid);
|
||||
fprintf(stderr, "creator pid = %ld\n", pmd->cpid);
|
||||
fprintf(stderr, "counter = %d\n", pmd->count);
|
||||
fprintf(stderr, "float value = %.3f\n", pmd->fval);
|
||||
fprintf(stderr, "id camera = '%s'\n", pmd->idcam);
|
||||
@ -82,7 +82,7 @@ else {
|
||||
memcpy(&(pmd->timestamp), &tvl, sizeof(struct timeval));
|
||||
}
|
||||
|
||||
pmd->pid = getpid();
|
||||
pmd->cpid = getpid();
|
||||
pmd->count = 0;
|
||||
pmd->fval = 255.0;
|
||||
strcpy(pmd->idcam, "<unknow>");
|
||||
@ -136,7 +136,8 @@ if (1 != foo) {
|
||||
fclose(fp); /* got all needed datas */
|
||||
|
||||
if (memcmp(metadata.magic, "metadata", 8)) {
|
||||
fprintf(stderr, "'%s' invalid metadata.\n", fname);
|
||||
fprintf(stderr, "'%s' invalid metadata\n", fname);
|
||||
puts_magic_8(metadata.magic, stderr);
|
||||
return -6;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user