/* Add the text of the given line to the list of games_to_keep. */ void add_textual_variation_from_line(char *line) { if(non_blank_line(line)){ variation_list *next_variation = compose_variation(line); if(next_variation != NULL){ next_variation->next = games_to_keep; games_to_keep = next_variation; } } }
Boolean process_ending_line(const char *line) { Boolean Ok = TRUE; if(non_blank_line(line)){ Ending_details *details = new_ending_details(); if(decompose_line(line,details)){ /* Add it on to the list. */ details->next = endings_to_match; endings_to_match = details; } else{ Ok = FALSE; } } return Ok; }
void add_positional_variation_from_line(char *line) { if(non_blank_line(line)){ Move *next_variation = compose_positional_variation(line); if(next_variation != NULL){ /* We need a NULL fen string, because this is from * the initial position. */ store_hash_value(next_variation,(const char *)NULL); free_move_list(next_variation); /* We need to know globally that positional variations * are of interest. */ GlobalState.positional_variations = TRUE; } } }
/* * Insert n blanks at the cursor's position, no wraparound */ void InsertChar (register TScreen *screen, register int n) { if(screen->cursor_state) HideCursor(); screen->do_wrap = 0; if(screen->cur_row - screen->topline <= screen->max_row) { if(!AddToRefresh(screen)) { int col = screen->max_col + 1 - n; if(screen->scroll_amt) FlushScroll(screen); #if OPT_DEC_CHRSET if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, screen->cur_row)[0])) { col = (screen->max_col + 1) / 2 - n; } #endif /* * prevent InsertChar from shifting the end of a line over * if it is being appended to */ if (non_blank_line (screen->visbuf, screen->cur_row, screen->cur_col, screen->max_col + 1)) horizontal_copy_area(screen, screen->cur_col, col - screen->cur_col, n); ClearCurBackground( screen, CursorY (screen, screen->cur_row), CurCursorX (screen, screen->cur_row, screen->cur_col), FontHeight(screen), n * CurFontWidth(screen,screen->cur_row)); } } /* adjust screen->buf */ ScrnInsertChar(screen, n, screen->max_col + 1); }