source: trunk/util/xc_trace.c @ 1391

Last change on this file since 1391 was 1391, checked in by moo, 11 months ago

fix xtest

  • Property svn:eol-style set to native
File size: 619 bytes
Line 
1#ifdef TEST
2#   define PHP_DIR_SEPARATOR '/'
3#else
4#   include "php.h"
5#endif
6#include "xc_trace.h"
7#include <stdio.h>
8#include <stdarg.h>
9#include <string.h>
10
11const char *xc_trace_get_basename(const char *path) /* {{{ */
12{
13    const char *last_separator = strrchr(path, PHP_DIR_SEPARATOR);
14    return last_separator ? last_separator + 1 : path;
15}
16/* }}} */
17int xc_vtrace(const char *fmt, va_list args) /* {{{ */
18{
19    return vfprintf(stderr, fmt, args);
20}
21/* }}} */
22int xc_trace(const char *fmt, ...) /* {{{ */
23{
24    va_list args;
25    int ret;
26
27    va_start(args, fmt);
28    ret = xc_vtrace(fmt, args);
29    va_end(args);
30    return ret;
31}
32/* }}} */
33
Note: See TracBrowser for help on using the repository browser.