root/src/compare.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. compare

   1 
   2 #include <unistd.h>
   3 #include <stdio.h>
   4 #include <math.h>
   5 #include <stdlib.h>
   6 #include <pthread.h>
   7 #include "CalculiX.h"
   8 
   9 /*---------------------------------------------------------------------*/
  10 /* Strings vergleichen (bis zu welchem character sind sie gleich?)     */
  11 /*---------------------------------------------------------------------*/
  12 
  13 ITG compare (char *str1, char *str2, ITG length)
  14 {
  15     ITG     i;
  16 
  17     i = 0;
  18     while ((str1[i]==str2[i]) && (i<length))
  19         i++;
  20 
  21     return i;               /* Return how far we got before a difference occurred, or the variable      */
  22                             /* length, whichever is the smaller                                         */
  23 }
  24 

/* [<][>][^][v][top][bottom][index][help] */