Diff for /capa/capa51/pProj/capaCommon.c between versions 1.3 and 1.5

version 1.3, 1999/12/01 18:22:00 version 1.5, 2000/01/31 18:34:13
Line 3079  capa_check_answer(p, answer) Problem_t * Line 3079  capa_check_answer(p, answer) Problem_t *
                 }                  }
                 given = n_part * scale; /* convert the given answer into proper scale for units */                  given = n_part * scale; /* convert the given answer into proper scale for units */
                 sig = calc_sig( input );                  sig = calc_sig( input );
                 if( (sig < sig_l) || (sig > sig_u) ) {                  if( ((sig < sig_l) || (sig > sig_u)) && (sig!=0)) {
                   result = SIG_FAIL;                    result = SIG_FAIL;
                 } else {                  } else {
                   switch( tol_type ) {                    switch( tol_type ) {
Line 3151  capa_check_answer(p, answer) Problem_t * Line 3151  capa_check_answer(p, answer) Problem_t *
           result = check_formula_ans(correct,answer,p->id_list,p->pts_list,tol_type,tol);            result = check_formula_ans(correct,answer,p->id_list,p->pts_list,tol_type,tol);
           break;            break;
     case ANSWER_IS_EXTERNAL: /* not yet implemented */      case ANSWER_IS_EXTERNAL: /* not yet implemented */
            /* we assume the external program is called through popen() */
            /* and the result will be given back as 0 or 1 to indicate the */
            /* given answer is correct or not */
            
           break;            break;
           
   }    }
Line 3467  char *key_word;char *value; Line 3471  char *key_word;char *value;
   fclose(fp);    fclose(fp);
   
   if (done) {    if (done) {
       trim_response_ws(right); /*get rid of leading and trailing spaces*/
     for(i=0,j=0;i<(strlen(right)+1);i++) {      for(i=0,j=0;i<(strlen(right)+1);i++) {
       value[j]='\0';        value[j]='\0';
       if (right[i] == '\\' && (i < (strlen(right))) ) {        if (right[i] == '\\' && (i < (strlen(right))) ) {

Removed from v.1.3  
changed lines
  Added in v.1.5


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