Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# include/ruby/util.h

Go to the documentation of this file.

    00001 /**********************************************************************
    00002
    00003   util.h -
    00004
    00005   $Author: naruse $
    00006   created at: Thu Mar  9 11:55:53 JST 1995
    00007
    00008   Copyright (C) 1993-2007 Yukihiro Matsumoto
    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 } /* satisfy cc-mode */
    00019 #endif
    00020 #endif
    00021
    00022 #ifndef _
    00023 #ifdef __cplusplus
    00024 # ifndef  HAVE_PROTOTYPES
    00025 #  define HAVE_PROTOTYPES 1
    00026 # endif
    00027 # ifndef  HAVE_STDARG_PROTOTYPES
    00028 #  define HAVE_STDARG_PROTOTYPES 1
    00029 # endif
    00030 #endif
    00031 #ifdef HAVE_PROTOTYPES
    00032 # define _(args) args
    00033 #else
    00034 # define _(args) ()
    00035 #endif
    00036 #ifdef HAVE_STDARG_PROTOTYPES
    00037 # define __(args) args
    00038 #else
    00039 # define __(args) ()
    00040 #endif
    00041 #endif
    00042
    00043 #define scan_oct(s,l,e) (int)ruby_scan_oct(s,l,e)
    00044 unsigned long ruby_scan_oct(const char *, size_t, size_t *);
    00045 #define scan_hex(s,l,e) (int)ruby_scan_hex(s,l,e)
    00046 unsigned long ruby_scan_hex(const char *, size_t, size_t *);
    00047
    00048 #if defined(__CYGWIN32__) || defined(_WIN32)
    00049 void ruby_add_suffix(VALUE str, const char *suffix);
    00050 #endif
    00051
    00052 void ruby_qsort(void *, const size_t, const size_t,
    00053                 int (*)(const void *, const void *, void *), void *);
    00054
    00055 void ruby_setenv(const char *, const char *);
    00056 void ruby_unsetenv(const char *);
    00057 #undef setenv
    00058 #undef unsetenv
    00059 #define setenv(name,val) ruby_setenv(name,val)
    00060 #define unsetenv(name,val) ruby_unsetenv(name);
    00061
    00062 char *ruby_strdup(const char *);
    00063 #undef strdup
    00064 #define strdup(s) ruby_strdup(s)
    00065
    00066 char *ruby_getcwd(void);
    00067 #define my_getcwd() ruby_getcwd()
    00068
    00069 double ruby_strtod(const char *, char **);
    00070 #undef strtod
    00071 #define strtod(s,e) ruby_strtod(s,e)
    00072
    00073 #if defined _MSC_VER && _MSC_VER >= 1300
    00074 #pragma warning(push)
    00075 #pragma warning(disable:4723)
    00076 #endif
    00077 #if defined _MSC_VER && _MSC_VER >= 1300
    00078 #pragma warning(pop)
    00079 #endif
    00080
    00081 void ruby_each_words(const char *, void (*)(const char*, int, void*), void *);
    00082
    00083 #if defined(__cplusplus)
    00084 #if 0
    00085 { /* satisfy cc-mode */
    00086 #endif
    00087 }  /* extern "C" { */
    00088 #endif
    00089
    00090 #endif /* RUBY_UTIL_H */
    00091