CalculiX  2.8
A Free Software Three-Dimensional Structural Finite Element Program
 All Classes Files Functions Variables Macros
strcmp2.c File Reference
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "CalculiX.h"
Include dependency graph for strcmp2.c:

Go to the source code of this file.

Functions

ITG strcmp2 (const char *s1, const char *s2, ITG length)
 

Function Documentation

ITG strcmp2 ( const char *  s1,
const char *  s2,
ITG  length 
)

Definition at line 24 of file strcmp2.c.

25 {
26 
27 /* comparison of the first "length" characters unless s1
28  and/or s2 has less characters */
29 
30  ITG a,b,i;
31 
32  i=0;
33  do {
34  a=*s1++;
35  b=*s2++;
36 
37  if(b=='\0'){
38  a='\0';
39  b='\0';
40  break;
41  }
42  if(a=='\0'){
43  a='\0';
44  b='\0';
45  break;
46  }
47  i++;
48  }while((a==b)&&(i<length));
49  return(a-b);
50 }
#define ITG
Definition: CalculiX.h:51
Hosted by OpenAircraft.com, (Michigan UAV, LLC)