<commit_before>! Copyright (C) 2009 <NAME>
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries alien.syntax
combinators kernel tokyo.alien.tchdb tokyo.alien.tcutil ;
IN: tokyo.alien.tctdb

LIBRARY: tokyocabinet

TYPEDEF: void* TDBIDX*
TYPEDEF: void* TCTDB*

CONSTANT: TDBFOPEN  HDBFOPEN
CONSTANT: TDBFFATAL HDBFFATAL

CONSTANT: TDBTLARGE   1
CONSTANT: TDBTDEFLATE 2
CONSTANT: TDBTBZIP    4
CONSTANT: TDBTTCBS    8
CONSTANT: TDBTEXCODEC 16

CONSTANT: TDBOREADER 1
CONSTANT: TDBOWRITER 2
CONSTANT: TDBOCREAT  4
CONSTANT: TDBOTRUNC  8
CONSTANT: TDBONOLCK  16
CONSTANT: TDBOLCKNB  32
CONSTANT: TDBOTSYNC  64

C-ENUM:
  TDBITLEXICAL
  TDBITDECIMAL ;

CONSTANT: TDBITOPT  9998
CONSTANT: TDBITVOID 9999
CONSTANT: TDBITKEEP 16777216

TYPEDEF: void* TDBCOND*
TYPEDEF: void* TDBQRY*

C-ENUM:
    TDBQCSTREQ
    TDBQCSTRINC
    TDBQCSTRBW
    TDBQCSTREW
    TDBQCSTRAND
    TDBQCSTROR
    TDBQCSTROREQ
    TDBQCSTRRX
    TDBQCNUMEQ
    TDBQCNUMGT
    TDBQCNUMGE
    TDBQCNUMLT
    TDBQCNUMLE
    TDBQCNUMBT
    TDBQCNUMOREQ ;

CONSTANT: TDBQCNEGATE 16777216
CONSTANT: TDBQCNOIDX  33554432

C-ENUM:
    TDBQOSTRASC
    TDBQOSTRDESC
    TDBQONUMASC
    TDBQONUMDESC ;

CONSTANT: TDBQPPUT  1
CONSTANT: TDBQPOUT  2
CONSTANT: TDBQPSTOP 16777216

! int (*)(const void *pkbuf, int pksiz, TCMAP *cols, void *op);
TYPEDEF: void* TDBQRYPROC

FUNCTION: char* tctdberrmsg ( int ecode ) ;
FUNCTION: TCTDB* tctdbnew ( ) ;
FUNCTION: void tctdbdel ( TCTDB* tdb ) ;
FUNCTION: int tctdbecode ( TCTDB* tdb ) ;
FUNCTION: bool tctdbsetmutex ( TCTDB* tdb ) ;
FUNCTION: bool tctdbtune ( TCTDB* tdb, longlong bnum, char apow, char fpow, uchar opts ) ;
FUNCTION: bool tctdbsetcache ( TCTDB* tdb, int32_t rcnum, int32_t lcnum, int32_t ncnum ) ;
FUNCTION: bool tctdbsetxmsiz ( TCTDB* tdb, longlong xmsiz ) ;
FUNCTION: bool tctdbopen ( TCTDB* tdb, char* path, int omode ) ;
FUNCTION: bool tctdbclose ( TCTDB* tdb ) ;
FUNCTION: bool tctdbput ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ;
FUNCTION: bool tctdbput2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ;
FUNCTION: bool tctdbput3 ( TCTDB* tdb, char* pkstr, char* cstr ) ;
FUNCTION: bool tctdbputkeep ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ;
FUNCTION: bool tctdbputkeep2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ;
FUNCTION: bool tctdbputkeep3 ( TCTDB* tdb, char* pkstr, char* cstr ) ;
FUNCTION: bool tctdbputcat ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ;
FUNCTION: bool tctdbputcat2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ;
FUNCTION: bool tctdbputcat3 ( TCTDB* tdb, char* pkstr, char* cstr ) ;
FUNCTION: bool tctdbout ( TCTDB* tdb, void* pkbuf, int pksiz ) ;
FUNCTION: bool tctdbout2 ( TCTDB* tdb, char* pkstr ) ;
FUNCTION: TCMAP* tctdbget ( TCTDB* tdb, void* pkbuf, int pksiz ) ;
FUNCTION: char* tctdbget2 ( TCTDB* tdb, void* pkbuf, int pksiz, int* sp ) ;<commit_msg>tokyo.alien.tctdb: int32_t is not defined on Windows, but int is the sae thing so use that instead<commit_after>! Copyright (C) 2009 <NAME>
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries alien.syntax
combinators kernel tokyo.alien.tchdb tokyo.alien.tcutil ;
IN: tokyo.alien.tctdb

LIBRARY: tokyocabinet

TYPEDEF: void* TDBIDX*
TYPEDEF: void* TCTDB*

CONSTANT: TDBFOPEN  HDBFOPEN
CONSTANT: TDBFFATAL HDBFFATAL

CONSTANT: TDBTLARGE   1
CONSTANT: TDBTDEFLATE 2
CONSTANT: TDBTBZIP    4
CONSTANT: TDBTTCBS    8
CONSTANT: TDBTEXCODEC 16

CONSTANT: TDBOREADER 1
CONSTANT: TDBOWRITER 2
CONSTANT: TDBOCREAT  4
CONSTANT: TDBOTRUNC  8
CONSTANT: TDBONOLCK  16
CONSTANT: TDBOLCKNB  32
CONSTANT: TDBOTSYNC  64

C-ENUM:
  TDBITLEXICAL
  TDBITDECIMAL ;

CONSTANT: TDBITOPT  9998
CONSTANT: TDBITVOID 9999
CONSTANT: TDBITKEEP 16777216

TYPEDEF: void* TDBCOND*
TYPEDEF: void* TDBQRY*

C-ENUM:
    TDBQCSTREQ
    TDBQCSTRINC
    TDBQCSTRBW
    TDBQCSTREW
    TDBQCSTRAND
    TDBQCSTROR
    TDBQCSTROREQ
    TDBQCSTRRX
    TDBQCNUMEQ
    TDBQCNUMGT
    TDBQCNUMGE
    TDBQCNUMLT
    TDBQCNUMLE
    TDBQCNUMBT
    TDBQCNUMOREQ ;

CONSTANT: TDBQCNEGATE 16777216
CONSTANT: TDBQCNOIDX  33554432

C-ENUM:
    TDBQOSTRASC
    TDBQOSTRDESC
    TDBQONUMASC
    TDBQONUMDESC ;

CONSTANT: TDBQPPUT  1
CONSTANT: TDBQPOUT  2
CONSTANT: TDBQPSTOP 16777216

! int (*)(const void *pkbuf, int pksiz, TCMAP *cols, void *op);
TYPEDEF: void* TDBQRYPROC

FUNCTION: char* tctdberrmsg ( int ecode ) ;
FUNCTION: TCTDB* tctdbnew ( ) ;
FUNCTION: void tctdbdel ( TCTDB* tdb ) ;
FUNCTION: int tctdbecode ( TCTDB* tdb ) ;
FUNCTION: bool tctdbsetmutex ( TCTDB* tdb ) ;
FUNCTION: bool tctdbtune ( TCTDB* tdb, longlong bnum, char apow, char fpow, uchar opts ) ;
FUNCTION: bool tctdbsetcache ( TCTDB* tdb, int rcnum, int lcnum, int ncnum ) ;
FUNCTION: bool tctdbsetxmsiz ( TCTDB* tdb, longlong xmsiz ) ;
FUNCTION: bool tctdbopen ( TCTDB* tdb, char* path, int omode ) ;
FUNCTION: bool tctdbclose ( TCTDB* tdb ) ;
FUNCTION: bool tctdbput ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ;
FUNCTION: bool tctdbput2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ;
FUNCTION: bool tctdbput3 ( TCTDB* tdb, char* pkstr, char* cstr ) ;
FUNCTION: bool tctdbputkeep ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ;
FUNCTION: bool tctdbputkeep2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ;
FUNCTION: bool tctdbputkeep3 ( TCTDB* tdb, char* pkstr, char* cstr ) ;
FUNCTION: bool tctdbputcat ( TCTDB* tdb, void* pkbuf, int pksiz, TCMAP* cols ) ;
FUNCTION: bool tctdbputcat2 ( TCTDB* tdb, void* pkbuf, int pksiz, void* cbuf, int csiz ) ;
FUNCTION: bool tctdbputcat3 ( TCTDB* tdb, char* pkstr, char* cstr ) ;
FUNCTION: bool tctdbout ( TCTDB* tdb, void* pkbuf, int pksiz ) ;
FUNCTION: bool tctdbout2 ( TCTDB* tdb, char* pkstr ) ;
FUNCTION: TCMAP* tctdbget ( TCTDB* tdb, void* pkbuf, int pksiz ) ;
FUNCTION: char* tctdbget2 ( TCTDB* tdb, void* pkbuf, int pksiz, int* sp ) ;
{'fraction_non_alphanumeric': 0.09335362760020294, 'fraction_numerical': 0.025029595805851512, 'mean_word_length': 4.323132313231323, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5546783', 'n_tokens_mistral': 2710, 'n_tokens_neox': 2609, 'n_words': 698}