source: TI12-security/trunk/NDGSecurity/C/openDapPatch/ncopen.c @ 6876

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDGSecurity/C/openDapPatch/ncopen.c@6876
Revision 6876, 322 bytes checked in by pjkersha, 9 years ago (diff)

Added

  • shell scripts to set the environment variables and run the executable
  • Makefile
  • main program ncopen.c to test the code
  • more info in README
  • a new patch for the netCDF 4.1.1.
Line 
1#include <stdio.h>
2#include <netcdf.h>
3 
4int main(int argc, char **argv) {
5    int ncidp, ans;
6    printf("%s\n",nc_inq_libvers());
7    printf("Go %s\n",argv[1]);
8    ans=nc_open(argv[1],NC_NOWRITE,&ncidp);
9    printf("got %d %d\n",ans,ncidp);
10    if (ans != NC_NOERR) {
11        printf("%s\n", nc_strerror(ans));
12    }
13}
14
Note: See TracBrowser for help on using the repository browser.