You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
768 B
40 lines
768 B
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
|
|
#include <hdf5.h>
|
|
#include <netcdf.h>
|
|
|
|
#define LEN 3
|
|
|
|
int
|
|
main(int argc, char** argv)
|
|
{
|
|
char v5[256];
|
|
char vn[256];
|
|
char* major, *minor, *patch;
|
|
char* p;
|
|
int i;
|
|
|
|
strcpy(v5,H5_VERSION);
|
|
major = v5; minor = NULL; patch = NULL;
|
|
if((p = strchr(major,'.'))) {*p++ = '\0'; minor = p;}
|
|
if((p = strchr(minor,'.'))) {*p++ = '\0'; patch = p;}
|
|
vn[0]='\0';
|
|
|
|
i = LEN - strlen(major);
|
|
while(i-- > 0) strcat(vn,"0");
|
|
strcat(vn,major);
|
|
|
|
i = LEN - strlen(minor);
|
|
while(i-- > 0) strcat(vn,"0");
|
|
strcat(vn,minor);
|
|
|
|
i = LEN - strlen(patch);
|
|
while(i-- > 0) strcat(vn,"0");
|
|
strcat(vn,patch);
|
|
|
|
printf("%s",vn);
|
|
return 0;
|
|
}
|
|
|