REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 4.54 KB
Close
/proc/thread-self/root/opt/alt/ruby20/include/ruby-2.0.0/ruby/st.h
Text
Base64
/* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */ /* @(#) st.h 5.1 89/12/14 */ #ifndef RUBY_ST_H #define RUBY_ST_H 1 #if defined(__cplusplus) extern "C" { #if 0 } /* satisfy cc-mode */ #endif #endif #include "ruby/defines.h" #if defined STDC_HEADERS #include <stddef.h> #elif defined HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #if defined __GNUC__ && __GNUC__ >= 4 #pragma GCC visibility push(default) #endif #if SIZEOF_LONG == SIZEOF_VOIDP typedef unsigned long st_data_t; #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP typedef unsigned LONG_LONG st_data_t; #else # error ---->> st.c requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<---- #endif #define ST_DATA_T_DEFINED #ifndef CHAR_BIT # ifdef HAVE_LIMITS_H # include <limits.h> # else # define CHAR_BIT 8 # endif #endif #ifndef _ # define _(args) args #endif #ifndef ANYARGS # ifdef __cplusplus # define ANYARGS ... # else # define ANYARGS # endif #endif typedef struct st_table st_table; typedef st_data_t st_index_t; typedef int st_compare_func(st_data_t, st_data_t); typedef st_index_t st_hash_func(st_data_t); typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP == (int)sizeof(st_index_t) ? 1 : -1]; #define SIZEOF_ST_INDEX_T SIZEOF_VOIDP struct st_hash_type { int (*compare)(ANYARGS /*st_data_t, st_data_t*/); /* st_compare_func* */ st_index_t (*hash)(ANYARGS /*st_data_t*/); /* st_hash_func* */ }; #define ST_INDEX_BITS (sizeof(st_index_t) * CHAR_BIT) struct st_table { const struct st_hash_type *type; st_index_t num_bins; unsigned int entries_packed : 1; #ifdef __GNUC__ /* * C spec says, * A bit-field shall have a type that is a qualified or unqualified * version of _Bool, signed int, unsigned int, or some other * implementation-defined type. It is implementation-defined whether * atomic types are permitted. * In short, long and long long bit-field are implementation-defined * feature. Therefore we want to supress a warning explicitly. */ __extension__ #endif st_index_t num_entries : ST_INDEX_BITS - 1; union { struct { struct st_table_entry **bins; struct st_table_entry *head, *tail; } big; struct { struct st_packed_entry *entries; st_index_t real_entries; } packed; } as; }; #define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0) enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK}; st_table *st_init_table(const struct st_hash_type *); st_table *st_init_table_with_size(const struct st_hash_type *, st_index_t); st_table *st_init_numtable(void); st_table *st_init_numtable_with_size(st_index_t); st_table *st_init_strtable(void); st_table *st_init_strtable_with_size(st_index_t); st_table *st_init_strcasetable(void); st_table *st_init_strcasetable_with_size(st_index_t); int st_delete(st_table *, st_data_t *, st_data_t *); /* returns 0:notfound 1:deleted */ int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t); int st_insert(st_table *, st_data_t, st_data_t); int st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t)); int st_lookup(st_table *, st_data_t, st_data_t *); int st_get_key(st_table *, st_data_t, st_data_t *); typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing); int st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg); int st_foreach(st_table *, int (*)(ANYARGS), st_data_t); int st_foreach_check(st_table *, int (*)(ANYARGS), st_data_t, st_data_t); int st_reverse_foreach(st_table *, int (*)(ANYARGS), st_data_t); void st_add_direct(st_table *, st_data_t, st_data_t); void st_free_table(st_table *); void st_cleanup_safe(st_table *, st_data_t); void st_clear(st_table *); st_table *st_copy(st_table *); int st_numcmp(st_data_t, st_data_t); st_index_t st_numhash(st_data_t); int st_strcasecmp(const char *s1, const char *s2); int st_strncasecmp(const char *s1, const char *s2, size_t n); size_t st_memsize(const st_table *); st_index_t st_hash(const void *ptr, size_t len, st_index_t h); st_index_t st_hash_uint32(st_index_t h, uint32_t i); st_index_t st_hash_uint(st_index_t h, st_index_t i); st_index_t st_hash_end(st_index_t h); st_index_t st_hash_start(st_index_t h); #define st_hash_start(h) ((st_index_t)(h)) #if defined __GNUC__ && __GNUC__ >= 4 #pragma GCC visibility pop #endif #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ #endif } /* extern "C" { */ #endif #endif /* RUBY_ST_H */
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 18
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
backward
DIR
-
drwxr-xr-x
2024-03-03 22:53:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
debug.h
3.28 KB
lrw-r--r--
2013-01-29 08:25:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
defines.h
5.42 KB
lrw-r--r--
2011-11-15 05:05:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
digest.h
881 B
lrw-r--r--
2023-07-26 14:09:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dl.h
7.45 KB
lrw-r--r--
2023-07-26 14:09:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
encoding.h
13.79 KB
lrw-r--r--
2012-04-11 13:31:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
intern.h
32.16 KB
lrw-r--r--
2014-07-03 06:20:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
io.h
5.73 KB
lrw-r--r--
2013-04-14 15:10:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
missing.h
4.42 KB
lrw-r--r--
2013-03-20 14:10:09
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
oniguruma.h
36.85 KB
lrw-r--r--
2014-09-05 04:42:09
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
re.h
1.47 KB
lrw-r--r--
2010-07-21 21:38:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
regex.h
890 B
lrw-r--r--
2010-07-21 21:38:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ruby.h
48.54 KB
lrw-r--r--
2013-06-18 18:40:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
st.h
4.54 KB
lrw-r--r--
2012-03-29 14:50:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
subst.h
374 B
lrw-r--r--
2011-12-05 05:29:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
thread.h
1.08 KB
lrw-r--r--
2012-11-28 13:01:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
util.h
2.09 KB
lrw-r--r--
2012-11-21 12:42:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
version.h
1.92 KB
lrw-r--r--
2012-01-06 14:13:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
vm.h
1.75 KB
lrw-r--r--
2010-12-02 11:06:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).