~ubuntu-branches/ubuntu/hardy/dbacl/hardy

« back to all changes in this revision

Viewing changes to src/dbacl.h

  • Committer: Bazaar Package Importer
  • Author(s): Zak B. Elep
  • Date: 2006-03-26 22:35:35 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060326223535-bo3m96paoczzz59n
Tags: 1.12-1
* New upstream release
  + `dbacl -V' now exits with status 0.  (Closes: #339394)
* debian/rules:
  + Upstream now fixes TREC file permissions.  However some new scripts got
    added, so this time its a a+x fix instead of a-x.
* debian/patches:
  + Removed 10_slang2_conversion.patch from Clint, now merged upstream.
  + Updated 20_autotools_update.patch .

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
#endif
144
144
 
145
145
#ifndef MADVISE
 
146
#define MAP_FAILED ((void *)-1)
146
147
#define MADVISE(x,y,z)
147
148
#define MLOCK(x,y)
148
149
#define MUNLOCK(x,y)
481
482
#define M_OPTION_CASEN                  6
482
483
#define M_OPTION_CALCENTROPY            7
483
484
#define M_OPTION_MULTINOMIAL            8
 
485
#define M_OPTION_CHAR_CHAR              9
484
486
#define M_OPTION_CHAR_ALPHA             10
485
487
#define M_OPTION_CHAR_ALNUM             11
486
488
#define M_OPTION_CHAR_GRAPH             12
523
525
 
524
526
/* macros */
525
527
 
526
 
#define CVT_BITS(x) ((x)/M_LN2)
527
 
/* #define CVT_BITS(x) (x) */
528
 
 
529
528
/* used for digitizing */
530
529
#if defined DIGITIZE_LWEIGHTS
531
530
 
642
641
#define MAGIC7_i  "# antiregex %s\n"
643
642
#define MAGIC7_o  "# antiregex %s||%s\n"
644
643
#define MAGIC7_wo "# antiregex %ls||%s\n"
 
644
#define MAGIC9    "# binned_features %ld max_feature_count %ld\n" 
645
645
#define RESTARTPOS 8
646
646
#define MAGIC6    "#\n"
647
647
#define MAGIC8_i  "# shannon %" FMT_scanf_score_t \
657
657
 
658
658
#define MAGIC_ONLINE "# dbacl " SIGNATURE " online memory dump\n"
659
659
 
 
660
#define MAGIC_DUMP "# lambda | dig_ref | count | id     | token\n"
 
661
#define MAGIC_DUMPTBL_o "%9.3f %9.3f %7d %8lx "
 
662
#define MAGIC_DUMPTBL_i "%f %f %d %lx "
 
663
 
660
664
/* data structures */
661
665
typedef struct {
662
666
  token_class_t cls: 4;
714
718
  score_t score_div;
715
719
  score_t score_s2;
716
720
  score_t score_shannon;
 
721
  score_t score_exp;
717
722
  score_t shannon;
718
723
  score_t alpha;
719
724
  score_t beta;
774
779
    long used;
775
780
    off_t avail;
776
781
    byte_t *mmap_start;
777
 
    size_t mmap_offset;
 
782
    long mmap_offset;
778
783
    size_t mmap_length;
779
 
    size_t mmap_cursor;
 
784
    long mmap_cursor;
780
785
  } tmp;
781
786
  re_bitfield retype;
782
787
  token_order_t max_order;
786
791
  hash_count_t max_tokens;
787
792
  token_count_t full_token_count;
788
793
  token_count_t unique_token_count;
 
794
  token_count_t t_max;
 
795
  token_count_t b_count;
789
796
  score_t logZ;
790
797
  score_t divergence;
791
798
  score_t shannon;
916
923
} MBOX_State;
917
924
 
918
925
typedef enum {TEXT=1, XTAG, XTAGQUOTE, XTAGDQUOTE, XTAGPREQ, TAG, TAGQUOTE, TAGDQUOTE, TAGPREQ, CMNT, DISABLED} Xstate;
919
 
typedef enum {ALT=1,SRC,SRC_NETLOC,SRC_NETLOC_PREFIX,SRC_NETLOC_PATH,SRC_NETLOC_SUFFIX,UNDEF,JSCRIPT,ASTYLE} Xattribute;
 
926
typedef enum {ALT=1, SRC, SRC_NETLOC, SRC_NETLOC_PREFIX, SRC_NETLOC_PATH, SRC_NETLOC_SUFFIX, UNDEF, JSCRIPT, ASTYLE} Xattribute;
920
927
typedef enum {xpDUMB=1, xpHTML, xpSMART} Xparser;
921
928
typedef enum {SCRIPT=1,STYLE,COMMENT,NOFRAMES,NOEMBED,NOSCRIPT,NOLAYER,TITLE,VISIBLE} Xhide;
922
929
 
964
971
  /* these are defined in catfun.c */
965
972
  char *sanitize_path(char *in, char *extension);
966
973
  error_code_t sanitize_model_options(options_t *to, category_t *cat);
967
 
  char *print_model_options(options_t opt, char *buf);
 
974
  /*@shared@*/ char *print_model_options(options_t opt, /*@out@*/ char *buf);
968
975
  char *print_user_options(options_t opt, char *buf);
969
976
 
970
977
  void init_empirical(empirical_t *emp, hash_count_t dmt, hash_bit_count_t dmhb);
979
986
  c_item_t *find_in_category(category_t *cat, hash_value_t id);
980
987
  void init_purely_random_text_category(category_t *cat);
981
988
  error_code_t load_category(category_t *cat);
 
989
  error_code_t load_category_header(FILE *input, category_t *cat);
982
990
  error_code_t open_category(category_t *cat);
983
991
  void reload_all_categories();
984
992