home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / hdf / unix / examples.lha / examples / ann / getSDSlblst.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-08  |  1007 b   |  40 lines

  1. #ifdef RCSID
  2. static char RcsId[] = "@(#)$Revision: 1.2 $";
  3. #endif
  4. /*
  5. $Header: /pita/work/HDF/dev/RCS/test/annotations/getSDSlablist.c,v 1.2 90/06/26 16:38:48 mfolk beta $
  6.  
  7. $Log:    getSDSlablist.c,v $
  8.  * Revision 1.2  90/06/26  16:38:48  mfolk
  9.  * Revised to be more like the Fortran version.
  10.  * Mike Folk
  11.  * 
  12.  * Revision 1.1  90/04/19  11:15:23  mfolk
  13.  * Initial revision
  14.  * 
  15. */
  16. #include <stdio.h>
  17. #include "df.h"
  18.  
  19. #define LISTSIZE 20
  20. #define MAXLEN   15
  21.  
  22. main(argc, argv)
  23. int argc;
  24. char *argv[];
  25. {
  26.     int i, nlabels, startpos=1;
  27.     uint16 reflist[LISTSIZE];
  28.     char labellist[MAXLEN*LISTSIZE+1]; 
  29.     
  30.     printf("Labels of scientific data sets in file %s\n", argv[1]);
  31.     nlabels = DFANlablist(argv[1],DFTAG_SDG, reflist, 
  32.                                   labellist, LISTSIZE, MAXLEN, startpos);
  33.     for (i=0; i<nlabels; i++) 
  34.         printf("\n\t%d\tRef number: %d\tLabel: %s",
  35.                                            i, reflist[i],labellist+(i*15));
  36.     printf("\n+++++++++++++++++++++++++\n\n");
  37. }
  38.  
  39.  
  40.