00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef RUBY_UTIL_H
00013 #define RUBY_UTIL_H 1
00014
00015 #if defined(__cplusplus)
00016 extern "C" {
00017 #if 0
00018 }
00019 #endif
00020 #endif
00021
00022 #include "ruby/defines.h"
00023 #ifdef RUBY_EXTCONF_H
00024 #include RUBY_EXTCONF_H
00025 #endif
00026
00027 #ifndef _
00028 #ifdef __cplusplus
00029 # ifndef HAVE_PROTOTYPES
00030 # define HAVE_PROTOTYPES 1
00031 # endif
00032 # ifndef HAVE_STDARG_PROTOTYPES
00033 # define HAVE_STDARG_PROTOTYPES 1
00034 # endif
00035 #endif
00036 #ifdef HAVE_PROTOTYPES
00037 # define _(args) args
00038 #else
00039 # define _(args) ()
00040 #endif
00041 #ifdef HAVE_STDARG_PROTOTYPES
00042 # define __(args) args
00043 #else
00044 # define __(args) ()
00045 #endif
00046 #endif
00047
00048 RUBY_SYMBOL_EXPORT_BEGIN
00049
00050 #define scan_oct(s,l,e) ((int)ruby_scan_oct((s),(l),(e)))
00051 unsigned long ruby_scan_oct(const char *, size_t, size_t *);
00052 #define scan_hex(s,l,e) ((int)ruby_scan_hex((s),(l),(e)))
00053 unsigned long ruby_scan_hex(const char *, size_t, size_t *);
00054
00055 void ruby_qsort(void *, const size_t, const size_t,
00056 int (*)(const void *, const void *, void *), void *);
00057
00058 void ruby_setenv(const char *, const char *);
00059 void ruby_unsetenv(const char *);
00060 #undef setenv
00061 #undef unsetenv
00062 #define setenv(name,val) ruby_setenv((name),(val))
00063 #define unsetenv(name,val) ruby_unsetenv(name)
00064
00065 char *ruby_strdup(const char *);
00066 #undef strdup
00067 #define strdup(s) ruby_strdup(s)
00068
00069 char *ruby_getcwd(void);
00070 #define my_getcwd() ruby_getcwd()
00071
00072 double ruby_strtod(const char *, char **);
00073 #undef strtod
00074 #define strtod(s,e) ruby_strtod((s),(e))
00075
00076 #if defined _MSC_VER && _MSC_VER >= 1300
00077 #pragma warning(push)
00078 #pragma warning(disable:4723)
00079 #endif
00080 #if defined _MSC_VER && _MSC_VER >= 1300
00081 #pragma warning(pop)
00082 #endif
00083
00084 void ruby_each_words(const char *, void (*)(const char*, int, void*), void *);
00085
00086 RUBY_SYMBOL_EXPORT_END
00087
00088 #if defined(__cplusplus)
00089 #if 0
00090 {
00091 #endif
00092 }
00093 #endif
00094
00095 #endif
00096