为什么输入{}打印出的是左右括号不同类,而其他两种括号则匹配

#include<stdio.h>
#include<stdlib.h>
#define StackSize 100
//栈的定义
struct SeqStack
{
char data[StackSize] ;
int top ;
};
//栈的初始化
void InitStack(SeqStack &S)
{
S.top = -1 ;
}
// 判断栈是否为空
int EmptyStack(SeqStack &S)
{

if(S.top==-1)
return 1;
else
return 0;

}
//进栈操作
int Push(SeqStack &S,char x)
{
if(S.top ==StackSize -1)
return 0 ;
else
{
S.top++ ;
S.data[S.top] =x ;
return 1;
}
}
//出栈操作
int pop(SeqStack &S,char x)
{
if(S.top==-1)
{
return 0;
}
else
{
x=S.data[S.top] ;
S.top-- ;
return 1 ;
}
}
//获取栈顶元素
int GetTop(SeqStack &S,char x)
{
if(S.top==-1)
return 0 ;
else
{
x= S.data[S.top];
return 1;
}

}
int Match(char ch1,char ch2)
{
if((ch1=='['&&ch2==']')||(ch1=='{'&&ch2=='}')||(ch1=='('&&ch2==')'))
return 1;
else
return 0;

}
void BracketMatch(char str[])
{
SeqStack s;
int i;
char ch ;
InitStack(s);
for(i=0;str[i]!='\0';i++)
{
switch(str[i])
{
case '(':
case '{':
case '[':
Push(s,str[i]); /遇到左括号则入栈/
break ;
case ')':
case '}':
case ']':
if(EmptyStack(s)==1)
{
printf("右边的括号多余!"); /判断栈中是否有左括号/
return;
}
else
{
GetTop(s,ch); /获取栈顶元素/
if (Match(ch,str[i])==1) /左括号与有括号进行匹配/
pop(s,ch) ; /若匹配,则栈顶元素出栈/
else
{
printf("左右括号不同类!");
return ;
}

        }
    }/*switch*/
}/*for*/ 
if (EmptyStack(s)==1)        /*若栈为空栈,则匹配成功*/ 
{
    printf("括号匹配!") ;   
    return ;
}
else                        /*若栈不为空栈,则左括号多余*/ 
{
printf("左括号多余!") ; 
return ;
}

}

int main()
{
int n ;
char str[100] ;
printf("请输入字符: ");
gets(str);
printf("匹配情况: ");
BracketMatch(str) ;
}