diff --git a/floatimg.h b/floatimg.h index 257f8c5..443a66f 100644 --- a/floatimg.h +++ b/floatimg.h @@ -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]; diff --git a/lib/metadata.c b/lib/metadata.c index 346fde1..33baca1 100644 --- a/lib/metadata.c +++ b/lib/metadata.c @@ -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, ""); @@ -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; }