急求该函数的功能解决方案

急求该函数的功能
void   Demo2(   SeqStack   *S,   int   m)  
   {   //   设DataType   为int   型
    SeqStack   T;   int   i;
    InitStack   (&T);
    while   (!   StackEmpty(   S))
     if((   i=Pop(S))   !=m)   Push(   &T,i);
    while   (!   StackEmpty(   &T))
     {
      i=Pop(&T);   Push(S,i);
     }
   }


------解决方案--------------------
从栈S中删除 值为m的元素
------解决方案--------------------
关键: 
   while (! StackEmpty( S))
     if(( i=Pop(S)) !=m)
Push( &T,i);

至于功能楼上的已经说了.
------解决方案--------------------
正确