Deleted Added
full compact
glob.c (17531) glob.c (17552)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Guido van Rossum.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 56 unchanged lines hidden (view full) ---

65
66#include <sys/param.h>
67#include <sys/stat.h>
68
69#include <ctype.h>
70#include <dirent.h>
71#include <errno.h>
72#include <glob.h>
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Guido van Rossum.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 56 unchanged lines hidden (view full) ---

65
66#include <sys/param.h>
67#include <sys/stat.h>
68
69#include <ctype.h>
70#include <dirent.h>
71#include <errno.h>
72#include <glob.h>
73#include <locale.h>
73#include <pwd.h>
74#include <stdio.h>
75#include <stdlib.h>
76#include <string.h>
77#include <unistd.h>
74#include <pwd.h>
75#include <stdio.h>
76#include <stdlib.h>
77#include <string.h>
78#include <unistd.h>
78#include "collate.h"
79
80#define DOLLAR '$'
81#define DOT '.'
82#define EOS '\0'
83#define LBRACKET '['
84#define NOT '!'
85#define QUESTION '?'
86#define QUOTE '\\'

--- 611 unchanged lines hidden (view full) ---

698 case M_SET:
699 ok = 0;
700 if ((k = *name++) == EOS)
701 return(0);
702 if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS)
703 ++pat;
704 while (((c = *pat++) & M_MASK) != M_END)
705 if ((*pat & M_MASK) == M_RNG) {
79
80#define DOLLAR '$'
81#define DOT '.'
82#define EOS '\0'
83#define LBRACKET '['
84#define NOT '!'
85#define QUESTION '?'
86#define QUOTE '\\'

--- 611 unchanged lines hidden (view full) ---

698 case M_SET:
699 ok = 0;
700 if ((k = *name++) == EOS)
701 return(0);
702 if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS)
703 ++pat;
704 while (((c = *pat++) & M_MASK) != M_END)
705 if ((*pat & M_MASK) == M_RNG) {
706 if ( __collcmp(CHAR(c), CHAR(k)) <= 0
707 && __collcmp(CHAR(k), CHAR(pat[1])) <= 0
706 if ( collate_range_cmp(CHAR(c), CHAR(k)) <= 0
707 && collate_range_cmp(CHAR(k), CHAR(pat[1])) <= 0
708 )
709 ok = 1;
710 pat += 2;
711 } else if (c == k)
712 ok = 1;
713 if (ok == negate_range)
714 return(0);
715 break;

--- 133 unchanged lines hidden ---
708 )
709 ok = 1;
710 pat += 2;
711 } else if (c == k)
712 ok = 1;
713 if (ok == negate_range)
714 return(0);
715 break;

--- 133 unchanged lines hidden ---