Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

thd_linecount.c File Reference

#include "mrilib.h"
#include "thd.h"

Go to the source code of this file.


Functions

int THD_linecount (char *str)

Function Documentation

int THD_linecount char *    str
 

Definition at line 12 of file thd_linecount.c.

Referenced by PLUG_action_CB().

00013 {
00014    int nlin ;
00015    char * cpt ;
00016 
00017    if( str == NULL || str[0] == '\0' ) return 0 ;
00018 
00019    nlin = 0 ;
00020    for( cpt=str ; *cpt != '\0' ; cpt++ )
00021       if( *cpt == '\n' ) nlin++ ;
00022 
00023    if( *(cpt-1) != '\n' ) nlin++ ;
00024 
00025    return nlin ;
00026 }
 

Powered by Plone

This site conforms to the following standards: