mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-09 08:11:38 +08:00
11547ffd29
2. Rename the NC4_inq_any_type to NC_inq_any_type
41 lines
768 B
C
41 lines
768 B
C
#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;
|
|
}
|