next up previous
Next: scanf_description() Up: Brain Volume I/O Handling Previous: set_description()

get_description()  

Fetch a header description entry matching key



Synopsis


description*
get_description( header *h, char *lhs)


Description
Search through all items for the item with key identical to lhs.

Returns a pointer to the matching description entry. Return NULL if no string is found.

Usage

  description *d;
  header *hdr;
  hdr = new_header();
  read_header("myvolume.vol", hdr);
  d = get_description(hdr, "scandate");
  if (d)
    print(STD, "File header says scan date is #s\n", d.rhs);
  else
    print(STD, "No information about scan date found in header.");
  free_header(hdr);

Revision


1.0  29/10-96   Ulrik Kjems


Program listing






Ulrik Kjems
6/3/1998