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  

s_cmp.c File Reference

#include "f2c.h"

Go to the source code of this file.


Functions

integer s_cmp (char *a0, char *b0, ftnlen la, ftnlen lb)

Function Documentation

integer s_cmp char *    a0,
char *    b0,
ftnlen    la,
ftnlen    lb
 

Definition at line 8 of file s_cmp.c.

References a.

Referenced by ef1cmc_(), get_token__(), hassym_(), hl_ge(), hl_gt(), hl_le(), hl_lt(), l_ge(), l_gt(), l_le(), l_lt(), MAIN__(), pareval_(), parevec_(), and zzconv_().

00010 {
00011 register unsigned char *a, *aend, *b, *bend;
00012 a = (unsigned char *)a0;
00013 b = (unsigned char *)b0;
00014 aend = a + la;
00015 bend = b + lb;
00016 
00017 if(la <= lb)
00018         {
00019         while(a < aend)
00020                 if(*a != *b)
00021                         return( *a - *b );
00022                 else
00023                         { ++a; ++b; }
00024 
00025         while(b < bend)
00026                 if(*b != ' ')
00027                         return( ' ' - *b );
00028                 else    ++b;
00029         }
00030 
00031 else
00032         {
00033         while(b < bend)
00034                 if(*a == *b)
00035                         { ++a; ++b; }
00036                 else
00037                         return( *a - *b );
00038         while(a < aend)
00039                 if(*a != ' ')
00040                         return(*a - ' ');
00041                 else    ++a;
00042         }
00043 return(0);
00044 }
 

Powered by Plone

This site conforms to the following standards: