

#include<stdio.h>
#include<netinet/in.h>
#include<string.h>
#include<stdlib.h>
#include<pthread.h>

#include"sitar.h"
#include"sitar_scan.h"
#include<almemsys/almemsys.h>
#include"jpreturn.h"




// int cal4(int, int, char);




/* ------ CAL4 ------- */
int cal4(int inA, int inB, char chA)
{
int ret = 0;

if(chA == '+'){
   ret = inA + inB;
   return ret;
   }
else if(chA == '-'){
   ret = inA - inB;
   return ret;
   }
else if(chA == '*'){
   ret = inA * inB;
   return ret;
   }
else if(chA == '/'){
   if(inA != 0 && inB != 0){ 
      ret = (int)(inA / inB);
      }
   else{
      ret = 0;
       }
   return ret;
   }
else{
   fprintf(stderr,"cal4(): (%d) %s\n", ret, SNMP_24);
   return ret;
   }

return 0;
}


