20
20
* ===== shared segment init (postmaster startup) =====
21
21
*
22
22
* _PG_init
23
- * -> ispell_shmem_startup (registered as a hook)
23
+ * -> ispell_shmem_startup (registered as a hook)
24
24
*
25
25
* ===== dictionary init (backend) =====
26
26
*
27
27
* dispell_init
28
- * -> init_shared_dict
29
- * -> get_shared_dict
30
- * -> NIStartBuild
31
- * -> NIImportDictionary
32
- * -> NIImportAffixes
33
- * -> NISortDictionary
34
- * -> NISortAffixes
35
- * -> NIFinishBuild
36
- * -> sizeIspellDict
37
- * -> copyIspellDict
38
- * -> copySPNode
39
- * -> get_shared_stop_list
40
- * -> readstoplist
41
- * -> copyStopList
28
+ * -> init_shared_dict
29
+ * -> get_shared_dict
30
+ * -> NIStartBuild
31
+ * -> NIImportDictionary
32
+ * -> NIImportAffixes
33
+ * -> NISortDictionary
34
+ * -> NISortAffixes
35
+ * -> NIFinishBuild
36
+ * -> sizeIspellDict
37
+ * -> copyIspellDict
38
+ * -> copySPNode
39
+ * -> get_shared_stop_list
40
+ * -> readstoplist
41
+ * -> copyStopList
42
42
*
43
43
* ===== dictionary reinit after reset (backend) =====
44
44
*
45
45
* dispell_lexize
46
- * -> timestamp of lookup < last reset
47
- * -> init_shared_dict
48
- * (see dispell_init above)
49
- * -> SharedNINormalizeWord
46
+ * -> timestamp of lookup < last reset
47
+ * -> init_shared_dict
48
+ * (see dispell_init above)
49
+ * -> SharedNINormalizeWord
50
50
*/
51
51
52
52
#include "postgres.h"
@@ -592,7 +592,7 @@ dispell_lexize(PG_FUNCTION_ARGS)
592
592
char * txt ;
593
593
TSLexeme * res ;
594
594
TSLexeme * ptr ,
595
- * cptr ;
595
+ * cptr ;
596
596
597
597
if (len <= 0 )
598
598
PG_RETURN_POINTER (NULL );
@@ -703,13 +703,13 @@ copySPNode(SPNode *node)
703
703
SPNode * copy = NULL ;
704
704
705
705
if (node == NULL )
706
- return NULL ;
706
+ return NULL ;
707
707
708
708
copy = (SPNode * ) shalloc (offsetof(SPNode , data ) + sizeof (SPNodeData ) * node -> length );
709
709
memcpy (copy , node , offsetof(SPNode , data ) + sizeof (SPNodeData ) * node -> length );
710
710
711
711
for (i = 0 ; i < node -> length ; i ++ )
712
- copy -> data [i ].node = copySPNode (node -> data [i ].node );
712
+ copy -> data [i ].node = copySPNode (node -> data [i ].node );
713
713
714
714
return copy ;
715
715
}
@@ -721,7 +721,7 @@ sizeSPNode(SPNode *node)
721
721
int size = 0 ;
722
722
723
723
if (node == NULL )
724
- return 0 ;
724
+ return 0 ;
725
725
726
726
size = MAXALIGN (offsetof(SPNode , data ) + sizeof (SPNodeData ) * node -> length );
727
727
@@ -821,7 +821,7 @@ sizeIspellDict(IspellDict *dict, char *dictFile, char *affixFile)
821
821
/* copy affix data */
822
822
size += MAXALIGN (sizeof (char * ) * dict -> nAffixData );
823
823
for (i = 0 ; i < dict -> nAffixData ; i ++ )
824
- size += MAXALIGN (sizeof (char ) * strlen (dict -> AffixData [i ]) + 1 );
824
+ size += MAXALIGN (sizeof (char ) * strlen (dict -> AffixData [i ]) + 1 );
825
825
826
826
return size ;
827
827
}
@@ -848,10 +848,10 @@ dispell_list_dicts(PG_FUNCTION_ARGS)
848
848
849
849
/* Build a tuple descriptor for our result type */
850
850
if (get_call_result_type (fcinfo , NULL , & tupdesc ) != TYPEFUNC_COMPOSITE )
851
- ereport (ERROR ,
852
- (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
853
- errmsg ("function returning record called in context "
854
- "that cannot accept type record" )));
851
+ ereport (ERROR ,
852
+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
853
+ errmsg ("function returning record called in context "
854
+ "that cannot accept type record" )));
855
855
856
856
/*
857
857
* generate attribute metadata needed later to produce tuples from raw
0 commit comments