@@ -306,7 +306,7 @@ NIAddAffix(IspellDict * Conf, int flag, char flagflags, const char *mask, const
306306#define PAE_INREPL 5
307307
308308static bool
309- parse_affentry (char * str ,char * mask ,char * find ,char * repl ) {
309+ parse_affentry (char * str ,char * mask ,char * find ,char * repl , int line ) {
310310int state = PAE_WAIT_MASK ;
311311char * pmask = mask ,* pfind = find ,* prepl = repl ;
312312
@@ -332,12 +332,12 @@ parse_affentry( char *str, char *mask, char *find, char *repl ) {
332332}else if (state == PAE_WAIT_FIND ) {
333333if (t_iseq (str ,'-' ) ) {
334334state = PAE_INFIND ;
335- }else if (t_isalpha (str )) {
335+ }else if (t_isalpha (str )|| t_iseq ( str , '\'' ) /* english 's */ ) {
336336COPYCHAR (prepl ,str );
337337prepl += pg_mblen (str );
338338state = PAE_INREPL ;
339339}else if (!t_isspace (str ))
340- ts_error (ERROR ,"Affix parse error" );
340+ ts_error (ERROR ,"Affix parse error at %d line" , line );
341341}else if (state == PAE_INFIND ) {
342342if (t_iseq (str ,',' ) ) {
343343* pfind = '\0' ;
@@ -346,7 +346,7 @@ parse_affentry( char *str, char *mask, char *find, char *repl ) {
346346COPYCHAR (pfind ,str );
347347pfind += pg_mblen (str );
348348}else if (!t_isspace (str ))
349- ts_error (ERROR ,"Affix parse error" );
349+ ts_error (ERROR ,"Affix parse error at %d line" , line );
350350}else if (state == PAE_WAIT_REPL ) {
351351if (t_iseq (str ,'-' ) ) {
352352break ;/* void repl */
@@ -355,7 +355,7 @@ parse_affentry( char *str, char *mask, char *find, char *repl ) {
355355prepl += pg_mblen (str );
356356state = PAE_INREPL ;
357357}else if (!t_isspace (str ))
358- ts_error (ERROR ,"Affix parse error" );
358+ ts_error (ERROR ,"Affix parse error at %d line" , line );
359359}else if (state == PAE_INREPL ) {
360360if (t_iseq (str ,'#' ) ) {
361361* prepl = '\0' ;
@@ -364,7 +364,7 @@ parse_affentry( char *str, char *mask, char *find, char *repl ) {
364364COPYCHAR (prepl ,str );
365365prepl += pg_mblen (str );
366366}else if (!t_isspace (str ))
367- ts_error (ERROR ,"Affix parse error" );
367+ ts_error (ERROR ,"Affix parse error at %d line" , line );
368368}else
369369ts_error (ERROR ,"Unknown state in parse_affentry: %d" ,state );
370370
@@ -390,13 +390,15 @@ NIImportAffixes(IspellDict * Conf, const char *filename)
390390int flag = 0 ;
391391char flagflags = 0 ;
392392FILE * affix ;
393+ int line = 0 ;
393394
394395if (!(affix = fopen (filename ,"r" )))
395396return (1 );
396397Conf -> compoundcontrol = '\t' ;
397398
398399while (fgets (str ,sizeof (str ),affix ))
399400{
401+ line ++ ;
400402pg_verifymbstr (str ,strlen (str ), false);
401403memcpy (tmpstr ,str ,32 );/* compoundwords... */
402404tmpstr [32 ]= '\0' ;
@@ -463,7 +465,7 @@ NIImportAffixes(IspellDict * Conf, const char *filename)
463465continue ;
464466
465467lowerstr (str );
466- if ( !parse_affentry (str ,mask ,find ,repl ) )
468+ if ( !parse_affentry (str ,mask ,find ,repl , line ) )
467469continue ;
468470
469471NIAddAffix (Conf ,flag ,flagflags ,mask ,find ,repl ,suffixes ?FF_SUFFIX :FF_PREFIX );