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

Go to the source code of this file.

Functions

ITG strcmp1 (const char *s1, const char *s2)
 

Function Documentation

ITG strcmp1 ( const char *  s1,
const char *  s2 
)

Definition at line 24 of file strcmp1.c.

25 {
26  ITG a,b;
27 
28  do {
29  a=*s1++;
30  b=*s2++;
31 
32 /* the statement if((a=='\0')||(b=='\0')) has been treated separately
33  in order to avoid the first field (s1) to be defined one longer
34  than required; s1 is assumed to be a variable field, s2 is
35  assumed to be a fixed string */
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  }while(a==b);
48  return(a-b);
49 }
#define ITG
Definition: CalculiX.h:51
Hosted by OpenAircraft.com, (Michigan UAV, LLC)