Logo Search packages:      
Sourcecode: fastforward version File versions  Download package

byte_chr.c

#include "byte.h"

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

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

Generated by  Doxygen 1.6.0   Back to index