Ruby 2.1.5p273(2014-11-13revision48405)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

util.h
Go to the documentation of this file.
1 /**********************************************************************
2
3 util.h -
4
5 $Author: nobu $
6 created at: Thu Mar 9 11:55:53 JST 1995
7
8 Copyright (C) 1993-2007 Yukihiro Matsumoto
9
10 **********************************************************************/
11
12 #ifndef RUBY_UTIL_H
13 #define RUBY_UTIL_H 1
14
15 #if defined(__cplusplus)
16 extern "C" {
17 #if 0
18 } /* satisfy cc-mode */
19 #endif
20 #endif
21
22 #include "ruby/defines.h"
23 #ifdef RUBY_EXTCONF_H
24 #include RUBY_EXTCONF_H
25 #endif
26
27 #ifndef _
28 #ifdef __cplusplus
29 # ifndef HAVE_PROTOTYPES
30 # define HAVE_PROTOTYPES 1
31 # endif
32 # ifndef HAVE_STDARG_PROTOTYPES
33 # define HAVE_STDARG_PROTOTYPES 1
34 # endif
35 #endif
36 #ifdef HAVE_PROTOTYPES
37 # define _(args) args
38 #else
39 # define _(args) ()
40 #endif
41 #ifdef HAVE_STDARG_PROTOTYPES
42 # define __(args) args
43 #else
44 # define __(args) ()
45 #endif
46 #endif
47
48 RUBY_SYMBOL_EXPORT_BEGIN
49
50 #define scan_oct(s,l,e) ((int)ruby_scan_oct((s),(l),(e)))
51 unsigned long ruby_scan_oct(const char *, size_t, size_t *);
52 #define scan_hex(s,l,e) ((int)ruby_scan_hex((s),(l),(e)))
53 unsigned long ruby_scan_hex(const char *, size_t, size_t *);
54
55 void ruby_qsort(void *, const size_t, const size_t,
56 int (*)(const void *, const void *, void *), void *);
57
58 void ruby_setenv(const char *, const char *);
59 void ruby_unsetenv(const char *);
60 #undef setenv
61 #undef unsetenv
62 #define setenv(name,val) ruby_setenv((name),(val))
63 #define unsetenv(name,val) ruby_unsetenv(name)
64
65 char *ruby_strdup(const char *);
66 #undef strdup
67 #define strdup(s) ruby_strdup(s)
68
69 char *ruby_getcwd(void);
70 #define my_getcwd() ruby_getcwd()
71
72 double ruby_strtod(const char *, char **);
73 #undef strtod
74 #define strtod(s,e) ruby_strtod((s),(e))
75
76 #if defined _MSC_VER && _MSC_VER >= 1300
77 #pragma warning(push)
78 #pragma warning(disable:4723)
79 #endif
80 #if defined _MSC_VER && _MSC_VER >= 1300
81 #pragma warning(pop)
82 #endif
83
84 void ruby_each_words(const char *, void (*)(const char*, int, void*), void *);
85
86 RUBY_SYMBOL_EXPORT_END
87
88 #if defined(__cplusplus)
89 #if 0
90 { /* satisfy cc-mode */
91 #endif
92 } /* extern "C" { */
93 #endif
94
95 #endif /* RUBY_UTIL_H */
ruby_each_words
void ruby_each_words(const char *, void(*)(const char *, int, void *), void *)
Definition: util.c:3767
ruby_strtod
double ruby_strtod(const char *, char **)
Definition: util.c:1945
ruby_setenv
void ruby_setenv(const char *, const char *)
Definition: hash.c:2747
ruby_strdup
char * ruby_strdup(const char *)
Definition: util.c:457
defines.h
RUBY_SYMBOL_EXPORT_END
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:39
ruby_unsetenv
void ruby_unsetenv(const char *)
Definition: hash.c:2856
ruby_qsort
void ruby_qsort(void *, const size_t, const size_t, int(*)(const void *, const void *, void *), void *)
RUBY_SYMBOL_EXPORT_BEGIN
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:38
ruby_getcwd
char * ruby_getcwd(void)
Definition: util.c:478
ruby_scan_hex
unsigned long ruby_scan_hex(const char *, size_t, size_t *)
Definition: util.c:42
ruby_scan_oct
unsigned long ruby_scan_oct(const char *, size_t, size_t *)
Definition: util.c:28