Server IP : 103.119.228.120 / Your IP : 18.119.192.2 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/ssl/local/ssl/include/pgsql/server/tsearch/dicts/ |
Upload File : |
/*------------------------------------------------------------------------- * * spell.h * * Declarations for ISpell dictionary * * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group * * src/include/tsearch/dicts/spell.h * *------------------------------------------------------------------------- */ #ifndef __SPELL_H__ #define __SPELL_H__ #include "regex/regex.h" #include "tsearch/dicts/regis.h" #include "tsearch/ts_public.h" /* * Max length of a flag name. Names longer than this will be truncated * to the maximum. */ #define MAXFLAGLEN 16 struct SPNode; typedef struct { uint32 val:8, isword:1, compoundflag:4, affix:19; struct SPNode *node; } SPNodeData; /* * Names of FF_ are correlated with Hunspell options in affix file * http://hunspell.sourceforge.net/ */ #define FF_COMPOUNDONLY 0x01 #define FF_COMPOUNDBEGIN 0x02 #define FF_COMPOUNDMIDDLE 0x04 #define FF_COMPOUNDLAST 0x08 #define FF_COMPOUNDFLAG ( FF_COMPOUNDBEGIN | FF_COMPOUNDMIDDLE | FF_COMPOUNDLAST ) #define FF_DICTFLAGMASK 0x0f typedef struct SPNode { uint32 length; SPNodeData data[1]; } SPNode; #define SPNHDRSZ (offsetof(SPNode,data)) typedef struct spell_struct { union { /* * flag is filled in by NIImportDictionary. After NISortDictionary, d * is valid and flag is invalid. */ char flag[MAXFLAGLEN]; struct { int affix; int len; } d; } p; char word[1]; /* variable length, null-terminated */ } SPELL; #define SPELLHDRSZ (offsetof(SPELL, word)) typedef struct aff_struct { uint32 flag:8, type:1, flagflags:7, issimple:1, isregis:1, replen:14; char *find; char *repl; union { regex_t regex; Regis regis; } reg; } AFFIX; /* * affixes use dictionary flags too */ #define FF_COMPOUNDPERMITFLAG 0x10 #define FF_COMPOUNDFORBIDFLAG 0x20 #define FF_CROSSPRODUCT 0x40 /* * Don't change the order of these. Initialization sorts by these, * and expects prefixes to come first after sorting. */ #define FF_SUFFIX 1 #define FF_PREFIX 0 struct AffixNode; typedef struct { uint32 val:8, naff:24; AFFIX **aff; struct AffixNode *node; } AffixNodeData; typedef struct AffixNode { uint32 isvoid:1, length:31; AffixNodeData data[1]; } AffixNode; #define ANHRDSZ (offsetof(AffixNode, data)) typedef struct { char *affix; int len; bool issuffix; } CMPDAffix; typedef struct { int maffixes; int naffixes; AFFIX *Affix; AffixNode *Suffix; AffixNode *Prefix; SPNode *Dictionary; char **AffixData; int lenAffixData; int nAffixData; CMPDAffix *CompoundAffix; unsigned char flagval[256]; bool usecompound; /* * Remaining fields are only used during dictionary construction; they are * set up by NIStartBuild and cleared by NIFinishBuild. */ MemoryContext buildCxt; /* temp context for construction */ /* Temporary array of all words in the dict file */ SPELL **Spell; int nspell; /* number of valid entries in Spell array */ int mspell; /* allocated length of Spell array */ /* These are used to allocate "compact" data without palloc overhead */ char *firstfree; /* first free address (always maxaligned) */ size_t avail; /* free space remaining at firstfree */ } IspellDict; extern TSLexeme *NINormalizeWord(IspellDict *Conf, char *word); extern void NIStartBuild(IspellDict *Conf); extern void NIImportAffixes(IspellDict *Conf, const char *filename); extern void NIImportDictionary(IspellDict *Conf, const char *filename); extern void NISortDictionary(IspellDict *Conf); extern void NISortAffixes(IspellDict *Conf); extern void NIFinishBuild(IspellDict *Conf); #endif