summaryrefslogtreecommitdiff
path: root/libguile/strorder.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/strorder.c')
-rw-r--r--libguile/strorder.c74
1 files changed, 16 insertions, 58 deletions
diff --git a/libguile/strorder.c b/libguile/strorder.c
index 5e1a15a26..a4fe03daa 100644
--- a/libguile/strorder.c
+++ b/libguile/strorder.c
@@ -42,22 +42,20 @@
#include <stdio.h>
#include "_scm.h"
+#include "chars.h"
+#include "strorder.h"
SCM_PROC1 (s_string_equal_p, "string=?", scm_tc7_rpsubr, scm_string_equal_p);
-#ifdef __STDC__
-SCM
-scm_string_equal_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_equal_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
register scm_sizet i;
- register char *c1, *c2;
+ register unsigned char *c1, *c2;
SCM_ASSERT (SCM_NIMP (s1) && SCM_ROSTRINGP (s1), s1, SCM_ARG1, s_string_equal_p);
SCM_ASSERT (SCM_NIMP (s2) && SCM_ROSTRINGP (s2), s2, SCM_ARG2, s_string_equal_p);
@@ -66,8 +64,8 @@ scm_string_equal_p (s1, s2)
{
return SCM_BOOL_F;
}
- c1 = SCM_ROCHARS (s1);
- c2 = SCM_ROCHARS (s2);
+ c1 = SCM_ROUCHARS (s1);
+ c2 = SCM_ROUCHARS (s2);
while (0 != i--)
if (*c1++ != *c2++)
return SCM_BOOL_F;
@@ -75,15 +73,11 @@ scm_string_equal_p (s1, s2)
}
SCM_PROC1 (s_string_ci_equal_p, "string-ci=?", scm_tc7_rpsubr, scm_string_ci_equal_p);
-#ifdef __STDC__
-SCM
-scm_string_ci_equal_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_ci_equal_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
register scm_sizet i;
register unsigned char *c1, *c2;
@@ -103,15 +97,11 @@ scm_string_ci_equal_p (s1, s2)
}
SCM_PROC1 (s_string_less_p, "string<?", scm_tc7_rpsubr, scm_string_less_p);
-#ifdef __STDC__
-SCM
-scm_string_less_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_less_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
register scm_sizet i, len, s2len;
register unsigned char *c1, *c2;
@@ -140,57 +130,41 @@ scm_string_less_p (s1, s2)
}
SCM_PROC1 (s_string_leq_p, "string<=?", scm_tc7_rpsubr, scm_string_leq_p);
-#ifdef __STDC__
-SCM
-scm_string_leq_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_leq_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
return SCM_BOOL_NOT (scm_string_less_p (s2, s1));
}
SCM_PROC1 (s_string_gr_p, "string>?", scm_tc7_rpsubr, scm_string_gr_p);
-#ifdef __STDC__
-SCM
-scm_string_gr_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_gr_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
return scm_string_less_p (s2, s1);
}
SCM_PROC1 (s_string_geq_p, "string>=?", scm_tc7_rpsubr, scm_string_geq_p);
-#ifdef __STDC__
-SCM
-scm_string_geq_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_geq_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
return SCM_BOOL_NOT (scm_string_less_p (s1, s2));
}
SCM_PROC1 (s_string_ci_less_p, "string-ci<?", scm_tc7_rpsubr, scm_string_ci_less_p);
-#ifdef __STDC__
-SCM
-scm_string_ci_less_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_ci_less_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
register scm_sizet i, len, s2len;
register unsigned char *c1, *c2;
@@ -211,55 +185,39 @@ scm_string_ci_less_p (s1, s2)
}
SCM_PROC1 (s_string_ci_leq_p, "string-ci<=?", scm_tc7_rpsubr, scm_string_ci_leq_p);
-#ifdef __STDC__
-SCM
-scm_string_ci_leq_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_ci_leq_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
return SCM_BOOL_NOT (scm_string_ci_less_p (s2, s1));
}
SCM_PROC1 (s_string_ci_gr_p, "string-ci>?", scm_tc7_rpsubr, scm_string_ci_gr_p);
-#ifdef __STDC__
-SCM
-scm_string_ci_gr_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_ci_gr_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
return scm_string_ci_less_p (s2, s1);
}
SCM_PROC1 (s_string_ci_geq_p, "string-ci>=?", scm_tc7_rpsubr, scm_string_ci_geq_p);
-#ifdef __STDC__
-SCM
-scm_string_ci_geq_p (SCM s1, SCM s2)
-#else
+
SCM
scm_string_ci_geq_p (s1, s2)
SCM s1;
SCM s2;
-#endif
{
return SCM_BOOL_NOT (scm_string_ci_less_p (s1, s2));
}
-#ifdef __STDC__
-void
-scm_init_strorder (void)
-#else
+
void
scm_init_strorder ()
-#endif
{
#include "strorder.x"
}