REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 4.22 KB
Close
//proc/thread-self/root/opt/alt/ruby19/include/ruby-1.9.1/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) 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; struct st_table_entry **bins; struct st_table_entry *head, *tail; }; #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_shift(st_table *, st_data_t *, st_data_t *); /* returns 0:notfound 1:deleted */ 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 *); int st_foreach(st_table *, int (*)(ANYARGS), 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: 16
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:50:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
defines.h
7.22 KB
lrw-r--r--
2012-01-03 10:12:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
digest.h
881 B
lrw-r--r--
2009-10-02 12:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dl.h
7.82 KB
lrw-r--r--
2012-02-14 20:09:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
encoding.h
13.60 KB
lrw-r--r--
2012-10-26 03:01:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
intern.h
31.54 KB
lrw-r--r--
2014-01-29 05:05:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
io.h
5.52 KB
lrw-r--r--
2011-05-04 01:07:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
missing.h
4.20 KB
lrw-r--r--
2013-03-29 04:23:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
oniguruma.h
34.46 KB
lrw-r--r--
2010-10-28 11:07:25
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
43.75 KB
lrw-r--r--
2013-06-26 08:11:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
st.h
4.22 KB
lrw-r--r--
2013-06-26 08:02:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
subst.h
375 B
lrw-r--r--
2010-08-07 22:19:17
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
util.h
2.09 KB
lrw-r--r--
2012-10-26 03:01:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
version.h
1.92 KB
lrw-r--r--
2010-08-23 21:08:19
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).