doio.c I/O operations
doop.c Support code for various operations
dosish.h Some defines for MS/DOSish machines
+dquote_static.c Static functions for double quotish contexts
dump.c Debugging output
embed.fnc Database used by embed.pl
embed.h Maps symbols to safer names
--- /dev/null
+/* dquote_static.c
+ *
+ * This file contains static inline functions that are related to
+ * parsing double-quotish expressions, but are used in more than
+ * one file.
+ *
+ * It is currently #included by regcomp.c and toke.c.
+*/
+
+/*
+ - regcurly - a little FSA that accepts {\d+,?\d*}
+ Pulled from regcomp.c.
+ */
+
+/* embed.pl doesn't yet know how to handle static inline functions, so
+ manually decorate it here with gcc-style attributes.
+*/
+PERL_STATIC_INLINE I32
+regcurly(register const char *s)
+ __attribute__warn_unused_result__
+ __attribute__pure__
+ __attribute__nonnull__(1);
+
+PERL_STATIC_INLINE I32
+regcurly(register const char *s)
+{
+ assert(s);
+
+ if (*s++ != '{')
+ return FALSE;
+ if (!isDIGIT(*s))
+ return FALSE;
+ while (isDIGIT(*s))
+ s++;
+ if (*s == ',')
+ s++;
+ while (isDIGIT(*s))
+ s++;
+ if (*s != '}')
+ return FALSE;
+ return TRUE;
+}
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */
AnpR |void* |get_context
Anp |void |set_context |NN void *t
-EXpRnPM |I32 |regcurly |NN const char *s
END_EXTERN_C
# include "regcomp.h"
#endif
+#include "dquote_static.c"
+
#ifdef op
#undef op
#endif /* op */
#endif
/*
- - regcurly - a little FSA that accepts {\d+,?\d*}
- */
-#ifndef PERL_IN_XSUB_RE
-I32
-Perl_regcurly(register const char *s)
-{
- PERL_ARGS_ASSERT_REGCURLY;
-
- if (*s++ != '{')
- return FALSE;
- if (!isDIGIT(*s))
- return FALSE;
- while (isDIGIT(*s))
- s++;
- if (*s == ',')
- s++;
- while (isDIGIT(*s))
- s++;
- if (*s != '}')
- return FALSE;
- return TRUE;
-}
-#endif
-
-/*
- regdump - dump a regexp onto Perl_debug_log in vaguely comprehensible form
*/
#ifdef DEBUGGING
#include "EXTERN.h"
#define PERL_IN_TOKE_C
#include "perl.h"
+#include "dquote_static.c"
#define new_constant(a,b,c,d,e,f,g) \
S_new_constant(aTHX_ a,b,STR_WITH_LEN(c),d,e,f, g)