Пример #1
0
t_tag		*get_information(char **conf)
{
  t_tag		*tag_list;
  char		**new_conf;

  check_conf(conf);
  check_first_line(conf);
  check_last_line(conf);
  new_conf = epur_tab(conf);
  tag_list = check_all_lines(new_conf);
  free_tab(new_conf);
  return (tag_list);
}
Пример #2
0
int				check_map(char *map)
{
	int			start;
	int			num_len;

	if (!(num_len = len_num(map)))
		return (1);
	if (checkif_numb(map, num_len))
		return (1);
	if ((start = check_first_line(map)) == -1)
		return (1);
	if (check_map_char(map, start))
		return (1);
	if (minimun_length(map))
		return (1);
	if (check_map_cperline_lines(map, start))
		return (1);
	return (0);
}
Пример #3
0
static const char *
get_answer(struct reader_t *rsol, struct reader_t *rout)
{
	int answer = check_first_line(rsol, rout);

	if (answer == ANSW_FAIL)
		return pts_zero;

	reader_skipline(rsol);
	reader_skipline(rout);
	answer = check_second_line(rsol, rout);

	if (answer == ANSW_FAIL)
		return pts_half;

	reader_skip_blank_lines(rout);
	if (rout->c != EOF)
		return pts_half;
	return pts_full;
}
Пример #4
0
static bool handle_first_line( p_data_ctx dctx )
{
    char *space, *s = ( char * )dctx->buffer;
    if ( !check_first_line( s ) )
        return false;

    if ( *s == '>' ) s++;
    space = find_space( s );
    if ( space == NULL ) {
        space = s + strlen(s);
    } else {
        *space = 0;
    }
    if ( !dctx->quiet )
        KOutMsg( "SEQ_ID: %s\n", s );
    write_default_str( s, ewrefseq_cn_SEQ_ID, dctx->wr );
    space++;
    if ( !dctx->quiet )
        KOutMsg( "DEF_LINE: %s\n", space );
    write_default_str( space, ewrefseq_cn_DEF_LINE, dctx->wr );
    return true;
}