Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
MAT_VARGETSTRUCTS(3)	     Library Functions Manual	    MAT_VARGETSTRUCTS(3)

NAME
     Mat_VarGetStructs -- Index a structure variable using slices of each dimen-
     sion

SYNOPSIS
     #include <matio.h>

     matvar_t *
     Mat_VarGetStructs(const matvar_t *matvar, cons int *start,
	 const int *stride, const int *edge, int copy_fields);

DESCRIPTION
     The  Mat_VarGetStructs() function selects a subarray from a structure array
     matvar. Each of the elements in the subarray contains all of the fields  of
     the  structure.  The index of each dimension starts at the start element in
     the array (0 being the first element), and reads every stride values (1 be-
     ing every element, 2 every other element, etc.). The total number	of  ele-
     ments  in	the subarray is specified as edge. The copy_fields option speci-
     fies whether the fields of the original structure are copied  for	the  new
     subarray.	If set to 0, the returned structure array's fields have the same
     pointer  as  the  original array, and the data field of the subarray struc-
     ture.  The subarray is marked with the conserve memory flag indicating that
     the fields should not be free'd.  They are free'd when the original  struc-
     ture is free'd.

RETURN VALUES
     A subarray of the original structure array, or NULL if there is an error.

SEE ALSO
     Mat_VarGetStructsLinear(3)

FreeBSD ports 15.quarterly	November 20, 2023	    MAT_VARGETSTRUCTS(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=Mat_VarGetStructs&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help