Diff for /loncom/homework/caparesponse/caparesponse.c between versions 1.19 and 1.20

version 1.19, 2005/12/01 22:34:10 version 1.20, 2005/12/20 19:59:52
Line 134  int caparesponse_capa_check_answer(char Line 134  int caparesponse_capa_check_answer(char
 int caparesponse_get_real_response (char* unit_str, char* answer,  int caparesponse_get_real_response (char* unit_str, char* answer,
     double* scaled) {      double* scaled) {
   //double caparesponse_get_real_response (char* unit_str, char* answer) {    //double caparesponse_get_real_response (char* unit_str, char* answer) {
   int     input_len,all_alphabet,idx,outcome,result;    int     input_len,all_alphabet,idx,outcome=-1,result;
   double  n_part,scale=1.0,given,target;    double  n_part,scale=1.0,given,target;
   char    input[ANSWER_STRING_LENG],filename[FILE_NAME_LENGTH],    char    input[ANSWER_STRING_LENG],filename[FILE_NAME_LENGTH],
     tmp_unit_str[ANSWER_STRING_LENG];      tmp_unit_str[ANSWER_STRING_LENG];
Line 165  int caparesponse_get_real_response (char Line 165  int caparesponse_get_real_response (char
   if( !all_alphabet ) {    if( !all_alphabet ) {
     tmp_unit_str[0] = 0;      tmp_unit_str[0] = 0;
     outcome = split_num_unit(answer,&n_part,input,tmp_unit_str);      outcome = split_num_unit(answer,&n_part,input,tmp_unit_str);
     }
     if( outcome > 0 ) {
     if( outcome > 1 ) { /* with both num and unit parts or only unit part */      if( outcome > 1 ) { /* with both num and unit parts or only unit part */
       if( ans_unit != NULL ) {        if( ans_unit != NULL ) {
  result = check_correct_unit(tmp_unit_str,ans_unit,&scale);   result = check_correct_unit(tmp_unit_str,ans_unit,&scale);

Removed from v.1.19  
changed lines
  Added in v.1.20


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>