Skip to content
Snippets Groups Projects
Select Git revision
  • 577e4ac47dab1e02f411ab6c81fbb6834a88c108
  • 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_fortran.C

Blame
  • FT_copy_lines_block_to_block.m 1.61 KiB
    %---------------------------------------------------------------------  
    % function [block] = FT_copy_lines_block_to_block(inblock,block,lines)
    % 
    % Copy a set of lines from one block to another
    %
    % inblock: block structure from which the lines are copied
    % lines: vector of integers, giving the line numbers
    %
    % block: block structure to which the lines should be added
    %
    % Part of the SimTools package
    % Andreas Freise 16.06.08 afreise@googlemail.com
    %---------------------------------------------------------------------  
    
    function [block] = FT_copy_lines_block_to_block(inblock,block,lines)
    
      baseid='FT_copy_lines_block_to_block';
        
      if (~isstruct(inblock))
        msgid=[baseid,':checkinarg'];
        result='first input argument must be a block structure';
        error(msgid,result);
      end
    
      if (~isstruct(block))
        msgid=[baseid,':checkinarg'];
        result='second input argument must be a block structure';
        error(msgid,result);
      end
     
      if (~isnumeric(lines))
        msgid=[baseid,':checkinarg'];
        result='third input argument must be numeric';
        error(msgid,result);
      end
    
      if (lines>inblock.n_lines)
        msgid=[baseid,':checkinarg'];
        result='line numbers given larger than block length';
        error(msgid,result);    
      end 
    
      bl=length(inblock);
      if (bl>1)
        msgid=[baseid,':checksize'];
        error(msgid,'first argument must be single FTblock');
      end
    
      bl=length(block);
      if (bl>1)
        msgid=[baseid,':checksize'];
        error(msgid,'second argument must be single FTblock');
      end
      
      for i=lines
        block=FT_add_line_to_block(block,inblock.txt_lines(i));
        block.n_lines=block.n_lines+1;
        block.edited=1;
      end