summaryrefslogtreecommitdiff
path: root/ucspi-tcp-0.88/str_chr.c
blob: 886d6b6e9d97881b523ba082b92b47ec78a9aae1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "str.h"

unsigned int str_chr(register char *s,int c)
{
  register char ch;
  register char *t;

  ch = c;
  t = s;
  for (;;) {
    if (!*t) break; if (*t == ch) break; ++t;
    if (!*t) break; if (*t == ch) break; ++t;
    if (!*t) break; if (*t == ch) break; ++t;
    if (!*t) break; if (*t == ch) break; ++t;
  }
  return t - s;
}