Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static int is_new_para(void)
#endif
return 1;
}
if (!isletter(c))
if (!isletter(c) && !isnumber(c))
return 1;
return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions estruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,16 +357,19 @@
#define isletter(c) (('a' <= c && LASTLL >= c) || ('A' <= c && LASTUL >= c) || (128<=c && c<=167))
#define islower(c) (('a' <= c && LASTLL >= c))
#define isupper(c) (('A' <= c && LASTUL >= c))
#define isnumber(c) (('0' <= c && '9' >= c))

#else

#define isletter(c) isxletter((0xFF & (c)))
#define islower(c) isxlower((0xFF & (c)))
#define isupper(c) isxupper((0xFF & (c)))
#define isnumber(c) isxnumber((0xFF & (c)))

#define isxletter(c) (('a' <= c && LASTLL >= c) || ('A' <= c && LASTUL >= c) || (192<=c && c<=255))
#define isxlower(c) (('a' <= c && LASTLL >= c) || (224 <= c && 252 >= c))
#define isxupper(c) (('A' <= c && LASTUL >= c) || (192 <= c && 220 >= c))
#define isxnumber(c) (('0' <= c && '9' >= c))

#endif

Expand Down
2 changes: 1 addition & 1 deletion word.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ int inword(void)
if (c >= 'A' && c <= 'Z')
#endif
return TRUE;
if (c >= '0' && c <= '9')
if (isnumber(c))
return TRUE;
return FALSE;
}
Expand Down