Doxygen Source Code Documentation
l_ge.c File Reference
#include "f2c.h"Go to the source code of this file.
Functions | |
| integer | s_cmp (char *, char *, ftnlen, ftnlen) |
| logical | l_ge (char *a, char *b, ftnlen la, ftnlen lb) |
Function Documentation
|
||||||||||||||||||||
|
Definition at line 8 of file l_ge.c.
|
|
||||||||||||||||||||
|
Definition at line 8 of file s_cmp.c.
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 }
|