Esempio n. 1
0
File: gt.c Progetto: arq5x/gqt
int gt_ubin(char *in,
            unsigned int query_value,
            unsigned int *R,
            unsigned int num_records,
            int time,
            int quiet,
            char *bim)

{
    start();
    struct ubin_file uf = init_ubin_file(in);
    unsigned int *uf_R;
    unsigned int len_uf_R = gt_records_ubin(uf,
                                           R,
                                           num_records,
                                           query_value,
                                           &uf_R);
    stop();
    if (time != 0)
        fprintf(stderr,"%lu\n", report());

    if (quiet == 0)
        print_result(len_uf_R, uf_R, uf.num_fields, bim);

    free(uf_R);
    fclose(uf.file);

    return 0;
}
Esempio n. 2
0
File: count.c Progetto: CoREse/gqt
int count_ubin(char *in,
               uint32_t query_value,
               char *op,
               uint32_t *R,
               uint32_t num_records,
               int time,
               int quiet,
               char *bim)

{
    start();
#if 0
    struct ubin_file uf = init_ubin_file(in);
    uint32_t *uf_R;
    uint32_t len_uf_R;

    if (strcmp(op,"gt") == 0)
        len_uf_R = gt_count_records_ubin(uf,
                                         R,
                                         num_records,
                                         query_value,
                                         &uf_R);
    else 
        return count_help();

    stop();

    if (time != 0 )
        fprintf(stderr,"%lu\n", report());

    if (quiet == 0)
        print_count_result(uf_R, uf.num_fields);

    free(uf_R);
    fclose(uf.file);
#endif
    return 0;
}