--- capa/capa51/pProj/capaFunction.c 1999/09/28 21:26:20 1.1.1.1 +++ capa/capa51/pProj/capaFunction.c 1999/12/16 22:18:35 1.3 @@ -21,6 +21,7 @@ int Parse_section; char Parse_student_number[MAX_STUDENT_NUMBER+1]; char Parse_name[MAX_NAME_CHAR+1]; long capaid_plus_gen; +int managermode; extern int Parsemode_f; @@ -113,6 +114,10 @@ match_function(func, argc) char *func; i if( !strcmp(func,"is_open") ) return (((argc <2)? IS_OPEN_F: MIS_ARG_COUNT)); if( !strcmp(func,"is_due") ) return (((argc <2)? IS_DUE_F: MIS_ARG_COUNT)); if( !strcmp(func,"is_answer") ) return (((argc <2)? IS_ANSWER_F: MIS_ARG_COUNT)); + if( !strcmp(func,"correct") ) return (((argc <3)? CORRECT_F: MIS_ARG_COUNT)); + if( !strcmp(func,"grade") ) return (((argc <3)? GRADE_F: MIS_ARG_COUNT)); + if( !strcmp(func,"tries") ) return (((argc <3)? TRIES_F: MIS_ARG_COUNT)); + if( !strcmp(func,"managermode")) return (((argc==0)? MANAGERMODE_F:MIS_ARG_COUNT)); return (UNKNOWN_F); } @@ -180,8 +185,8 @@ ArgNode_t *argp; int slots, noError, errCode, mo, yy, dd, hh, mm, tmpInt; long rout; char *wday[9] = {"Sat,", "Sun,", "Mon,", "Tue,", "Wed,", "Thr,", "Fri,", "Sat,", "\0"}; - char *month[SIXTEEN] = { "UNKNOWN", "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "UNKNOWN", "UNKNOWN", "\0"}; + char *month[14] = { "UNKNOWN", "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "\0"}; resultp = (Symbol *)capa_malloc(1,sizeof(Symbol)); @@ -1499,10 +1504,26 @@ ArgNode_t *argp; resultp->s_int=capa_get_duration(Parse_student_number, Parse_section,Parse_set); } break; + case MANAGERMODE_F: { resultp->s_type = I_CONSTANT; + resultp->s_int=managermode; + }break; + case CORRECT_F: { + + }break; + + case TRIES_F: { + + }break; + + case GRADE_F: { + + }break; + case MIS_ARG_COUNT: { resultp->s_type = S_CONSTANT; resultp->s_str = strsave("<>"); - sprintf(tmpS,"%s()'s arg. count is not correct.\n",FuncStack[Func_idx].s_name); + sprintf(tmpS,"%s()'s arg. count is not correct.\n", + FuncStack[Func_idx].s_name); capa_msg(MESSAGE_ERROR,tmpS); } break; case UNKNOWN_F: