Skip to content
Snippets Groups Projects
Select Git revision
  • 31ea2eee987c5b5d65a0346e6f7a4ed124cce617
  • master default protected
  • fix_Makefile.mingw#2
  • update_Makefile.mingw
  • fix_Makefile.mingw
  • fix_API_for_C_apps
  • fix_procinfo_mac
  • boinccmd_gpu_mode_always_until_sigterm
  • fgrp_osx_hotfix
  • fix_boinc_master@f8250782
  • eah_wrapper_improvements
  • diagnostics_win-hotfix
  • diagnostics_win-hotfix-old
  • current_fgrp_apps
  • testing_gw_apps
  • gw_app_darwin_15
  • current_brp_apps
  • current_brp_apps_android10
  • current_gfx_apps
  • current_server
  • current_gw_apps
  • previous_fgrp_apps
  • previous_gw_apps
  • testing_brp_apps
  • apps_FGRP3_1.07
  • apps_FGRP3_1.08
26 results

boinc_api.h

Blame
  • FT_comment_lines_in_block.m 1.14 KiB
    %---------------------------------------------------------------------  
    % function [block] = FT_comment_lines_in_block(block,line_numbers)
    % 
    % Add comment char in front of lines given by line number.
    %
    % block: block structure
    % line_numbers: vector of integers, specifying lines to be commented
    %
    % Part of the SimTools package
    % Andreas Freise 22.05.08 afreise@googlemail.com
    %---------------------------------------------------------------------  
    
    function [block] = FT_comment_lines_in_block(block,line_numbers)
    
      baseid='FT_comment_lines_in_block';
        
      if (~isstruct(block))
        msgid=[baseid,':checkinarg'];
        result='first input argument must be a block structure';
        error(msgid,result);
      end
      
      if (~isnumeric(line_numbers))
        msgid=[baseid,':checkinarg'];
        result='second input argument must be numeric';
        error(msgid,result);
      end
      
      if (line_numbers>block.n_lines)
        msgid=[baseid,':checkinarg'];
        result='line numbers given larger than block length';
        error(msgid,result);    
      end
    
      for i=line_numbers
        block.txt_lines(i)={FT_add_comment_char_to_line(cell2mat(block.txt_lines(i)))};
      end
      block.edited = 1;