summaryrefslogtreecommitdiff
path: root/ext/pspell/pspell.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pspell/pspell.c')
-rw-r--r--ext/pspell/pspell.c68
1 files changed, 45 insertions, 23 deletions
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c
index 0cba3757a..51fc0b12c 100644
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pspell.c,v 1.45.2.4 2006/01/01 12:50:12 sniper Exp $ */
+/* $Id: pspell.c,v 1.45.2.4.2.2 2006/08/14 20:08:18 nlopess Exp $ */
#define IS_EXT_MODULE
@@ -50,9 +50,31 @@
*/
#define PSPELL_LARGEST_WORD 3
+static PHP_MINIT_FUNCTION(pspell);
+static PHP_MINFO_FUNCTION(pspell);
+static PHP_FUNCTION(pspell_new);
+static PHP_FUNCTION(pspell_new_personal);
+static PHP_FUNCTION(pspell_new_config);
+static PHP_FUNCTION(pspell_check);
+static PHP_FUNCTION(pspell_suggest);
+static PHP_FUNCTION(pspell_store_replacement);
+static PHP_FUNCTION(pspell_add_to_personal);
+static PHP_FUNCTION(pspell_add_to_session);
+static PHP_FUNCTION(pspell_clear_session);
+static PHP_FUNCTION(pspell_save_wordlist);
+static PHP_FUNCTION(pspell_config_create);
+static PHP_FUNCTION(pspell_config_runtogether);
+static PHP_FUNCTION(pspell_config_mode);
+static PHP_FUNCTION(pspell_config_ignore);
+static PHP_FUNCTION(pspell_config_personal);
+static PHP_FUNCTION(pspell_config_dict_dir);
+static PHP_FUNCTION(pspell_config_data_dir);
+static PHP_FUNCTION(pspell_config_repl);
+static PHP_FUNCTION(pspell_config_save_repl);
+
/* {{{ pspell_functions[]
*/
-zend_function_entry pspell_functions[] = {
+static zend_function_entry pspell_functions[] = {
PHP_FE(pspell_new, NULL)
PHP_FE(pspell_new_personal, NULL)
PHP_FE(pspell_new_config, NULL)
@@ -119,7 +141,7 @@ static void php_pspell_close_config(zend_rsrc_list_entry *rsrc TSRMLS_DC)
/* {{{ PHP_MINIT_FUNCTION
*/
-PHP_MINIT_FUNCTION(pspell)
+static PHP_MINIT_FUNCTION(pspell)
{
REGISTER_LONG_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT | CONST_CS);
@@ -133,7 +155,7 @@ PHP_MINIT_FUNCTION(pspell)
/* {{{ proto int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])
Load a dictionary */
-PHP_FUNCTION(pspell_new)
+static PHP_FUNCTION(pspell_new)
{
zval **language,**spelling,**jargon,**encoding,**pmode;
long mode = 0L, speed = 0L;
@@ -236,7 +258,7 @@ PHP_FUNCTION(pspell_new)
/* {{{ proto int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]])
Load a dictionary with a personal wordlist*/
-PHP_FUNCTION(pspell_new_personal)
+static PHP_FUNCTION(pspell_new_personal)
{
zval **personal, **language,**spelling,**jargon,**encoding,**pmode;
long mode = 0L, speed = 0L;
@@ -352,7 +374,7 @@ PHP_FUNCTION(pspell_new_personal)
/* {{{ proto int pspell_new_config(int config)
Load a dictionary based on the given config */
-PHP_FUNCTION(pspell_new_config)
+static PHP_FUNCTION(pspell_new_config)
{
int type;
zval **conf;
@@ -385,7 +407,7 @@ PHP_FUNCTION(pspell_new_config)
/* {{{ proto bool pspell_check(int pspell, string word)
Returns true if word is valid */
-PHP_FUNCTION(pspell_check)
+static PHP_FUNCTION(pspell_check)
{
int type;
zval **scin,**word;
@@ -411,7 +433,7 @@ PHP_FUNCTION(pspell_check)
/* {{{ proto array pspell_suggest(int pspell, string word)
Returns array of suggestions */
-PHP_FUNCTION(pspell_suggest)
+static PHP_FUNCTION(pspell_suggest)
{
zval **scin, **word;
int argc;
@@ -446,7 +468,7 @@ PHP_FUNCTION(pspell_suggest)
/* {{{ proto bool pspell_store_replacement(int pspell, string misspell, string correct)
Notify the dictionary of a user-selected replacement */
-PHP_FUNCTION(pspell_store_replacement)
+static PHP_FUNCTION(pspell_store_replacement)
{
int type;
zval **scin,**miss,**corr;
@@ -474,7 +496,7 @@ PHP_FUNCTION(pspell_store_replacement)
/* {{{ proto bool pspell_add_to_personal(int pspell, string word)
Adds a word to a personal list */
-PHP_FUNCTION(pspell_add_to_personal)
+static PHP_FUNCTION(pspell_add_to_personal)
{
int type;
zval **scin,**word;
@@ -506,7 +528,7 @@ PHP_FUNCTION(pspell_add_to_personal)
/* {{{ proto bool pspell_add_to_session(int pspell, string word)
Adds a word to the current session */
-PHP_FUNCTION(pspell_add_to_session)
+static PHP_FUNCTION(pspell_add_to_session)
{
int type;
zval **scin,**word;
@@ -538,7 +560,7 @@ PHP_FUNCTION(pspell_add_to_session)
/* {{{ proto bool pspell_clear_session(int pspell)
Clears the current session */
-PHP_FUNCTION(pspell_clear_session)
+static PHP_FUNCTION(pspell_clear_session)
{
int type;
zval **scin;
@@ -564,7 +586,7 @@ PHP_FUNCTION(pspell_clear_session)
/* {{{ proto bool pspell_save_wordlist(int pspell)
Saves the current (personal) wordlist */
-PHP_FUNCTION(pspell_save_wordlist)
+static PHP_FUNCTION(pspell_save_wordlist)
{
int type;
zval **scin;
@@ -592,7 +614,7 @@ PHP_FUNCTION(pspell_save_wordlist)
/* {{{ proto int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]])
Create a new config to be used later to create a manager */
-PHP_FUNCTION(pspell_config_create)
+static PHP_FUNCTION(pspell_config_create)
{
zval **language,**spelling,**jargon,**encoding;
int argc;
@@ -667,7 +689,7 @@ PHP_FUNCTION(pspell_config_create)
/* {{{ proto bool pspell_config_runtogether(int conf, bool runtogether)
Consider run-together words as valid components */
-PHP_FUNCTION(pspell_config_runtogether)
+static PHP_FUNCTION(pspell_config_runtogether)
{
int type;
zval **conf, **runtogether;
@@ -691,7 +713,7 @@ PHP_FUNCTION(pspell_config_runtogether)
/* {{{ proto bool pspell_config_mode(int conf, long mode)
Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS) */
-PHP_FUNCTION(pspell_config_mode)
+static PHP_FUNCTION(pspell_config_mode)
{
int type;
zval **conf, **mode;
@@ -723,7 +745,7 @@ PHP_FUNCTION(pspell_config_mode)
/* {{{ proto bool pspell_config_ignore(int conf, int ignore)
Ignore words <= n chars */
-PHP_FUNCTION(pspell_config_ignore)
+static PHP_FUNCTION(pspell_config_ignore)
{
int type;
zval **conf, **pignore;
@@ -797,7 +819,7 @@ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
/* {{{ proto bool pspell_config_personal(int conf, string personal)
Use a personal dictionary for this config */
-PHP_FUNCTION(pspell_config_personal)
+static PHP_FUNCTION(pspell_config_personal)
{
pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "personal");
}
@@ -805,7 +827,7 @@ PHP_FUNCTION(pspell_config_personal)
/* {{{ proto bool pspell_config_dict_dir(int conf, string directory)
location of the main word list */
-PHP_FUNCTION(pspell_config_dict_dir)
+static PHP_FUNCTION(pspell_config_dict_dir)
{
pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "dict-dir");
}
@@ -813,7 +835,7 @@ PHP_FUNCTION(pspell_config_dict_dir)
/* {{{ proto bool pspell_config_data_dir(int conf, string directory)
location of language data files */
-PHP_FUNCTION(pspell_config_data_dir)
+static PHP_FUNCTION(pspell_config_data_dir)
{
pspell_config_path(INTERNAL_FUNCTION_PARAM_PASSTHRU, "data-dir");
}
@@ -821,7 +843,7 @@ PHP_FUNCTION(pspell_config_data_dir)
/* {{{ proto bool pspell_config_repl(int conf, string repl)
Use a personal dictionary with replacement pairs for this config */
-PHP_FUNCTION(pspell_config_repl)
+static PHP_FUNCTION(pspell_config_repl)
{
int type;
zval **conf, **repl;
@@ -856,7 +878,7 @@ PHP_FUNCTION(pspell_config_repl)
/* {{{ proto bool pspell_config_save_repl(int conf, bool save)
Save replacement pairs when personal list is saved for this config */
-PHP_FUNCTION(pspell_config_save_repl)
+static PHP_FUNCTION(pspell_config_save_repl)
{
int type;
zval **conf, **save;
@@ -880,7 +902,7 @@ PHP_FUNCTION(pspell_config_save_repl)
/* {{{ PHP_MINFO_FUNCTION
*/
-PHP_MINFO_FUNCTION(pspell)
+static PHP_MINFO_FUNCTION(pspell)
{
php_info_print_table_start();
php_info_print_table_row(2, "PSpell Support", "enabled");