static char hexchars[] = "0123456789abcdef";
static char HEXCHARS[] = "0123456789ABCDEF";
-
+/* php_spintf_appendchar() {{{ */
inline static void
php_sprintf_appendchar(char **buffer, int *pos, int *size, char add TSRMLS_DC)
{
PRINTF_DEBUG(("sprintf: appending '%c', pos=\n", add, *pos));
(*buffer)[(*pos)++] = add;
}
+/* }}} */
-
+/* php_spintf_appendstring() {{{ */
inline static void
php_sprintf_appendstring(char **buffer, int *pos, int *size, char *add,
int min_width, int max_width, char padding,
}
}
}
+/* }}} */
-
+/* php_spintf_appendint() {{{ */
inline static void
php_sprintf_appendint(char **buffer, int *pos, int *size, long number,
int width, char padding, int alignment,
padding, alignment, (NUM_BUF_SIZE - 1) - i,
neg, 0, always_sign);
}
+/* }}} */
+/* php_spintf_appenduint() {{{ */
inline static void
php_sprintf_appenduint(char **buffer, int *pos, int *size,
unsigned long number,
php_sprintf_appendstring(buffer, pos, size, &numbuf[i], width, 0,
padding, alignment, (NUM_BUF_SIZE - 1) - i, 0, 0, 0);
}
+/* }}} */
+/* php_spintf_appenddouble() {{{ */
inline static void
php_sprintf_appenddouble(char **buffer, int *pos,
int *size, double number,
php_sprintf_appendstring(buffer, pos, size, s, width, 0, padding,
alignment, s_len, is_negative, 0, always_sign);
}
+/* }}} */
-
+/* php_spintf_appendd2n() {{{ */
inline static void
php_sprintf_append2n(char **buffer, int *pos, int *size, long number,
int width, char padding, int alignment, int n,
padding, alignment, (NUM_BUF_SIZE - 1) - i,
0, expprec, 0);
}
+/* }}} */
-
+/* php_spintf_getnumber() {{{ */
inline static int
php_sprintf_getnumber(char *buffer, int *pos)
{
return (int) num;
}
}
+/* }}} */
-/* {{{ php_formatted_print
+/* php_formatted_print() {{{
* New sprintf implementation for PHP.
*
* Modifiers:
}
/* }}} */
-
/*
* Local variables:
* tab-width: 4