void debug_print_cell(struct cell_t *y, int to_target) { int i; if(y== NULL || to_target <= 0 && to_target >= NOA) { printf("print yuan parameter error\n"); return; } printf("\tidx :%d\n", y->idx); printf("\ttarget:%d\tdis :%d\n", to_target, y->dis[to_target]); printf("\temv :%d\n\tsta :", get_em(y,to_target)); for(i=0; i<41; i++) { printf("%d ", y->sta[to_target][i]); } printf("\n"); }
VOID s_break() { /* internal declarations */ i4 tok_type; /* next token type */ i4 rtn_char; /* ** dummy variable for s_g_skip() ** and real variable for ** s_g_ident(). */ char *name; /* break name */ bool err; char nrml_buf[(FE_MAXNAME + 1)]; /* start of routine */ if (St_b_given) { s_error(0x3A6, NONFATAL, NULL); s_cmd_skip(); return; } St_b_given = TRUE; save_em(); /* store aside the values of Command fields */ /* Initialize the fields in Command */ STcopy(NAM_BREAK, Ctype); STcopy(ERx(" "), Csection); STcopy(ERx(" "), Ccommand); if (Cact_ren == NULL) { s_error(0x38A, FATAL, NULL); } Csequence = Cact_ren->ren_bcount; err = FALSE; while (!err) { tok_type = s_g_skip(TRUE, &rtn_char); switch (tok_type) { case TK_ENDFILE: case TK_PERIOD: goto allexit; case TK_COMMA: break; case TK_ALPHA: case TK_QUOTE: case TK_DOLLAR: if (tok_type == TK_ALPHA) { name = s_g_ident(FALSE,&rtn_char, FALSE); if (rtn_char != UI_REG_ID) { s_error(0x39D,NONFATAL, name,NULL); s_cmd_skip(); err = TRUE; break; } IIUGdbo_dlmBEobject(name,FALSE); } else if (tok_type == TK_QUOTE) /* Delim ID */ { if (!St_xns_given) { s_error(0x39D,NONFATAL, name,NULL); s_cmd_skip(); err = TRUE; break; } name = s_g_ident(FALSE,&rtn_char, FALSE); if (rtn_char != UI_DELIM_ID) { s_error(0x39D,NONFATAL, name,NULL); s_cmd_skip(); err = TRUE; break; } _VOID_ IIUGdlm_ChkdlmBEobject(name, &nrml_buf[0], FALSE); name = &nrml_buf[0]; } else { name = s_g_name(FALSE); IIUGdbo_dlmBEobject(name,FALSE); } if (s_sbr_find(name) != NULL) { /* already specified */ s_error(0x39E, NONFATAL, name, NULL); s_cmd_skip(); err = TRUE; break; } /* name not specified. Add it */ s_sbr_add(name); STcopy(name,Cattid); _VOID_ s_w_row(); break; default: s_error(0x39D, NONFATAL, NULL); s_cmd_skip(); err = TRUE; break; } } allexit: get_em(); }
VOID s_out_set() { /* internal declarations */ char *name = NULL; /* hold name of table */ i4 rtn_char; /* dummy variable for sgskip */ /* start of routine */ if (Cact_ren == NULL) { s_error(906, FATAL, NULL); } if (St_o_given) { /* already specified */ s_error(922, NONFATAL, Cact_ren->ren_report, NULL); } save_em(); /* temp store of fields */ /* Set up fields in Command */ STcopy(NAM_OUTPUT,Ctype); Csequence = 0; STcopy(ERx(" "), Csection); STcopy(ERx(" "), Cattid); STcopy(ERx(" "), Ccommand); switch(s_g_skip(TRUE, &rtn_char)) { case(TK_ALPHA): case(TK_NUMBER): case(TK_DOLLAR): /* should be ok */ name = s_g_token(FALSE); break; case(TK_QUOTE): /* Keep the quotes #33314 */ name = s_g_string(FALSE, (i4) TK_QUOTE ); break; case(TK_SQUOTE): /* Keep the quotes #33314 */ name = s_g_string(FALSE, (i4) TK_SQUOTE ); break; default: s_error(912, NONFATAL, NULL); break; } if (name != NULL) { STcopy(name,Ctext); _VOID_ s_w_row(); } get_em(); St_o_given = TRUE; return; }