type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | void
_cpp_init_lexer (void)
{
#ifdef HAVE_init_vectorized_lexer
init_vectorized_lexer ();
#endif
} |
functions | void
_cpp_clean_line (cpp_reader *pfile)
{
cpp_buffer *buffer;
const uchar *s;
uchar c, *d, *p;
buffer = pfile->buffer;
buffer->cur_note = buffer->notes_used = 0;
buffer->cur = buffer->line_base = buffer->next_line;
buffer->need_line = false;
s = buffer->next_line;
if (!buffer->from_stage3)
{
... |
functions | else if (c == '?' && s[1] == '?' && _cpp_trigraph_map[s[2]])
{
/* Add a note regardless, for the benefit of -Wtrigraphs. */
add_line_note (buffer, d, s[2]);
if (CPP_OPTION (pfile, trigraphs))
{
*d = _cpp_trigraph_map[s[2]];
s += 2;
} |
functions | bool
warn_in_comment (cpp_reader *pfile, _cpp_line_note *note)
{
const uchar *p;
/* Within comments we don't warn about trigraphs, unless the
trigraph forms an escaped newline, as that may change
behavior. */
if (note->type != '/')
return false;
/* If -trigraphs, then this was an escaped newlin... |
functions | void
_cpp_process_line_notes (cpp_reader *pfile, int in_comment)
{
cpp_buffer *buffer = pfile->buffer;
for (;;)
{
_cpp_line_note *note = &buffer->notes[buffer->cur_note];
unsigned int col;
if (note->pos > buffer->cur)
break;
buffer->cur_note++;
col = CPP_BUF_COLUMN (buffer, not... |
functions | else if (_cpp_trigraph_map[note->type])
{
if (CPP_OPTION (pfile, warn_trigraphs)
&& (!in_comment || warn_in_comment (pfile, note)))
{
if (CPP_OPTION (pfile, trigraphs))
cpp_warning_with_line (pfile, CPP_W_TRIGRAPHS,
pfile->line_table->highest_line, col,
... |
functions | bool
_cpp_skip_block_comment (cpp_reader *pfile)
{
cpp_buffer *buffer = pfile->buffer;
const uchar *cur = buffer->cur;
uchar c;
cur++;
if (*cur == '/')
cur++;
for (;;)
{
/* People like decorating comments with '*', so check for '/'
instead for efficiency. */
c = *cur++;
if (c... |
functions | else if (c == '\n')
{
unsigned int cols;
buffer->cur = cur - 1;
_cpp_process_line_notes (pfile, true);
if (buffer->next_line >= buffer->rlimit)
return true;
_cpp_clean_line (pfile);
cols = buffer->next_line - buffer->line_base;
CPP_INCREMENT_LINE (pfile, cols);
cur = buffer->cur;
} |
functions | int
skip_line_comment (cpp_reader *pfile)
{
cpp_buffer *buffer = pfile->buffer;
source_location orig_line = pfile->line_table->highest_line;
while (*buffer->cur != '\n')
buffer->cur++;
_cpp_process_line_notes (pfile, true);
return orig_line != pfile->line_table->highest_line;
} |
functions | void
skip_whitespace (cpp_reader *pfile, cppchar_t c)
{
cpp_buffer *buffer = pfile->buffer;
bool saw_NUL = false;
do
{
/* Horizontal space always OK. */
if (c == ' ' || c == '\t')
;
/* Just \f \v or \0 left. */
else if (c == '\0')
saw_NUL = true;
else if (pfile->state.in_dir... |
functions | int
name_p (cpp_reader *pfile, const cpp_string *string)
{
unsigned int i;
for (i = 0; i < string->len; i++)
if (!is_idchar (string->text[i]))
return 0;
return 1;
} |
functions | void
warn_about_normalization (cpp_reader *pfile,
const cpp_token *token,
const struct normalize_state *s)
{
if (CPP_OPTION (pfile, warn_normalize) < NORMALIZE_STATE_RESULT (s)
&& !pfile->state.skipping)
{
/* Make sure that the token is printed using UCNs, even
if we'd otherwise happily p... |
functions | bool
forms_identifier_p (cpp_reader *pfile, int first,
struct normalize_state *state)
{
cpp_buffer *buffer = pfile->buffer;
if (*buffer->cur == '$')
{
if (!CPP_OPTION (pfile, dollars_in_ident))
return false;
buffer->cur++;
if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping... |
functions | void
lex_number (cpp_reader *pfile, cpp_string *number,
struct normalize_state *nst)
{
const uchar *cur;
const uchar *base;
uchar *dest;
base = pfile->buffer->cur - 1;
do
{
cur = pfile->buffer->cur;
/* N.B. ISIDNUM does not include $. */
while (ISIDNUM (*cur) || *cur == '.' || DI... |
functions | void
create_literal (cpp_reader *pfile, cpp_token *token, const uchar *base,
unsigned int len, enum cpp_ttype type)
{
uchar *dest = _cpp_unaligned_alloc (pfile, len + 1);
memcpy (dest, base, len);
dest[len] = '\0';
token->type = type;
token->val.str.len = len;
token->val.str.text = dest;
} |
functions | void
bufring_append (cpp_reader *pfile, const uchar *base, size_t len,
_cpp_buff **first_buff_p, _cpp_buff **last_buff_p)
{
_cpp_buff *first_buff = *first_buff_p;
_cpp_buff *last_buff = *last_buff_p;
if (first_buff == NULL)
first_buff = last_buff = _cpp_get_buff (pfile, len);
else if (len > BUFF_ROOM (la... |
functions | bool
is_macro(cpp_reader *pfile, const uchar *base)
{
const uchar *cur = base;
if (! ISIDST (*cur))
return false;
unsigned int hash = HT_HASHSTEP (0, *cur);
++cur;
while (ISIDNUM (*cur))
{
hash = HT_HASHSTEP (hash, *cur);
++cur;
} |
functions | void
lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
const uchar *cur)
{
uchar raw_prefix[17];
uchar temp_buffer[18];
const uchar *orig_base;
unsigned int raw_prefix_len = 0, raw_suffix_len = 0;
enum raw_str_phase { RAW_STR_PREFIX, RAW_STR, RAW_STR_SUFFIX } |
functions | else if (phase == RAW_STR_SUFFIX)
{
while (raw_suffix_len <= raw_prefix_len
&& raw_suffix_len < temp_buffer_len
&& temp_buffer[raw_suffix_len] == raw_prefix[raw_suffix_len])
raw_suffix_len++;
if (raw_suffix_len > raw_prefix_len)
break;
if (raw_suffix_len == temp_buffer_len)
continue;
p... |
functions | else if (c == '\n')
{
if (pfile->state.in_directive
|| (pfile->state.parsing_args
&& pfile->buffer->next_line >= pfile->buffer->rlimit))
{
cur--;
type = CPP_OTHER;
cpp_error_with_line (pfile, CPP_DL_ERROR, token->src_loc, 0,
"unterminated raw string");
break;
... |
functions | void
lex_string (cpp_reader *pfile, cpp_token *token, const uchar *base)
{
bool saw_NUL = false;
const uchar *cur;
cppchar_t terminator;
enum cpp_ttype type;
cur = base;
terminator = *cur++;
if (terminator == 'L' || terminator == 'U')
terminator = *cur++;
else if (terminator == 'u')
{
ter... |
functions | else if (c == '\n')
{
cur--;
/* Unmatched quotes always yield undefined behavior, but
greedy lexing means that what appears to be an unterminated
header name may actually be a legitimate sequence of tokens. */
if (terminator == '>')
{
token->type = CPP_LESS;
return;
} |
functions | void
store_comment (cpp_reader *pfile, cpp_token *token)
{
int len;
if (pfile->comments.allocated == 0)
{
pfile->comments.allocated = 256;
pfile->comments.entries = (cpp_comment *) xmalloc
(pfile->comments.allocated * sizeof (cpp_comment));
} |
functions | void
save_comment (cpp_reader *pfile, cpp_token *token, const unsigned char *from,
cppchar_t type)
{
unsigned char *buffer;
unsigned int len, clen, i;
len = pfile->buffer->cur - from + 1; /* + 1 for the initial '/'. */
/* C++ comments probably (not definitely) have moved past a new
line, which we... |
functions | bool
fallthrough_comment_p (cpp_reader *pfile, const unsigned char *comment_start)
{
const unsigned char *from = comment_start + 1;
switch (CPP_OPTION (pfile, cpp_warn_implicit_fallthrough))
{
/* For both -Wimplicit-fallthrough=0 and -Wimplicit-fallthrough=5 we
don't recognize any comments. The latter... |
functions | else if (*from == 'l')
{
size_t len = sizeof "int -fallthrough" - 1;
if ((size_t) (pfile->buffer->cur - from - 1) < len)
return false;
if (memcmp (from + 1, "int -fallthrough", len))
return false;
from += 1 + len;
while (*from == ' ' || *from == '\t')
from++;
} |
functions | else if (f == 'I' || f == 'i')
{
if ((size_t) (pfile->buffer->cur - from)
< sizeof "intentional fallthru" - 1)
return false;
if (f == 'I' && memcmp (from + 1, "NTENTIONAL",
sizeof "NTENTIONAL" - 1) == 0)
all_upper = true;
else if (memcmp (from + 1, "ntentional",
sizeof "ntentional... |
functions | else if (all_upper)
{
if (memcmp (from, "LY F", sizeof "LY F" - 1))
return false;
from += sizeof "LY " - 1;
} |
functions | void
_cpp_init_tokenrun (tokenrun *run, unsigned int count)
{
run->base = XNEWVEC (cpp_token, count);
run->limit = run->base + count;
run->next = NULL;
} |
functions | int
_cpp_remaining_tokens_num_in_context (cpp_context *context)
{
if (context->tokens_kind == TOKENS_KIND_DIRECT)
return (LAST (context).token - FIRST (context).token);
else if (context->tokens_kind == TOKENS_KIND_INDIRECT
|| context->tokens_kind == TOKENS_KIND_EXTENDED)
return (LAST (context).ptoken - ... |
functions | bool
_cpp_get_fresh_line (cpp_reader *pfile)
{
int return_at_eof;
/* We can't get a new line until we leave the current directive. */
if (pfile->state.in_directive)
return false;
for (;;)
{
cpp_buffer *buffer = pfile->buffer;
if (!buffer->need_line)
return true;
if (buffer->next_... |
functions | else if (! buffer->warned_cplusplus_comments)
{
cpp_error (pfile, CPP_DL_ERROR,
"C++ style comments are not allowed in ISO C90");
cpp_error (pfile, CPP_DL_ERROR,
"(this will be reported only once per input "
"file)");
buffer->warned_cplusplus_comments = 1;
} |
functions | else if (c == '=')
{
buffer->cur++;
result->type = CPP_DIV_EQ;
break;
} |
functions | else if (*buffer->cur == '<')
{
buffer->cur++;
IF_NEXT_IS ('=', CPP_LSHIFT_EQ, CPP_LSHIFT);
} |
functions | else if (*buffer->cur == '%')
{
buffer->cur++;
result->flags |= DIGRAPH;
result->type = CPP_OPEN_BRACE;
} |
functions | else if (*buffer->cur == '>')
{
buffer->cur++;
IF_NEXT_IS ('=', CPP_RSHIFT_EQ, CPP_RSHIFT);
} |
functions | else if (*buffer->cur == '>')
{
buffer->cur++;
result->flags |= DIGRAPH;
result->type = CPP_CLOSE_BRACE;
} |
functions | int
cpp_token_len (const cpp_token *token)
{
unsigned int len;
switch (TOKEN_SPELL (token))
{
default: len = 6; break;
case SPELL_LITERAL: len = token->val.str.len; break;
case SPELL_IDENT: len = NODE_LEN (token->val.node.node) * 10; break;
} |
functions | size_t
utf8_to_ucn (unsigned char *buffer, const unsigned char *name)
{
int j;
int ucn_len = 0;
int ucn_len_c;
unsigned t;
unsigned long utf32;
/* Compute the length of the UTF-8 sequence. */
for (t = *name; t & 0x80; t <<= 1)
ucn_len++;
utf32 = *name & (0x7F >> ucn_len);
for (ucn_len_c = 1... |
functions | void
cpp_output_token (const cpp_token *token, FILE *fp)
{
switch (TOKEN_SPELL (token))
{
case SPELL_OPERATOR:
{
const unsigned char *spelling;
int c;
if (token->flags & DIGRAPH)
spelling = cpp_digraph2name (token->type);
else if (token->flags & NAMED_OP)
goto spell_ident;
else
spelling =... |
functions | int
_cpp_equiv_tokens (const cpp_token *a, const cpp_token *b)
{
if (a->type == b->type && a->flags == b->flags)
switch (TOKEN_SPELL (a))
{
default: /* Keep compiler happy. */
case SPELL_OPERATOR:
/* token_no is used to track where multiple consecutive ##
tokens were originally located. ... |
functions | int
cpp_avoid_paste (cpp_reader *pfile, const cpp_token *token1,
const cpp_token *token2)
{
enum cpp_ttype a = token1->type, b = token2->type;
cppchar_t c;
if (token1->flags & NAMED_OP)
a = CPP_NAME;
if (token2->flags & NAMED_OP)
b = CPP_NAME;
c = EOF;
if (token2->flags & DIGRAPH)
c = digra... |
functions | void
cpp_output_line (cpp_reader *pfile, FILE *fp)
{
const cpp_token *token;
token = cpp_get_token (pfile);
while (token->type != CPP_EOF)
{
cpp_output_token (token, fp);
token = cpp_get_token (pfile);
if (token->flags & PREV_WHITE)
putc (' ', fp);
} |
functions | void
_cpp_release_buff (cpp_reader *pfile, _cpp_buff *buff)
{
_cpp_buff *end = buff;
while (end->next)
end = end->next;
end->next = pfile->free_buffs;
pfile->free_buffs = buff;
} |
functions | void
_cpp_extend_buff (cpp_reader *pfile, _cpp_buff **pbuff, size_t min_extra)
{
_cpp_buff *new_buff, *old_buff = *pbuff;
size_t size = EXTENDED_BUFF_SIZE (old_buff, min_extra);
new_buff = _cpp_get_buff (pfile, size);
memcpy (new_buff->base, old_buff->cur, BUFF_ROOM (old_buff));
new_buff->next = old_buff;
... |
functions | void
_cpp_free_buff (_cpp_buff *buff)
{
_cpp_buff *next;
for (; buff; buff = next)
{
next = buff->next;
#ifdef ENABLE_VALGRIND_ANNOTATIONS
free (buff);
#else
free (buff->base);
#endif
} |
functions | cpp_token_fld_kind
cpp_token_val_index (const cpp_token *tok)
{
switch (TOKEN_SPELL (tok))
{
case SPELL_IDENT:
return CPP_TOKEN_FLD_NODE;
case SPELL_LITERAL:
return CPP_TOKEN_FLD_STR;
case SPELL_OPERATOR:
if (tok->type == CPP_PASTE)
return CPP_TOKEN_FLD_TOKEN_NO;
else
return ... |
functions | void
cpp_force_token_locations (cpp_reader *r, source_location *p)
{
r->forced_token_location_p = p;
} |
functions | void
cpp_stop_forcing_token_locations (cpp_reader *r)
{
r->forced_token_location_p = NULL;
} |
includes |
#include <linux/fs.h> |
includes | #include <linux/module.h> |
includes | #include <linux/mm.h> |
includes | #include <linux/pagemap.h> |
includes | #include <linux/statfs.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/seq_file.h> |
includes | #include <linux/mount.h> |
includes | #include <linux/namei.h> |
defines |
#define FILE_HOSTFS_I(file) HOSTFS_I((file)->f_path.dentry->d_inode) |
defines |
#define HOSTFS_SUPER_MAGIC 0x00c0ffee |
structs | struct hostfs_inode_info {
int fd;
fmode_t mode;
struct inode vfs_inode;
}; |
functions | int hostfs_d_delete(const struct dentry *dentry)
{
return 1;
} |
functions | __init hostfs_args(char *options, int *add)
{
char *ptr;
ptr = strchr(options, ',');
if (ptr != NULL)
*ptr++ = '\0';
if (*options != '\0')
root_ino = options;
options = ptr;
while (options) {
ptr = strchr(options, ',');
if (ptr != NULL)
*ptr++ = '\0';
if (*options != '\0') {
if (!strcmp(options,... |
functions | int hostfs_statfs(struct dentry *dentry, struct kstatfs *sf)
{
/*
* do_statfs uses struct statfs64 internally, but the linux kernel
* struct statfs still has 32-bit versions for most of these fields,
* so we convert them here
*/
int err;
long long f_blocks;
long long f_bfree;
long long f_bavail;
long long... |
functions | void hostfs_evict_inode(struct inode *inode)
{
truncate_inode_pages(&inode->i_data, 0);
clear_inode(inode);
if (HOSTFS_I(inode)->fd != -1) {
close_file(&HOSTFS_I(inode)->fd);
HOSTFS_I(inode)->fd = -1;
} |
functions | void hostfs_i_callback(struct rcu_head *head)
{
struct inode *inode = container_of(head, struct inode, i_rcu);
kfree(HOSTFS_I(inode));
} |
functions | void hostfs_destroy_inode(struct inode *inode)
{
call_rcu(&inode->i_rcu, hostfs_i_callback);
} |
functions | int hostfs_show_options(struct seq_file *seq, struct dentry *root)
{
const char *root_path = root->d_sb->s_fs_info;
size_t offset = strlen(root_ino) + 1;
if (strlen(root_path) > offset)
seq_printf(seq, ",%s", root_path + offset);
return 0;
} |
functions | int hostfs_readdir(struct file *file, void *ent, filldir_t filldir)
{
void *dir;
char *name;
unsigned long long next, ino;
int error, len;
unsigned int type;
name = dentry_name(file->f_path.dentry);
if (name == NULL)
return -ENOMEM;
dir = open_dir(name, &error);
__putname(name);
if (dir == NULL)
return -... |
functions | int hostfs_file_open(struct inode *ino, struct file *file)
{
static DEFINE_MUTEX(open_mutex);
char *name;
fmode_t mode = 0;
int err;
int r = 0, w = 0, fd;
mode = file->f_mode & (FMODE_READ | FMODE_WRITE);
if ((mode & HOSTFS_I(ino)->mode) == mode)
return 0;
mode |= HOSTFS_I(ino)->mode;
retry:
if (mode & FM... |
functions | int hostfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
{
struct inode *inode = file->f_mapping->host;
int ret;
ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (ret)
return ret;
mutex_lock(&inode->i_mutex);
ret = fsync_file(HOSTFS_I(inode)->fd, datasync);
mutex_unlock... |
functions | int hostfs_writepage(struct page *page, struct writeback_control *wbc)
{
struct address_space *mapping = page->mapping;
struct inode *inode = mapping->host;
char *buffer;
unsigned long long base;
int count = PAGE_CACHE_SIZE;
int end_index = inode->i_size >> PAGE_CACHE_SHIFT;
int err;
if (page->index >= end_ind... |
functions | int hostfs_readpage(struct file *file, struct page *page)
{
char *buffer;
long long start;
int err = 0;
start = (long long) page->index << PAGE_CACHE_SHIFT;
buffer = kmap(page);
err = read_file(FILE_HOSTFS_I(file)->fd, &start, buffer,
PAGE_CACHE_SIZE);
if (err < 0)
goto out;
memset(&buffer[err], 0, PAGE_... |
functions | int hostfs_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata)
{
pgoff_t index = pos >> PAGE_CACHE_SHIFT;
*pagep = grab_cache_page_write_begin(mapping, index, flags);
if (!*pagep)
return -ENOMEM;
return 0;
} |
functions | int hostfs_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
struct inode *inode = mapping->host;
void *buffer;
unsigned from = pos & (PAGE_CACHE_SIZE - 1);
int err;
buffer = kmap(page);
err = write_file(FILE_HOSTFS_I(f... |
functions | int read_name(struct inode *ino, char *name)
{
dev_t rdev;
struct hostfs_stat st;
int err = stat_file(name, &st, -1);
if (err)
return err;
/* Reencode maj and min with the kernel encoding.*/
rdev = MKDEV(st.maj, st.min);
switch (st.mode & S_IFMT) {
case S_IFLNK:
ino->i_op = &hostfs_link_iops;
break;
ca... |
functions | int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
bool excl)
{
struct inode *inode;
char *name;
int error, fd;
inode = hostfs_iget(dir->i_sb);
if (IS_ERR(inode)) {
error = PTR_ERR(inode);
goto out;
} |
functions | int hostfs_link(struct dentry *to, struct inode *ino, struct dentry *from)
{
char *from_name, *to_name;
int err;
if ((from_name = dentry_name(from)) == NULL)
return -ENOMEM;
to_name = dentry_name(to);
if (to_name == NULL) {
__putname(from_name);
return -ENOMEM;
} |
functions | int hostfs_unlink(struct inode *ino, struct dentry *dentry)
{
char *file;
int err;
if (append)
return -EPERM;
if ((file = dentry_name(dentry)) == NULL)
return -ENOMEM;
err = unlink_file(file);
__putname(file);
return err;
} |
functions | int hostfs_symlink(struct inode *ino, struct dentry *dentry, const char *to)
{
char *file;
int err;
if ((file = dentry_name(dentry)) == NULL)
return -ENOMEM;
err = make_symlink(file, to);
__putname(file);
return err;
} |
functions | int hostfs_mkdir(struct inode *ino, struct dentry *dentry, umode_t mode)
{
char *file;
int err;
if ((file = dentry_name(dentry)) == NULL)
return -ENOMEM;
err = do_mkdir(file, mode);
__putname(file);
return err;
} |
functions | int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
{
char *file;
int err;
if ((file = dentry_name(dentry)) == NULL)
return -ENOMEM;
err = do_rmdir(file);
__putname(file);
return err;
} |
functions | int hostfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
{
struct inode *inode;
char *name;
int err;
inode = hostfs_iget(dir->i_sb);
if (IS_ERR(inode)) {
err = PTR_ERR(inode);
goto out;
} |
functions | int hostfs_rename(struct inode *from_ino, struct dentry *from,
struct inode *to_ino, struct dentry *to)
{
char *from_name, *to_name;
int err;
if ((from_name = dentry_name(from)) == NULL)
return -ENOMEM;
if ((to_name = dentry_name(to)) == NULL) {
__putname(from_name);
return -ENOMEM;
} |
functions | int hostfs_permission(struct inode *ino, int desired)
{
char *name;
int r = 0, w = 0, x = 0, err;
if (desired & MAY_NOT_BLOCK)
return -ECHILD;
if (desired & MAY_READ) r = 1;
if (desired & MAY_WRITE) w = 1;
if (desired & MAY_EXEC) x = 1;
name = inode_name(ino);
if (name == NULL)
return -ENOMEM;
if (S_ISC... |
functions | int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
{
struct inode *inode = dentry->d_inode;
struct hostfs_iattr attrs;
char *name;
int err;
int fd = HOSTFS_I(inode)->fd;
err = inode_change_ok(inode, attr);
if (err)
return err;
if (append)
attr->ia_valid &= ~ATTR_SIZE;
attrs.ia_valid = 0;
if... |
functions | void hostfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
{
char *s = nd_get_link(nd);
if (!IS_ERR(s))
__putname(s);
} |
functions | int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
{
struct inode *root_inode;
char *host_root_path, *req_root = d;
int err;
sb->s_blocksize = 1024;
sb->s_blocksize_bits = 10;
sb->s_magic = HOSTFS_SUPER_MAGIC;
sb->s_op = &hostfs_sbops;
sb->s_d_op = &hostfs_dentry_ops;
sb->s_maxbytes = MAX_... |
functions | void hostfs_kill_sb(struct super_block *s)
{
kill_anon_super(s);
kfree(s->s_fs_info);
} |
functions | __init init_hostfs(void)
{
return register_filesystem(&hostfs_type);
} |
functions | __exit exit_hostfs(void)
{
unregister_filesystem(&hostfs_type);
} |
defines | #define font_name_eq(pfn1,pfn2)\ |
defines | #define cpair ((cached_fm_pair *)vpair) |
defines | #define cc ((cached_char *)cch) |
functions | private RELOC_PTRS_BEGIN(cc_ptr_reloc_ptrs) {
} |
functions | int
gx_char_cache_alloc(gs_memory_t *mem, register gs_font_dir *pdir,
uint bmax, uint mmax, uint cmax, uint upper)
{ /* Since we use open hashing, we must increase cmax somewhat. */
uint chsize = (cmax + (cmax >> 1)) | 31;
cached_fm_pair *mdata;
cached_char **chars;
/* Round up chsize to a power of 2. */
while ... |
functions | void
gx_char_cache_init(register gs_font_dir *dir)
{ int i;
cached_fm_pair *pair;
char_cache_chunk *cck =
(char_cache_chunk *)gs_malloc(1, sizeof(char_cache_chunk),
"initial_chunk");
dir->fmcache.msize = 0;
dir->fmcache.mnext = 0;
gx_bits_cache_chunk_init(cck, NULL, 0);
gx_bits_cache_init((gx_bits_cache ... |
functions | void
gx_lookup_xfont(const gs_state *pgs, cached_fm_pair *pair, int encoding_index)
{ gx_device *dev = gs_currentdevice(pgs);
gx_device *fdev = (*dev_proc(dev, get_xfont_device))(dev);
gs_font *font = pair->font;
gx_xfont_procs *procs = (*dev_proc(fdev, get_xfont_procs))(fdev);
gx_xfont *xf = 0;
/* We mustn't att... |
functions | bool
purge_fm_pair_char(cached_char *cc, void *vpair)
{ return cc_pair(cc) == cpair;
} |
functions | bool
purge_fm_pair_char_xfont(cached_char *cc, void *vpair)
{ return cc_pair(cc) == cpair && cpair->xfont == 0 && !cc_has_bits(cc);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.