aboutsummaryrefslogtreecommitdiff
path: root/riemann.fmi.uni-sofia.bg/programs/nlogin-0.3-pre/str_diffn.c
blob: 6570821a4f526afc52c7f19def812029386cf15a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "str_defs.h"

int str_diffn(const char* a, const char* b, unsigned long limit) /*EXTRACT_INCL*/ {
  unsigned long u=0;
  char ch=0;

  for (; u<limit; u++) {
    ch = a[u] - b[u];
    if (ch) break;
    if (a[u]==0) break;
  }
  return ch;
}