You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: read_brainvision_vhdr.m
    path of file: ./repos/fieldtrip/fileio/private
    
    the code of the file until where you have to start completion: function [vhdr] = read_brainvision_vhdr(filename)

% READ_BRAINVISION_VHDR reads the known items from the BrainVision EEG
% header file and returns them in a structure.
%
% Use as
%   vhdr = read_brainvision_vhdr(filename)
%
% See also READ_BRAINVISION_EEG, READ_BRAINVISION_VMRK

% Copyright (C) 2003-2019, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
%    FieldTrip is free software: you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation, either version 3 of the License, or
%    (at your option) any later version.
%
%    FieldTrip is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.

    
function [vhdr] = read_brainvision_vhdr(filename)

% READ_BRAINVISION_VHDR reads the known items from the BrainVision EEG
% header file and returns them in a structure.
%
% Use as
%   vhdr = read_brainvision_vhdr(filename)
%
% See also READ_BRAINVISION_EEG, READ_BRAINVISION_VMRK

% Copyright (C) 2003-2019, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
%    FieldTrip is free software: you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation, either version 3 of the License, or
%    (at your option) any later version.
%
%    FieldTrip is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.
%
%    You should have received a copy of the GNU General Public License
%    along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

vhdr.DataFile         = read_ini(filename, 'DataFile=', '%s');
vhdr.MarkerFile       = read_ini(filename, 'MarkerFile=', '%s');
vhdr.DataFormat       = read_ini(filename, 'DataFormat=', '%s');
vhdr.DataOrientation  = read_ini(filename, 'DataOrientation=', '%s');
vhdr.BinaryFormat     = read_ini(filename, 'BinaryFormat=', '%s');
vhdr.NumberOfChannels = read_ini(filename, 'NumberOfChannels=', '%d');
vhdr.SamplingInterval = read_ini(filename, 'SamplingInterval=', '%f'); % microseconds

if ~isempty(vhdr.NumberOfChannels)
  % only show the warning once
  ft_warning once FieldTrip:fileio:UnknownResolution
  
  for i=1:vhdr.NumberOfChannels
    chan_str  = sprintf('Ch%d=', i);
    chan_info = read_ini(filename, chan_str, '%s');
    t = tokenize(chan_info, ',');
    vhdr.label{i} = t{1};
    vhdr.reference{i} = t{2};
    resolution = str2num(t{3}); % in microvolt
    if ~isempty(resolution)
      vhdr.resolution(i) = resolution;
    else
      ft_warning('FieldTrip:fileio:UnknownResolution', 'unknown resolution (i.e. recording units) for channel %d in "%s"', i, filename);
      vhdr.resolution(i) = 1;
    end