Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 423565
Collapse All | Expand All

(-)a/FindErrs.c (+28 lines)
Lines 26-31 Link Here
26
 *
26
 *
27
 */
27
 */
28
28
29
#include <string.h>
30
#include <strings.h>
31
#include <ctype.h>
29
32
30
#include "ChkTeX.h"
33
#include "ChkTeX.h"
31
#include "FindErrs.h"
34
#include "FindErrs.h"
Lines 158-163 CTYPE(isalpha) Link Here
158
 *
161
 *
159
 */
162
 */
160
163
164
char *
165
strcasestr(const char *haystack, const char *needle)
166
{
167
  char c;
168
  size_t len;
169
170
  if ((c = *needle++) != 0) 
171
    {
172
      c = tolower((unsigned char) c);
173
      len = strlen(needle);
174
      
175
      do
176
        {
177
          for (; *haystack && tolower((unsigned char) *haystack) != c; haystack++)
178
            ;
179
          if (!(*haystack))
180
            return NULL;
181
          haystack++;
182
        }
183
      while (strncasecmp(haystack, needle, len) != 0);
184
      haystack--;
185
    }
186
  return (char *) haystack;
187
}
188
161
189
162
static char *GetLTXToken(char *Src, char *Dest)
190
static char *GetLTXToken(char *Src, char *Dest)
163
{
191
{

Return to bug 423565