summaryrefslogtreecommitdiffstats
path: root/ascii.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2011-12-03 11:07:41 -0800
committerDan Fandrich <dan@coneharvesters.com>2011-12-03 11:07:41 -0800
commit13e87955a6610317dd90b29b116edd5196cbcd56 (patch)
tree258870d269e2aeeb6f1ef727b26dae09e003132e /ascii.c
parent4ea6c922a9763cd7268d1808088c09965bf85063 (diff)
Inline some small, often-used functions (closes #3551)
When I first sent this patch to the mailing list in 2008, my benchmarking found a reduction in startup time of 15%.
Diffstat (limited to 'ascii.c')
-rw-r--r--ascii.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ascii.c b/ascii.c
index 779b9480..1076f8f2 100644
--- a/ascii.c
+++ b/ascii.c
@@ -34,17 +34,17 @@
#include <stdlib.h>
#include "ascii.h"
-int ascii_isupper (int c)
+inline int ascii_isupper (int c)
{
return (c >= 'A') && (c <= 'Z');
}
-int ascii_islower (int c)
+inline int ascii_islower (int c)
{
return (c >= 'a') && (c <= 'z');
}
-int ascii_toupper (int c)
+inline int ascii_toupper (int c)
{
if (ascii_islower (c))
return c & ~32;
@@ -52,7 +52,7 @@ int ascii_toupper (int c)
return c;
}
-int ascii_tolower (int c)
+inline int ascii_tolower (int c)
{
if (ascii_isupper (c))
return c | 32;