input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
int get_type_from_string(libspectrum_id_t *type, const char *string) {
libspectrum_class_t v3;
int error;
unsigned long v5;
v5 = __readfsqword(0x28u);
error = libspectrum_identify_file_with_class(type, &v3, string, 0, 0);
if (error)
return error;
if (v3 != libspectrum_class_t_LIBSPECTRUM_CLASS_TAPE |... | static int get_type_from_string(libspectrum_id_t *type, const char *string) {
libspectrum_class_t class;
int error;
error = libspectrum_identify_file_with_class(type, &class, string, NULL, 0);
if (error)
return error;
if (class != LIBSPECTRUM_CLASS_TAPE || *type == LIBSPECTRUM_ID_UNKNOWN)
*type = LI... | get_type_from_string | fuse-utils-1.4.3-r1 | app-emulation | O0/app-emulation/fuse-utils-1.4.3-r1/tapeconv | ida | O0 |
int is_filetype(const char *new_filename, const char *type) {
size_t v2;
size_t v3;
const char *v4;
int result;
v2 = strlen(new_filename);
result = 0;
if (v2 >= strlen(type)) {
v3 = strlen(new_filename);
v4 = &new_filename[v3 - strlen(type)];
if (!strcasecmp(v4, type))
return 1;
}
r... | static int is_filetype(const char *new_filename, const char *type) {
return (
strlen(new_filename) >= strlen(type) &&
!strcasecmp(new_filename + (strlen(new_filename) - strlen(type)), type));
} | is_filetype | fuse-utils-1.4.3-r1 | app-emulation | O0/app-emulation/fuse-utils-1.4.3-r1/tapeconv | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int v3;
char **argva;
int error;
int errora;
libspectrum_tape *tzx;
option long_options[3];
unsigned long v10;
v10 = __readfsqword(0x28u);
error = 0;
progname = (char *)*argv;
long_options[0].name = "help";
long_options[0].has_arg = 0;
... | int main(int argc, char **argv) {
int c, error = 0;
libspectrum_tape *tzx;
progname = argv[0];
struct option long_options[] = {
{"help", 0, NULL, 'h'}, {"version", 0, NULL, 'V'}, {0, 0, 0, 0}};
while ((c = getopt_long(argc, argv, "a:s:i:bhV", long_options, NULL)) != -1) {
switch (c) {
case ... | main | fuse-utils-1.4.3-r1 | app-emulation | O0/app-emulation/fuse-utils-1.4.3-r1/tapeconv | ida | O0 |
int remove_block_type(libspectrum_tape *tape, libspectrum_tape_type id) {
libspectrum_tape_iterator iterator;
libspectrum_tape_block *block;
unsigned long v5;
v5 = __readfsqword(0x28u);
for (block = (libspectrum_tape_block *)libspectrum_tape_iterator_init(
&iterator, tape);
block; block = (... | static int remove_block_type(libspectrum_tape *tape, libspectrum_tape_type id) {
libspectrum_tape_block *block;
libspectrum_tape_iterator iterator;
for (block = libspectrum_tape_iterator_init(&iterator, tape); block;
block = libspectrum_tape_iterator_next(&iterator)) {
if (libspectrum_tape_block_type(... | remove_block_type | fuse-utils-1.4.3-r1 | app-emulation | O0/app-emulation/fuse-utils-1.4.3-r1/tapeconv | ida | O0 |
void show_help() {
printf("Usage: %s [OPTION]... <infile> <outfile>\n"
"Converts between ZX Spectrum tape images.\n"
"\n"
"Options:\n"
" -a <archive info TZX>\n"
" Scan the TZX supplied for a Archive Info block and "
"dump\n"
" ... | static void show_help(void) {
printf("Usage: %s [OPTION]... <infile> <outfile>\n"
"Converts between ZX Spectrum tape images.\n"
"\n"
"Options:\n"
" -a <archive info TZX>\n"
" Scan the TZX supplied for a Archive Info block and "
"dump\n"
"... | show_help | fuse-utils-1.4.3-r1 | app-emulation | O0/app-emulation/fuse-utils-1.4.3-r1/tapeconv | ida | O0 |
void show_version() {
puts("tapeconv (fuse-utils) 1.4.3\n"
"Copyright (c) 2002-2008 Philip Kendall, Fredrick Meunier\n"
"License GPLv2+: GNU GPL version 2 or later "
"<http://gnu.org/licenses/gpl.html>\n"
"This is free software: you are free to change and redistribute it.\n"
"There ... | static void show_version(void) {
printf(PROGRAM_NAME
" (" PACKAGE ") " PACKAGE_VERSION "\n"
"Copyright (c) 2002-2008 Philip Kendall, Fredrick Meunier\n"
"License GPLv2+: GNU GPL version 2 or later "
"<http://gnu.org/licenses/gpl.html>\n"
"This is free software: you are fre... | show_version | fuse-utils-1.4.3-r1 | app-emulation | O0/app-emulation/fuse-utils-1.4.3-r1/tapeconv | ida | O0 |
int update_archive_file(char *archive_file, libspectrum_tape *tape) {
libspectrum_error error;
libspectrum_tape *tzx;
libspectrum_tape_iterator iterator;
libspectrum_tape_block *info_block;
unsigned long v7;
v7 = __readfsqword(0x28u);
if (read_tape(archive_file, &tzx))
return 1;
for (info_block = (... | static int update_archive_file(char *archive_file, libspectrum_tape *tape) {
libspectrum_tape_block *info_block;
libspectrum_error error;
libspectrum_tape *tzx;
libspectrum_tape_iterator iterator;
if (read_tape(archive_file, &tzx))
return 1;
info_block = libspectrum_tape_iterator_init(&iterator, tzx);... | update_archive_file | fuse-utils-1.4.3-r1 | app-emulation | O0/app-emulation/fuse-utils-1.4.3-r1/tapeconv | ida | O0 |
int write_tape(char *filename, libspectrum_tape *tape) {
libspectrum_id_t type;
libspectrum_byte *buffer;
size_t length[2];
length[1] = __readfsqword(0x28u);
if (get_type_from_string(&type, filename))
return 1;
length[0] = 0;
if ((unsigned int)libspectrum_tape_write(&buffer, length, tape,
... | static int write_tape(char *filename, libspectrum_tape *tape) {
libspectrum_byte *buffer;
size_t length;
libspectrum_id_t type;
int error;
if (get_type_from_string(&type, filename))
return 1;
length = 0;
if (libspectrum_tape_write(&buffer, &length, tape, type))
return 1;
error = write_file(f... | write_tape | fuse-utils-1.4.3-r1 | app-emulation | O0/app-emulation/fuse-utils-1.4.3-r1/tapeconv | ida | O0 |
unsigned char *LoadBMP(int *w, int *h) {
unsigned char *v3;
unsigned char v4;
unsigned char *v5;
unsigned char *v6;
unsigned char *v7;
unsigned char *v8;
unsigned char *v9;
unsigned char *v10;
unsigned char *v11;
unsigned char *v12;
unsigned char *v13;
int i;
int ia;
int ib;
int ic;
int ... | unsigned char *LoadBMP(w, h)
int *w;
int *h;
{
unsigned char buf[EB_SIZE_PAGE];
unsigned char *p;
unsigned char *bmp, *bmp_pointer, *bmp_end;
unsigned char *pal;
unsigned char *output, *output_pointer, *output_end;
int i;
long file_size;
int size;
int bitcount;
int compression;
int bWidth;
int x... | LoadBMP | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code can_menu_begin(EB_Book *book, EB_Appendix *appendix,
void *workbuf, EB_Hook_Code hook_code, int argc,
const unsigned int *argv) {
memset(can_word, 0, sizeof(can_word));
return 0;
} | EB_Error_Code can_menu_begin(book, appendix, workbuf, hook_code, argc, argv)
EB_Book *book;
EB_Appendix *appendix;
void *workbuf;
EB_Hook_Code hook_code;
int argc;
const unsigned int *argv;
{
memset(can_word, 0, sizeof(can_word));
return EB_SUCCESS;
} | can_menu_begin | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code can_menu_end(EB_Book *book, EB_Appendix *appendix, void *workbuf,
EB_Hook_Code hook_code, int argc,
const unsigned int *argv) {
multi_can *v6;
if (head) {
v6 = tail;
v6->next = (multi_can *)malloc(0x120u);
tail = tail->next;
} else {... | EB_Error_Code can_menu_end(book, appendix, workbuf, hook_code, argc, argv)
EB_Book *book;
EB_Appendix *appendix;
void *workbuf;
EB_Hook_Code hook_code;
int argc;
const unsigned int *argv;
{
#if MULTI_DEBUG
xprintf(">> can_word = %s\n", can_word);
#endif
if (head == 0) {
head = malloc(sizeof(struct multi_can));... | can_menu_end | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code can_menu_gaiji(EB_Book *book, EB_Appendix *appendix,
void *container, EB_Hook_Code hook_code, int argc,
const unsigned int *argv) {
char c;
char workbuf[40];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (hook_code == 20) {
c = 104... | EB_Error_Code can_menu_gaiji(book, appendix, container, hook_code, argc, argv)
EB_Book *book;
EB_Appendix *appendix;
void *container;
EB_Hook_Code hook_code;
int argc;
const unsigned int *argv;
{
char workbuf[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
char c;
switch (hook_code) {
case EB_HOOK_NARROW_FONT:
c = 'h... | can_menu_gaiji | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code can_menu_narrow_char(EB_Book *book, EB_Appendix *appendix,
void *container, EB_Hook_Code hook_code,
int argc, const unsigned int *argv) {
int out_code;
unsigned int in_code1;
unsigned char in_code2;
unsigned char outchars[3];
... | EB_Error_Code can_menu_narrow_char(book, appendix, container, hook_code, argc,
argv)
EB_Book *book;
EB_Appendix *appendix;
void *container;
EB_Hook_Code hook_code;
int argc;
const unsigned int *argv;
{
int in_code1, in_code2;
int out_code = 0;
unsigned char outchars[3];
in_co... | can_menu_narrow_char | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code can_menu_wide_char(EB_Book *book, EB_Appendix *appendix,
void *container, EB_Hook_Code hook_code,
int argc, const unsigned int *argv) {
unsigned char outchars[3];
unsigned long v8;
v8 = __readfsqword(0x28u);
outchars[0] = BYTE1(*ar... | EB_Error_Code can_menu_wide_char(book, appendix, container, hook_code, argc,
argv)
EB_Book *book;
EB_Appendix *appendix;
void *container;
EB_Hook_Code hook_code;
int argc;
const unsigned int *argv;
{
unsigned char outchars[3];
outchars[0] = argv[0] >> 8;
outchars[1] = argv[0] & 0... | can_menu_wide_char | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int check_book() {
if ((unsigned int)eb_is_bound(¤t_book))
return 1;
xputs("You should specify a book directory first");
return 0;
} | int check_book() {
if (eb_is_bound(¤t_book)) {
return 1;
} else {
xputs("You should specify a book directory first");
return 0;
}
} | check_book | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int check_subbook() {
EB_Subbook_Code code;
unsigned long v2;
v2 = __readfsqword(0x28u);
if (check_book()) {
if (!(unsigned int)eb_subbook(¤t_book, &code))
return 1;
xputs("You should select a subbook first");
}
return 0;
} | int check_subbook() {
if (check_book()) {
EB_Subbook_Code code;
if (EB_SUCCESS == eb_subbook(¤t_book, &code))
return 1;
else
xputs("You should select a subbook first");
}
return 0;
} | check_subbook | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_bmp(int argc, char **argv) {
const char *v2;
int *v3;
char *v4;
int *v5;
char *v6;
int firstpage;
unsigned int error_code;
ssize_t read_length;
char *bmp_error;
FILE *fp;
EB_Position pos;
unsigned char binary_data[2056];
unsigned long v14;
v14 = __readfsqword(0x28u);
firstpag... | void command_bmp(argc, argv) int argc;
char *argv[];
{
unsigned char binary_data[EB_SIZE_PAGE];
EB_Error_Code error_code;
ssize_t read_length;
FILE *fp;
EB_Position pos;
int firstpage = 1;
char *bmp_error = NULL;
#ifdef DOS_FILE_PATH
char *path;
#endif
if (argc != 3) {
printf("NG: parameter error... | command_bmp | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_bmp2ppm(int argc, char **argv) {
int w;
int h;
const char *ppm_error;
unsigned char *p;
FILE *fp;
EB_Position pos;
unsigned long v9;
v9 = __readfsqword(0x28u);
ppm_error = 0;
if (argc == 3) {
if (parse_entry_id(argv[1], &pos)) {
if ((unsigned int)eb_set_binary_color_graphic(&... | void command_bmp2ppm(argc, argv) int argc;
char *argv[];
{
EB_Error_Code error_code;
EB_Position pos;
int w, h;
FILE *fp;
unsigned char *p;
const char *ppm_error = NULL;
if (argc != 3) {
ppm_error = "parameter error";
goto ppm_fail2;
}
if (parse_entry_id(argv[1], &pos) == 0) {
ppm_error =... | command_bmp2ppm | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_bmp2tiff(int argc, char **argv) {
size_t v2;
size_t v3;
int binary_data_pointer;
int w;
int h;
unsigned int end;
int n_tags;
unsigned int base;
const char *tiff_error;
unsigned char *p;
FILE *fp;
EB_Position pos;
unsigned short dep[3];
unsigned char binary_data[2056];
unsigned... | void command_bmp2tiff(argc, argv) int argc;
char *argv[];
{
unsigned char binary_data[EB_SIZE_PAGE];
int binary_data_pointer;
EB_Error_Code error_code;
EB_Position pos;
unsigned int end, base;
int w, h;
FILE *fp;
unsigned char *p;
const unsigned short dep[3] = {8, 8, 8};
int n_tags;
const char *ti... | command_bmp2tiff | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_book(int argc, char **argv) {
EB_Error_Code error_code;
EB_Error_Code error_codea;
char temp[8200];
unsigned long v5;
v5 = __readfsqword(0x28u);
if (argc == 3) {
error_code = eb_bind_appendix(¤t_appendix, argv[2]);
if (error_code) {
xprintf("Invalid appendix directory: %s\n... | void command_book(argc, argv) int argc;
char *argv[];
{
EB_Error_Code error_code = EB_SUCCESS;
#ifdef DOS_FILE_PATH
char temp[PATH_MAX];
#endif
switch (argc) {
case 3:
#ifndef DOS_FILE_PATH
error_code = eb_bind_appendix(¤t_appendix, argv[2]);
if (EB_SUCCESS != error_code) {
xprintf("Invalid... | command_book | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_candidate(int argc, char **argv) {
int v2;
int v3;
if (argc == 3) {
v2 = atoi(argv[2]) - 1;
v3 = atoi(argv[1]);
show_entry_candidate(¤t_book, v3 - 1, v2);
} else {
output_multi_information(¤t_book);
}
} | void command_candidate(argc, argv) int argc;
char *argv[];
{
switch (argc) {
case 3:
show_entry_candidate(¤t_book, atoi(argv[1]) - 1, atoi(argv[2]) - 1);
break;
default:
output_multi_information(¤t_book);
break;
}
} | command_candidate | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_content(int argc, char **argv) {
int v2;
int begin;
int length;
const char *s;
EB_Position pos;
unsigned long v7;
v7 = __readfsqword(0x28u);
begin = 1;
s = salist_ref(variable_alist, "max-text");
if (s)
v2 = atoi(s) / 2048;
else
v2 = 0;
length = v2;
if (argc == 4) {
l... | void command_content(argc, argv) int argc;
char *argv[];
{
int begin, length;
char *s;
EB_Position pos;
begin = 1;
s = variable_ref("max-text");
length = s ? (atoi(s) / EB_SIZE_PAGE) : 0;
switch (argc) {
case 1:
xprintf("%s: too few arguments\n", argv[0]);
return;
case 4:
length = atoi(... | command_content | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_copyright(int argc, char **argv) {
EB_Position pos;
unsigned long v3;
v3 = __readfsqword(0x28u);
if (argc <= 1) {
if (check_subbook()) {
if ((unsigned int)eb_copyright(¤t_book, &pos))
xputs("Current dictionary has no copyright information.");
else
insert_conte... | void command_copyright(argc, argv) int argc;
char *argv[];
{
if (argc > 1) {
xprintf("%s: too many arguments\n", argv[0]);
return;
}
if (check_subbook()) {
EB_Position pos;
if (EB_SUCCESS != eb_copyright(¤t_book, &pos))
xputs("Current dictionary has no copyright information.");
el... | command_copyright | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_dump(int argc, char **argv) {
int v2;
int length;
const char *s;
EB_Position pos;
unsigned long v6;
v6 = __readfsqword(0x28u);
s = salist_ref(variable_alist, "max-dump");
if (s)
v2 = atoi(s) / 2048;
else
v2 = 1;
length = v2;
if (!v2)
length = 1;
if (argc == 4) {
len... | void command_dump(argc, argv) int argc;
char *argv[];
{
int begin, length;
char *s;
EB_Position pos;
begin = 1;
s = variable_ref("max-dump");
length = s ? (atoi(s) / EB_SIZE_PAGE) : (MAX_DUMP_SIZE / EB_SIZE_PAGE);
if (length == 0)
length = 1;
switch (argc) {
case 1:
xprintf("%s: too few argu... | command_dump | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_font(int argc, char **argv) {
if (argc <= 2) {
if (check_subbook() && internal_set_font(¤t_book, 0)) {
if (argc == 1)
insert_font_list(¤t_book);
else
insert_font(¤t_book, argv[1]);
}
} else {
xprintf("%s: too many arguments\n", *argv);
}
} | void command_font(argc, argv) int argc;
char *argv[];
{
if (argc > 2) {
xprintf("%s: too many arguments\n", argv[0]);
return;
}
if (check_subbook() && internal_set_font(¤t_book, NULL)) {
if (argc == 1)
insert_font_list(¤t_book);
else
insert_font(¤t_book, argv[1]);
... | command_font | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_help(int argc, char **argv) {
int i;
int ia;
const char *p;
char buff[264];
unsigned long v6;
v6 = __readfsqword(0x28u);
if (argc == 1) {
for (i = 0; command_table[i].name; ++i) {
sprintf(buff, "%s %s", command_table[i].name,
command_table[i].option_string);
xpr... | void command_help(argc, argv) int argc;
char *argv[];
{
int i;
char buff[256];
const char *p;
switch (argc) {
case 1:
for (i = 0; command_table[i].name != NULL; i++) {
sprintf(buff, "%s %s", command_table[i].name,
command_table[i].option_string);
xprintf(" %-22s - ", buff);
... | command_help | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_info(int argc, char **argv) {
const char *v2;
const char *v3;
int subcount;
EB_Disc_Code disccode;
EB_Character_Code charcode;
EB_Subbook_Code code[50];
unsigned long v8;
v8 = __readfsqword(0x28u);
if (argc <= 1) {
if (check_book()) {
eb_disc_type(¤t_book, &disccode);
... | void command_info(argc, argv) int argc;
char *argv[];
{
EB_Subbook_Code code[EB_MAX_SUBBOOKS];
if (argc > 1) {
xprintf("%s: too many arguments\n", argv[0]);
return;
}
if (check_book()) {
int subcount;
EB_Disc_Code disccode;
EB_Character_Code charcode;
eb_disc_type(¤t_book, &discc... | command_info | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_jpeg(int argc, char **argv) {
int v2;
int v3;
int *v4;
char *v5;
int i;
int lastchar;
int firstpage;
int canstop;
int file_length;
ssize_t read_length;
FILE *fp;
char *jpeg_error;
unsigned char *p;
EB_Position pos;
unsigned long v16;
v16 = __readfsqword(0x28u);
fp = 0;
... | void command_jpeg(argc, argv) int argc;
char *argv[];
{
static unsigned char binary_data[EB_SIZE_PAGE];
EB_Error_Code error_code;
ssize_t read_length;
EB_Position pos;
int i;
FILE *fp = NULL;
unsigned char *p;
int lastchar = 0;
int firstpage = 1;
int canstop = 1;
int file_length = 1000000;
char ... | command_jpeg | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_label(int argc, char **argv) {
int v2;
if (argc == 1) {
show_label(¤t_book, -1);
} else {
v2 = atoi(argv[1]);
show_label(¤t_book, v2 - 1);
}
} | void command_label(argc, argv) int argc;
char *argv[];
{
if (argc == 1) {
show_label(¤t_book, -1);
} else {
show_label(¤t_book, atoi(argv[1]) - 1);
}
} | command_label | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_list(int argc, char **argv) {
const char *v2;
int num;
EB_Error_Code error_code;
int i;
int j;
EB_Subbook_Code list[52];
char buff2[50][4100];
char buff[88];
unsigned long v10;
v10 = __readfsqword(0x28u);
error_code = 0;
if (argc <= 1) {
if (check_book()) {
error_code = e... | void command_list(argc, argv) int argc;
char *argv[];
{
EB_Error_Code error_code = EB_SUCCESS;
if (argc > 1) {
xprintf("%s: too many arguments\n", argv[0]);
return;
}
if (check_book()) {
int i, j, num;
char buff[EB_MAX_TITLE_LENGTH + 1];
char buff2[EB_MAX_SUBBOOKS][PATH_MAX + 4];
EB_Su... | command_list | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_menu(int argc, char **argv) {
EB_Position pos;
unsigned long v3;
v3 = __readfsqword(0x28u);
if (argc <= 1) {
if (check_subbook()) {
if ((unsigned int)eb_menu(¤t_book, &pos))
xputs("Current dictionary has no menu.");
else
insert_content(¤t_book, ¤t_... | void command_menu(argc, argv) int argc;
char *argv[];
{
if (argc > 1) {
xprintf("%s: too many arguments\n", argv[0]);
return;
}
if (check_subbook()) {
EB_Position pos;
if (EB_SUCCESS != eb_menu(¤t_book, &pos))
xputs("Current dictionary has no menu.");
else
insert_content(&cu... | command_menu | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_pbm(int argc, char **argv) {
int len;
int i;
int j;
int w;
int h;
int ret;
EB_Position pos;
unsigned long v9;
v9 = __readfsqword(0x28u);
if (argc == 4) {
w = atoi(argv[2]);
h = atoi(argv[3]);
parse_entry_id(argv[1], &pos);
ret = eb_seek_text(¤t_book, &pos);
if... | void command_pbm(argc, argv) int argc;
char *argv[];
{
static unsigned char buffer[MAX_BITMAP_SIZE];
EB_Position pos;
int len;
int ret;
int i;
int j;
int w, h;
if (argc != 4)
return;
w = atoi(argv[2]);
h = atoi(argv[3]);
parse_entry_id(argv[1], &pos);
ret = eb_seek_text(¤t_book, &p... | command_pbm | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_search(int argc, char **argv) {
int v2;
int begin;
int length;
const char *pattern;
char *patterna;
begin = 1;
pattern = salist_ref(variable_alist, "max-hits");
if (pattern)
v2 = atoi(pattern);
else
v2 = 0;
length = v2;
patterna = 0;
if (argc == 3) {
begin = atoi(argv[2... | void command_search(argc, argv) int argc;
char *argv[];
{
int begin, length;
char *pattern;
begin = 1;
pattern = variable_ref("max-hits");
length = pattern ? atoi(pattern) : 0;
pattern = NULL;
switch (argc) {
case 3:
begin = atoi(argv[2]);
case 2:
pattern = argv[1];
case 1:
if (check_s... | command_search | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_select(int argc, char **argv) {
EB_Subbook_Code code;
unsigned long v3;
v3 = __readfsqword(0x28u);
if (argc == 1) {
eb_unset_subbook(¤t_book);
eb_unset_appendix_subbook(¤t_appendix);
} else if (argc == 2) {
if (check_book() && parse_dict_id(argv[1], ¤t_book)) {
... | void command_select(argc, argv) int argc;
char *argv[];
{
switch (argc) {
case 1:
eb_unset_subbook(¤t_book);
eb_unset_appendix_subbook(¤t_appendix);
return;
case 2:
if (check_book()) {
if (parse_dict_id(argv[1], ¤t_book)) {
if (eb_is_appendix_bound(¤t_appendi... | command_select | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_set(int argc, char **argv) {
if (argc == 3)
goto LABEL_8;
if (argc <= 3) {
if (argc == 1) {
xprintf("%s: too few arguments\n", *argv);
return;
}
if (argc == 2) {
argv[2] = (char *)&unk_F07D;
LABEL_8:
variable_alist = salist_set(variable_alist, argv[1], argv[2... | void command_set(argc, argv) int argc;
char *argv[];
{
switch (argc) {
case 1:
xprintf("%s: too few arguments\n", argv[0]);
return;
case 2:
argv[2] = "";
case 3:
variable_set(argv[1], argv[2]);
return;
default:
xprintf("%s: too many arguments\n", argv[0]);
}
} | command_set | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_show(int argc, char **argv) {
char **argva;
int argca;
int showall;
StringAlist *var;
const char *s;
argca = argc;
argva = argv;
showall = 0;
if (argc == 2 && !strcmp(argv[1], "-a")) {
showall = 1;
argca = 1;
argva = argv + 1;
}
if (argca == 1) {
for (var = variable_a... | void command_show(argc, argv) int argc;
char *argv[];
{
char *s;
StringAlist *var;
int showall = 0;
if (argc == 2 && strcmp(argv[1], "-a") == 0) {
showall = 1;
argc--;
argv++;
}
switch (argc) {
case 1:
for (var = variable_alist; var != NULL; var = var->next)
if (var->key[0] != '_'... | command_show | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_subinfo(int argc, char **argv) {
int v2;
int num;
int i;
EB_Font_Code list[4];
char buff[4104];
unsigned long v7;
v7 = __readfsqword(0x28u);
if (argc > 1) {
xprintf("%s: too many arguments\n", *argv);
return;
}
if (check_subbook()) {
if (!(unsigned int)eb_subbook_title(&cur... | void command_subinfo(argc, argv) int argc;
char *argv[];
{
if (argc > 1) {
xprintf("%s: too many arguments\n", argv[0]);
return;
}
if (check_subbook()) {
int i, num;
char buff[PATH_MAX + 1];
EB_Font_Code list[EB_MAX_FONTS];
if (EB_SUCCESS == eb_subbook_title(¤t_book, buff)) {
... | command_subinfo | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_unset(int argc, char **argv) {
int i;
if (argc == 1) {
xprintf("%s: too few arguments\n", *argv);
} else {
for (i = 1; i < argc; ++i)
variable_alist = salist_set(variable_alist, argv[i], 0);
}
} | void command_unset(argc, argv) int argc;
char *argv[];
{
int i;
if (argc == 1) {
xprintf("%s: too few arguments\n", argv[0]);
} else {
for (i = 1; i < argc; i++)
variable_set(argv[i], NULL);
return;
}
} | command_unset | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void command_xbm(int argc, char **argv) {
int len;
int i;
int j;
int w;
int h;
int ret;
EB_Position pos;
unsigned long v9;
v9 = __readfsqword(0x28u);
if (argc == 4) {
w = atoi(argv[2]);
h = atoi(argv[3]);
parse_entry_id(argv[1], &pos);
ret = eb_seek_text(¤t_book, &pos);
if... | void command_xbm(argc, argv) int argc;
char *argv[];
{
static unsigned char buffer[MAX_BITMAP_SIZE];
EB_Position pos;
int len;
int ret;
int i;
int j;
int w, h;
if (argc != 4)
return;
w = atoi(argv[2]);
h = atoi(argv[3]);
parse_entry_id(argv[1], &pos);
ret = eb_seek_text(¤t_book, &p... | command_xbm | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int convert_nbsp(char *str, int len) {
while (len > 0) {
if ((unsigned char)*str == 160)
*str = 32;
++str;
--len;
}
return 1;
} | static int convert_nbsp(str, len)
char *str;
int len;
{
while (len > 0) {
if (((*str) & 0xff) == 0xa0)
*str = 0x20;
str++;
len--;
}
return 1;
} | convert_nbsp | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
size_t current_to_euc(char **in_buf, size_t *in_len, char **out_buf,
size_t *out_len) {
char v5;
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
char *v11;
int c1;
char c1a;
char c1b;
int c2;
int c2a;
int c2b;
size_t count;
size_t counta;
size_t countb;
size_t ... | size_t current_to_euc(in_buf, in_len, out_buf, out_len)
char **in_buf, **out_buf;
size_t *in_len, *out_len;
{
static int output_left = -1;
int c1, c2;
size_t count = 0;
#ifdef HAVE_ICONV
if (conv_mode == IO_ICONV) {
size_t ret;
if (cur_to_euc == (iconv_t)-1)
return CODECONV_ERROR;
ret = iconv... | current_to_euc | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
CONV_MODE detect_conv_mode(const char *encoding) {
const char **enc;
if (!encoding)
return CONV_MODE_IO_AUTO;
if (match_str(encoding, euc_jp_names))
return CONV_MODE_IO_EUC;
if (match_str(encoding, shift_jis_names))
return CONV_MODE_IO_SJIS;
if (match_str(encoding, iso_2022_jp_names)) {
for (... | enum CONV_MODE detect_conv_mode(encoding) const char *encoding;
{
if (encoding == NULL)
return IO_AUTO;
if (match_str(encoding, euc_jp_names))
return IO_EUC;
if (match_str(encoding, shift_jis_names))
return IO_SJIS;
#ifdef HAVE_ICONV
if (match_str(encoding, iso_2022_jp_names)) {
const char **enc... | detect_conv_mode | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code eblook_search_keyword(EB_Book *book, const char *pattern) {
int i;
EB_Error_Code error_code;
char *p;
char *keyword[7];
unsigned long v7;
v7 = __readfsqword(0x28u);
p = strdup(pattern);
keyword[0] = strtok(p, delim);
for (i = 1; i <= 6; ++i)
keyword[i] = strtok(0, delim);
error_co... | EB_Error_Code eblook_search_keyword(book, pattern)
EB_Book *book;
const char *pattern;
{
char *keyword[EB_MAX_KEYWORDS + 2];
EB_Error_Code error_code;
char *p = strdup(pattern);
int i;
keyword[0] = strtok(p, "=");
for (i = 1; i < EB_MAX_KEYWORDS + 2; i++)
keyword[i] = strtok(0, "=");
error_code = e... | eblook_search_keyword | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code eblook_search_multi(EB_Book *book, const char *pattern) {
char *v2;
int i;
int ia;
unsigned int multi_id;
EB_Error_Code error_code;
char *p;
char *candidate[7];
unsigned long v10;
v10 = __readfsqword(0x28u);
p = strdup(pattern);
v2 = salist_ref(variable_alist, "multi-search-id");
... | EB_Error_Code eblook_search_multi(book, pattern)
EB_Book *book;
const char *pattern;
{
char *candidate[EB_MAX_MULTI_ENTRIES + 2];
EB_Error_Code error_code;
char *p = strdup(pattern);
int i;
int multi_id = atoi(variable_ref("multi-search-id")) - 1;
#ifdef EBLOOK_SEARCH_MULTI_DEBUG
xprintf("multi_id = %d\n",... | eblook_search_multi | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
size_t euc_to_current(char **in_buf, size_t *in_len, char **out_buf,
size_t *out_len) {
char v5;
char *v6;
char *v7;
char *v8;
char *v9;
char v10;
char *v11;
char *v12;
char *v13;
char *v14;
int c1;
int c1a;
int c1b;
int c2;
int c2a;
size_t count;
size_t counta;
... | size_t euc_to_current(in_buf, in_len, out_buf, out_len)
char **in_buf, **out_buf;
size_t *in_len, *out_len;
{
static int output_left = -1;
int c1, c2;
size_t count = 0;
#ifdef HAVE_ICONV
if (conv_mode == IO_ICONV) {
size_t ret;
if (euc_to_cur == (iconv_t)-1)
return CODECONV_ERROR;
ret = iconv... | euc_to_current | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
char *euc_to_jis(char *jis, const char *euc, int len) {
const char *v3;
char v4;
char *v5;
const char *euca;
const char *euc_end;
char *q;
euca = euc;
for (euc_end = &euc[len];
euc_end >= euc + 2 && (!*(euc_end - 1) && !*(euc_end - 2) ||
*(euc_end - 1) == 33 && *(eu... | char *euc_to_jis(jis, euc, len)
char *jis;
const char *euc;
int len;
{
const char *euc_end;
char *q;
euc_end = euc + len;
while (euc_end >= euc + 2 && ((euc_end[-1] == '\0' && euc_end[-2] == '\0') ||
(euc_end[-1] == 0x21 && euc_end[-2] == 0x21)))
euc_end -= 2;
q = jis;
w... | euc_to_jis | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int excute_command(char *command_line) {
int i;
int argc;
char *argv[4096];
unsigned long v5;
v5 = __readfsqword(0x28u);
argc = parse_command_line(command_line, argv);
if (!argc)
return 1;
if (*argv[0] == 35 || *argv[0] == 59)
return 1;
if (!strcmp(argv[0], "quit"))
return 0;
for (i = 0... | int excute_command(command_line)
char *command_line;
{
int i, argc;
char *argv[BUFSIZ / 2];
argc = parse_command_line(command_line, argv);
if (argc == 0)
return 1;
if (argv[0][0] == '#' || argv[0][0] == ';')
return 1;
if (strcmp(argv[0], "quit") == 0)
return 0;
for (i = 0; command_table[i... | excute_command | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
multi_can *find_child(multi_can *can) {
while (can) {
if (can->child_pos.page || can->child_pos.offset) {
if (!can->child)
return can;
can = can->next;
} else {
can = can->next;
}
}
return 0;
} | struct multi_can *find_child(can)
struct multi_can *can;
{
while (can) {
if (can->child_pos.page == 0 && can->child_pos.offset == 0) {
#if MULTI_DEBUG
xprintf(">> %s noref skip\n", can->text);
#endif
can = can->next;
} else if (can->child != 0) {
#if MULTI_DEBUG
xprintf(">> %s has processed ... | find_child | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void free_candidates_tree(multi_can *can) {
multi_can *next;
do {
next = can->next;
free(can);
can = next;
} while (next);
} | void free_candidates_tree(can) struct multi_can *can;
{
struct multi_can *next;
do {
next = can->next;
#if MULTI_DEBUG
xfprintf(stderr, ">> freeing %s:%d\n", can->text, can);
xfprintf(stderr, ">> next is %s:%d\n", next->text, next);
#endif
free(can);
can = next;
} while (next);
} | free_candidates_tree | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
unsigned long get_dword(unsigned char *p) {
return ((unsigned long)p[1] << 8) + ((unsigned long)p[2] << 16) +
((unsigned long)p[3] << 24) + *p;
} | static unsigned long get_dword(p)
unsigned char *p;
{
unsigned char *buf;
buf = (unsigned char *)p;
return (((unsigned long)(buf[3])) << 24) + (((unsigned long)(buf[2])) << 16) +
(((unsigned long)(buf[1])) << 8) + (unsigned long)buf[0];
} | get_dword | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
unsigned short get_word(unsigned char *p) { return (p[1] << 8) + *p; } | static unsigned short get_word(p)
unsigned char *p;
{
unsigned char *buf;
buf = (unsigned char *)p;
return (((unsigned short)(buf[1])) << 8) + (unsigned short)(buf[0]);
} | get_word | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int hitcomp(const void *a, const void *b) {
if (*(_DWORD *)a < *(_DWORD *)b)
return -1;
if (*(_DWORD *)a != *(_DWORD *)b)
return 1;
if (*((_DWORD *)a + 1) < *((_DWORD *)b + 1))
return -1;
if (*((_DWORD *)a + 1) != *((_DWORD *)b + 1))
return 1;
if (*((_DWORD *)a + 2) < *((_DWORD *)b + 2))
r... | int hitcomp(a, b) const void *a;
const void *b;
{
const EB_Hit *x, *y;
x = (EB_Hit *)a;
y = (EB_Hit *)b;
if (x->heading.page < y->heading.page)
return -1;
if (x->heading.page == y->heading.page) {
if (x->heading.offset < y->heading.offset)
return -1;
if (x->heading.offset == y->heading.offse... | hitcomp | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code hook_decoration(EB_Book *book, EB_Appendix *appendix,
void *container, EB_Hook_Code code, int argc,
const unsigned int *argv) {
char buff[40];
unsigned long v8;
v8 = __readfsqword(0x28u);
if (!decorate_mode)
return 0;
switch (code)... | EB_Error_Code hook_decoration(book, appendix, container, code, argc, argv)
EB_Book *book;
EB_Appendix *appendix;
void *container;
EB_Hook_Code code;
int argc;
const unsigned int *argv;
{
char buff[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
if (decorate_mode == DECORATE_OFF)
return EB_SUCCESS;
switch (code) {
case... | hook_decoration | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code hook_euc_to_ascii(EB_Book *book, EB_Appendix *appendix,
void *container, EB_Hook_Code code, int argc,
const unsigned int *argv) {
int x;
unsigned int high;
unsigned int low;
if (!use_narrow_kana)
return eb_hook_euc_to_ascii(book,... | EB_Error_Code hook_euc_to_ascii(book, appendix, container, code, argc, argv)
EB_Book *book;
EB_Appendix *appendix;
void *container;
EB_Hook_Code code;
int argc;
const unsigned int *argv;
{
int high, low;
static unsigned char table21[] = "Z\xa4\xa1ZZ\xa5ZZZZ\xde\xdfZZZZ"
"ZZZZZZZZ... | hook_euc_to_ascii | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code hook_font(EB_Book *book, EB_Appendix *appendix, void *container,
EB_Hook_Code code, int argc, const unsigned int *argv) {
char buff[40];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (code == 20) {
if ((unsigned int)eb_narrow_alt_character_text(appendix, *argv, buff)... | EB_Error_Code hook_font(book, appendix, container, code, argc, argv)
EB_Book *book;
EB_Appendix *appendix;
void *container;
EB_Hook_Code code;
int argc;
const unsigned int *argv;
{
char buff[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
switch (code) {
case EB_HOOK_NARROW_FONT:
if (EB_SUCCESS != eb_narrow_alt_characte... | hook_font | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code hook_img(EB_Book *book, EB_Appendix *appendix, void *container,
EB_Hook_Code code, int argc, const unsigned int *argv) {
switch (code) {
case 26:
if (argv[2] && argv[3]) {
sprintf(buff_6, "<img=mono:%dx%d>", argv[3], argv[2]);
eb_write_text_string(book, buff_6);
... | EB_Error_Code hook_img(book, appendix, container, code, argc, argv)
EB_Book *book;
EB_Appendix *appendix;
void *container;
EB_Hook_Code code;
int argc;
const unsigned int *argv;
{
static int imgW, imgH, page, offset;
static char buff[EB_MAX_ALTERNATION_TEXT_LENGTH + 1];
switch (code) {
case EB_HOOK_BEGIN_COLOR... | hook_img | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code hook_tags(EB_Book *book, EB_Appendix *appendix, void *container,
EB_Hook_Code code, int argc, const unsigned int *argv) {
char buff[1032];
unsigned long v8;
v8 = __readfsqword(0x28u);
switch (code) {
case 13:
case 16:
strcpy(buff, "<reference>");
eb_write_text_... | EB_Error_Code hook_tags(book, appendix, container, code, argc, argv)
EB_Book *book;
EB_Appendix *appendix;
void *container;
EB_Hook_Code code;
int argc;
const unsigned int *argv;
{
char buff[1024];
switch (code) {
case EB_HOOK_BEGIN_REFERENCE:
case EB_HOOK_BEGIN_CANDIDATE:
strcpy(buff, "<reference>");
... | hook_tags | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int iconv_setup(const char *current_code_name) {
iconv_t ctoe;
iconv_t etoc;
if (disable_iconv_5)
return 0;
if (eucjp_code_name || setup_eucjp_code_name()) {
if (current_code_name && eucjp_code_name) {
ctoe = iconv_open(eucjp_code_name, current_code_name);
etoc = iconv_open(current_code_nam... | static int iconv_setup(current_code_name) const char *current_code_name;
{
iconv_t ctoe, etoc;
static int disable_iconv = 0;
if (disable_iconv)
return 0;
if (eucjp_code_name == NULL) {
if (!setup_eucjp_code_name()) {
disable_iconv = 1;
return 0;
}
}
if (current_code_name == NULL ||... | iconv_setup | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int iconv_test(iconv_t ctoe, iconv_t etoc) {
size_t v3;
char *test1;
char *test2;
char *test3;
size_t ilen;
size_t olen;
char test1_0[64];
char test2_0[50];
char test3_0[56];
unsigned long v12;
v12 = __readfsqword(0x28u);
if (ctoe == (iconv_t)-1LL || etoc == (iconv_t)-1LL)
return 0;
*(_DW... | static int iconv_test(ctoe, etoc)
iconv_t ctoe, etoc;
{
#define TEST_STRING "\xBC\xC2\xB8\xB3"
#define TEST_LENGTH 50
char test1_0[TEST_LENGTH], test2_0[TEST_LENGTH], test3_0[TEST_LENGTH];
char *test1, *test2, *test3;
size_t ilen, olen;
if (ctoe == (iconv_t)-1 || etoc == (iconv_t)-1)
return 0;
strcpy(te... | iconv_test | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int insert_content(EB_Book *book, EB_Appendix *appendix, EB_Position *pos,
int begin, int length) {
const char *v5;
char last;
int point;
unsigned int error_code;
ssize_t len;
FILE *outFP;
char buff[2056];
unsigned long v16;
v16 = __readfsqword(0x28u);
last = 10;
outFP = stdout... | int insert_content(book, appendix, pos, begin, length)
EB_Book *book;
EB_Appendix *appendix;
EB_Position *pos;
int begin;
int length;
{
int point;
ssize_t len;
char last = '\n';
char buff[EB_SIZE_PAGE];
EB_Error_Code error_code = EB_SUCCESS;
FILE *outFP = stdout;
point = 0;
error_code = eb_seek_text(bo... | insert_content | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int insert_dump(EB_Book *book, EB_Appendix *appendix, EB_Position *pos,
int length) {
const char *v4;
const char *v5;
int page;
int i;
int ia;
int count;
int ret_code;
unsigned int error_code;
unsigned int error_codea;
ssize_t len;
long position;
FILE *outFP;
unsigned char buff... | int insert_dump(book, appendix, pos, length)
EB_Book *book;
EB_Appendix *appendix;
EB_Position *pos;
int length;
{
int page;
ssize_t len;
unsigned char buff[EB_SIZE_PAGE];
EB_Error_Code error_code = EB_SUCCESS;
int i, count;
long position;
FILE *outFP = stdout;
int ret_code = 0;
#ifdef USE_PAGER
if (... | insert_dump | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int insert_font(EB_Book *book, const char *id) {
int v2;
const char *v4;
int width;
int height;
int start;
int end;
EB_Error_Code error_code;
int ch_0;
size_t size;
char bitmap[288];
char xbm[1896];
unsigned long v14;
v14 = __readfsqword(0x28u);
error_code = 0;
v2 = *id;
if (v2 != 104) ... | int insert_font(book, id)
EB_Book *book;
const char *id;
{
int ch, width, height, start, end;
size_t size;
char bitmap[EB_SIZE_WIDE_FONT_48];
char xbm[EB_SIZE_WIDE_FONT_48_XBM];
EB_Error_Code error_code = EB_SUCCESS;
switch (*id) {
case 'h':
ch = strtol(id + 1, NULL, 16);
eb_narrow_font_start(boo... | insert_font | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int insert_font_list(EB_Book *book) {
int width;
int height;
int start;
int end;
int ch_0;
size_t size;
char bitmap[288];
char xbm[1896];
unsigned long v10;
v10 = __readfsqword(0x28u);
eb_font_height(book, &height);
eb_narrow_font_width(book, &width);
eb_narrow_font_start(book, &start);
eb_... | int insert_font_list(book)
EB_Book *book;
{
int ch, width, height, start, end;
size_t size;
char bitmap[EB_SIZE_WIDE_FONT_48];
char xbm[EB_SIZE_WIDE_FONT_48_XBM];
eb_font_height(book, &height);
eb_narrow_font_width(book, &width);
eb_narrow_font_start(book, &start);
eb_narrow_font_end(book, &end);
f... | insert_font_list | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
EB_Error_Code insert_prev_next(EB_Book *book, EB_Appendix *appendix,
EB_Position *pos, FILE *fp) {
EB_Error_Code error_code;
EB_Error_Code error_codea;
EB_Error_Code error_codeb;
EB_Error_Code error_codec;
EB_Error_Code error_coded;
EB_Error_Code error_codee;
EB_Error_Code e... | static EB_Error_Code insert_prev_next(book, appendix, pos, fp)
EB_Book *book;
EB_Appendix *appendix;
EB_Position *pos;
FILE *fp;
{
EB_Error_Code error_code;
EB_Position pos_temp;
char head[BUFSIZ];
ssize_t heading_len;
error_code = eb_seek_text(book, pos);
if (error_code != EB_SUCCESS)
return error_cod... | insert_prev_next | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int internal_set_font(EB_Book *book, char *height) {
const char *v3;
const char *heighta;
EB_Font_Code font;
unsigned int fonta;
unsigned int error_code;
heighta = height;
if (!height) {
heighta = salist_ref(variable_alist, "font");
if (!heighta)
heighta = "16";
}
font = atoi(heighta);
... | int internal_set_font(book, height)
EB_Book *book;
char *height;
{
EB_Font_Code font;
EB_Error_Code error_code = EB_SUCCESS;
if (height == NULL)
if ((height = variable_ref("font")) == NULL)
height = "16";
font = atoi(height);
switch (font) {
case 16:
font = EB_FONT_16;
break;
case 24:
... | internal_set_font | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
char *jis_to_euc(char *euc, const char *jis, int len) {
const char *v3;
char v4;
char *v5;
const char *jisa;
const char *jis_end;
char *q;
jisa = jis;
for (jis_end = &jis[len];
jis_end >= jis + 2 && (!*(jis_end - 1) && !*(jis_end - 2) ||
*(jis_end - 1) == 33 && *(ji... | char *jis_to_euc(euc, jis, len)
char *euc;
const char *jis;
int len;
{
const char *jis_end;
char *q;
jis_end = jis + len;
while (jis_end >= jis + 2 && ((jis_end[-1] == '\0' && jis_end[-2] == '\0') ||
(jis_end[-1] == 0x21 && jis_end[-2] == 0x21)))
jis_end -= 2;
q = euc;
w... | jis_to_euc | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int locale_init(const char *encoding) {
CONV_MODE cm_temp;
const char *try2;
locale_name_4 = setlocale(0, &locale);
cm_temp = detect_conv_mode(encoding);
if (cm_temp) {
conv_mode = cm_temp;
} else {
if (initialized_3 &&
(conv_mode != CONV_MODE_IO_ICONV ||
cur_to_euc != (iconv_t)-1L... | int locale_init(encoding) const char *encoding;
{
static int initialized = 0;
#ifdef HAVE_SETLOCALE
static char *locale_name = NULL;
static char *current_code_name = NULL;
#endif
enum CONV_MODE cm_temp;
#ifdef HAVE_SETLOCALE
locale_name = setlocale(LC_CTYPE, "");
#endif
cm_temp = detect_conv_mode(encoding... | locale_init | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int match_str(const char *str, const char **str_list) {
while (*str_list) {
if (!strcasecmp(str, *str_list))
return 1;
++str_list;
}
return 0;
} | static int match_str(str, str_list) const char *str;
const char **str_list;
{
const char **ptr;
for (ptr = str_list; *ptr != NULL; ptr++) {
if (strcasecmp(str, *ptr) == 0)
return 1;
}
return 0;
} | match_str | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void output_multi_information(EB_Book *book) {
const char *v1;
const char *v2;
const char *v3;
int multi_count;
int entry_count;
int i;
int j;
EB_Error_Code error_code;
EB_Position pos;
int entry_list[8];
EB_Multi_Search_Code multi_list[12];
char entry_label[40];
unsigned long v13;
v13 = __... | static void output_multi_information(book) EB_Book *book;
{
EB_Error_Code error_code;
EB_Multi_Search_Code multi_list[EB_MAX_MULTI_SEARCHES];
EB_Multi_Entry_Code entry_list[EB_MAX_MULTI_ENTRIES];
int multi_count;
int entry_count;
char entry_label[EB_MAX_MULTI_LABEL_LENGTH + 1];
int i, j;
error_code = e... | output_multi_information | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int parse_command_line(char *command_line, char **argv) {
int v2;
int v3;
int v4;
int num;
int reserved;
_BOOL4 in_quote;
in_quote = 0;
reserved = 0;
num = 0;
while (*command_line) {
v2 = *command_line;
if (v2 == 92) {
strcpy(command_line, command_line + 1);
LABEL_15:
if (!r... | int parse_command_line(command_line, argv)
char *command_line;
char *argv[];
{
int num;
int reserved, in_quote;
char *p;
num = reserved = in_quote = 0;
for (p = command_line; *p != '\0'; p++) {
switch (*p) {
case '"':
if (!reserved) {
argv[num++] = p;
reserved = 1;
}
... | parse_command_line | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int parse_dict_id(char *name, EB_Book *book) {
const char *v3;
const char *namea;
int num;
int i;
EB_Error_Code error_code;
EB_Subbook_Code sublist[52];
char dir[4104];
unsigned long v10;
namea = name;
v10 = __readfsqword(0x28u);
error_code = 0;
error_code = eb_subbook_list(book, sublist, &num)... | int parse_dict_id(name, book)
char *name;
EB_Book *book;
{
int i, num;
EB_Subbook_Code sublist[EB_MAX_SUBBOOKS];
EB_Error_Code error_code = EB_SUCCESS;
#ifdef _DEBUG
memset(sublist, -1, sizeof(sublist));
#endif
error_code = eb_subbook_list(book, sublist, &num);
if (EB_SUCCESS != error_code)
goto error... | parse_dict_id | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int parse_entry_id(char *code, EB_Position *pos) {
const char *v3;
int count;
unsigned int error_code;
char *num;
const char *pattern;
EB_Hit list[256];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (strchr(code, 58)) {
pos->page = strtol(code, &num, 0);
if (*num != 58 || (pos->offset = str... | int parse_entry_id(code, pos)
char *code;
EB_Position *pos;
{
EB_Error_Code error_code = EB_SUCCESS;
if (strchr(code, ':') != NULL) {
char *endp;
pos->page = strtol(code, &endp, 0);
if (*endp != ':')
goto illegal;
pos->offset = strtol(endp + 1, &endp, 0);
if (*endp != '\0')
goto i... | parse_entry_id | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int process_child(EB_Book *book, multi_can *can) {
int buflen;
EB_Error_Code error_code;
char buf[2048];
unsigned long v6;
v6 = __readfsqword(0x28u);
error_code = eb_seek_text(book, &can->child_pos);
eb_read_text(book, 0, &multi_candidate_hookset, 0, 2047, buf, &buflen);
tail->terminated = 1;
return ... | int process_child(book, can)
EB_Book *book;
struct multi_can *can;
{
EB_Error_Code error_code;
char buf[2048];
int buflen;
#if MULTI_DEBUG
xprintf(">> seeking %d:%d\n", can->child_pos.page, can->child_pos.offset);
#endif
error_code = eb_seek_text(book, &can->child_pos);
#if MULTI_DEBUG
xprintf(">> eb_seek_... | process_child | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
char *read_command(char *command_line, int size, FILE *stream) {
char *p;
char *pa;
if (!xfgets(command_line, size, stream))
return 0;
p = strchr(command_line, 13);
if (p) {
*p = 0;
} else {
pa = strchr(command_line, 10);
if (pa) {
*pa = 0;
} else if (!feof(stream)) {
xputs(... | char *read_command(command_line, size, stream)
char *command_line;
int size;
FILE *stream;
{
char *p;
if (xfgets(command_line, size, stream) == NULL)
return NULL;
if ((p = strchr(command_line, '\r')) != NULL) {
*p = '\0';
} else if ((p = strchr(command_line, '\n')) != NULL) {
*p = '\0';
} else i... | read_command | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
ssize_t read_data_from_eb(unsigned char *buf, int len) {
ssize_t read_length;
ssize_t count;
unsigned long v6;
v6 = __readfsqword(0x28u);
count = 0;
while (len > 0) {
if ((unsigned int)eb_read_binary(¤t_book, len, buf, &read_length))
return -1;
if (!read_length)
return -1;
len... | static ssize_t read_data_from_eb(buf, len)
unsigned char *buf;
int len;
{
ssize_t read_length;
ssize_t count = 0;
while (len > 0) {
if (eb_read_binary(¤t_book, len, (char *)buf, &read_length) !=
EB_SUCCESS)
return -1;
if (read_length == 0)
return -1;
len -= read_length;
c... | read_data_from_eb | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
unsigned long read_dword_from_eb() {
unsigned char buf[4];
unsigned long v2;
v2 = __readfsqword(0x28u);
if (read_data_from_eb(buf, 4) == 4)
return ((unsigned long)buf[1] << 8) + ((unsigned long)buf[2] << 16) +
((unsigned long)buf[3] << 24) + buf[0];
else
return -1;
} | static unsigned long read_dword_from_eb() {
unsigned char buf[4];
if (read_data_from_eb(buf, 4) == 4)
return (((unsigned long)(buf[3])) << 24) +
(((unsigned long)(buf[2])) << 16) +
(((unsigned long)(buf[1])) << 8) + (unsigned long)buf[0];
return (unsigned long)-1;
} | read_dword_from_eb | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
char *salist_ref(StringAlist *alist, const char *key) {
while (alist) {
if (!strcmp(key, alist->key))
return alist->value;
alist = alist->next;
}
return 0;
} | char *salist_ref(alist, key)
StringAlist *alist;
const char *key;
{
StringAlist *var;
for (var = alist; var != NULL; var = var->next)
if (strcmp(key, var->key) == 0)
return var->value;
return NULL;
} | salist_ref | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
StringAlist *salist_set(StringAlist *alist, const char *key,
const char *value) {
StringAlist *alista;
StringAlist *var;
StringAlist *vara;
StringAlist *varb;
StringAlist *prev;
StringAlist *prev_0;
char *p;
alista = alist;
if (value) {
prev = 0;
for (var = alist; var;... | StringAlist *salist_set(alist, key, value)
StringAlist *alist;
const char *key;
const char *value;
{
StringAlist *var;
if (value) {
StringAlist *prev = NULL;
for (var = alist; var != NULL; var = var->next) {
if (strcmp(key, var->key) == 0) {
char *p = strdup(value);
if (p != NULL) {... | salist_set | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int search_pattern(EB_Book *book, EB_Appendix *appendix, char *pattern,
int begin, int length) {
const char *v6;
const char *patterna;
int num;
int i;
int point;
int prevpage;
int prevoffset;
EB_Error_Code error_code;
ssize_t heading_len;
char *head;
const char *s;
EB_Error_Co... | int search_pattern(book, appendix, pattern, begin, length)
EB_Book *book;
EB_Appendix *appendix;
char *pattern;
int begin;
int length;
{
int i, num, point;
char headbuf1[BUFSIZ];
char headbuf2[BUFSIZ];
char *head;
const char *s;
EB_Error_Code (*search)(EB_Book *, const char *);
EB_Hit hitlist[MAX_HIT_SIZE... | search_pattern | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void set_error_message(EB_Error_Code error_code) {
int *v1;
char *v2;
const char *v3;
v1 = __errno_location();
v2 = strerror(*v1);
variable_alist = salist_set(variable_alist, "_error", v2);
v3 = (const char *)eb_error_message((unsigned int)error_code);
variable_alist = salist_set(variable_alist, "_eb_e... | void set_error_message(error_code) EB_Error_Code error_code;
{
variable_set("_error", strerror(errno));
variable_set("_eb_error", eb_error_message(error_code));
} | set_error_message | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int setup_eucjp_code_name() {
const char **enc;
const char **enca;
iconv_t ic;
iconv_t ica;
if (!eucjp_code_name) {
for (enc = euc_jp_names; *enc; ++enc) {
ic = iconv_open(*enc, *enc);
if (ic != (iconv_t)-1LL) {
eucjp_code_name = *enc;
iconv_close(ic);
break;
}
... | static int setup_eucjp_code_name() {
const char **enc;
iconv_t ic;
if (eucjp_code_name == NULL) {
for (enc = euc_jp_names; *enc != NULL; enc++) {
ic = iconv_open(*enc, *enc);
if (ic != (iconv_t)-1) {
eucjp_code_name = *enc;
iconv_close(ic);
break;
}
}
if (eucj... | setup_eucjp_code_name | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int show_candidate(EB_Book *book, EB_Position pos0) {
const char *v2;
const char *v4;
EB_Position pos0a;
EB_Book *booka;
int buflen;
EB_Error_Code error_code;
multi_can *child;
multi_can *ptail;
char buf[2048];
unsigned long v12;
booka = book;
pos0a = pos0;
v12 = __readfsqword(0x28u);
error... | int show_candidate(book, pos0)
EB_Book *book;
EB_Position pos0;
{
char buf[2048];
int buflen;
struct multi_can *child, *ptail;
EB_Error_Code error_code = EB_SUCCESS;
eb_initialize_hookset(&multi_candidate_hookset);
eb_set_hooks(&multi_candidate_hookset, multi_candidate_hooks);
error_code = eb_seek_text(... | show_candidate | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void show_candidates_level(multi_can *can, int level) {
unsigned int v2;
char *indent;
indent = (char *)malloc(level + 1);
if (indent) {
memset(indent, 9, level);
indent[level] = 0;
while (1) {
v2 = can->child ? 32 : 42;
xprintf("%s%c%s\n", indent, v2, can->text);
if (can->child)
... | void show_candidates_level(can, level) struct multi_can *can;
int level;
{
char *indent;
indent = malloc(level + 1);
if (!indent) {
xputs("memory full");
return;
}
memset(indent, '\t', level);
*(indent + level) = '\0';
while (1) {
xprintf("%s%c%s\n", indent, can->child ? ' ' : '*', can->text... | show_candidates_level | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void show_entry_candidate(EB_Book *book, int search_id, int entry_id) {
const char *v3;
const char *v4;
const char *v5;
int multi_count;
int entry_count;
EB_Error_Code error_code;
EB_Position candidate_pos;
int entry_list[8];
EB_Multi_Search_Code multi_list[10];
unsigned long v13;
v13 = __readfsq... | void show_entry_candidate(book, search_id, entry_id) EB_Book *book;
int search_id;
int entry_id;
{
EB_Error_Code error_code;
EB_Multi_Search_Code multi_list[EB_MAX_MULTI_SEARCHES];
EB_Multi_Entry_Code entry_list[EB_MAX_MULTI_ENTRIES];
EB_Position candidate_pos;
int multi_count;
int entry_count;
if (!eb_... | show_entry_candidate | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void show_help() {
xfprintf(stderr,
"Usage: %s [option...] [book-directory [appendix-directory]]\n",
program_name);
xfprintf(stderr, "Options:\n");
xfprintf(stderr, " -e, --encoding=NAME specify input/output encoding\n");
xfprintf(stderr, " -q, --no-init-file ignore user init file\n... | void show_help() {
xfprintf(stderr,
"Usage: %s [option...] [book-directory [appendix-directory]]\n",
program_name);
xfprintf(stderr, "Options:\n");
xfprintf(stderr, " -e, --encoding=NAME specify input/output encoding\n");
xfprintf(stderr, " -q, --no-init-file ignore user init file\n... | show_help | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void show_label(EB_Book *book, int id) {
const char *v2;
const char *v3;
const char *v4;
int multi_count;
int entry_count;
int i;
int j;
EB_Error_Code error_code;
int entry_list[8];
EB_Multi_Search_Code multi_list[12];
char entry_label[40];
unsigned long v13;
v13 = __readfsqword(0x28u);
if ... | void show_label(book, id) EB_Book *book;
int id;
{
EB_Error_Code error_code;
EB_Multi_Search_Code multi_list[EB_MAX_MULTI_SEARCHES];
EB_Multi_Entry_Code entry_list[EB_MAX_MULTI_ENTRIES];
char entry_label[EB_MAX_MULTI_LABEL_LENGTH + 1];
int multi_count;
int entry_count;
int i, j;
if (!eb_have_multi_sear... | show_label | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void show_try_help() {
xfprintf(stderr, "Try `%s --help' for more information.\n", invoked_name);
fflush(stderr);
} | void show_try_help() {
xfprintf(stderr, "Try `%s --help' for more information.\n", invoked_name);
fflush(stderr);
} | show_try_help | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void show_version() {
xprintf("%s %s (with EB %d.%d)\n", program_name, program_version, 4, 4);
xputs("Copyright (C) 1997,1998,1999,2000 NISHIDA Keisuke");
xputs("Copyright (C) 2000-2002 Satomi");
xputs("Copyright (C) 2000,2001 Kazuhiko");
xputs("Copyright (C) 2000-2002 NEMOTO Takashi");
xputs("Copyright (C)... | void show_version() {
xprintf("%s %s (with EB %d.%d)\n", program_name, program_version,
EB_VERSION_MAJOR, EB_VERSION_MINOR);
xputs("Copyright (C) 1997,1998,1999,2000 NISHIDA Keisuke");
xputs("Copyright (C) 2000-2002 Satomi");
xputs("Copyright (C) 2000,2001 Kazuhiko");
xputs("Copyright (C) 2000-2002 ... | show_version | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int tiff_put_dword(FILE *fp, unsigned long dw) {
if (tiff_put_word(fp, WORD1(dw)) == -1)
return -1;
else
return tiff_put_word(fp, dw);
} | static int tiff_put_dword(fp, dw)
FILE *fp;
unsigned long dw;
{
if (EOF == tiff_put_word(fp, 0xffff & (dw >> 16)))
return EOF;
return tiff_put_word(fp, 0xffff & dw);
} | tiff_put_dword | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int tiff_put_word(FILE *fp, unsigned short w) {
if (putc(HIBYTE(w), fp) == -1)
return -1;
else
return putc((unsigned char)w, fp);
} | static int tiff_put_word(fp, w)
FILE *fp;
unsigned short w;
{
if (EOF == putc(255 & (w >> 8), fp))
return EOF;
return putc(255 & w, fp);
} | tiff_put_word | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int tifftag_write_dword(FILE *fp, int id, unsigned long val) {
if (tiff_put_word(fp, id) == -1)
return -1;
if (tiff_put_word(fp, 4u) == -1)
return -1;
if (tiff_put_dword(fp, 1u) == -1)
return -1;
return tiff_put_dword(fp, val);
} | static int tifftag_write_dword(fp, id, val)
FILE *fp;
int id;
unsigned long val;
{
if (EOF == tiff_put_word(fp, id))
return EOF;
if (EOF == tiff_put_word(fp, 4))
return EOF;
if (EOF == tiff_put_dword(fp, 1))
return EOF;
return tiff_put_dword(fp, val);
} | tifftag_write_dword | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int tifftag_write_string(FILE *fp, int id, unsigned char *buf, int *bp_0,
int base, const char *val) {
int count;
count = strlen(val) + 1;
if (tiff_put_word(fp, id) == -1)
return -1;
if (tiff_put_word(fp, 2u) == -1)
return -1;
if (tiff_put_dword(fp, count) == -1)
return -... | static int tifftag_write_string(fp, id, buf, bp, base, val)
FILE *fp;
int id;
unsigned char *buf;
int *bp;
int base;
const char *val;
{
int count;
count = strlen(val) + 1;
if (EOF == tiff_put_word(fp, id))
return EOF;
if (EOF == tiff_put_word(fp, 2))
return EOF;
if (EOF == tiff_put_dword(fp, count))
... | tifftag_write_string | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int tifftag_write_word(FILE *fp, int id, unsigned short val) {
if (tiff_put_word(fp, id) == -1)
return -1;
if (tiff_put_word(fp, 3u) == -1)
return -1;
if (tiff_put_dword(fp, 1u) == -1)
return -1;
if (tiff_put_word(fp, val) == -1)
return -1;
return tiff_put_word(fp, 0);
} | static int tifftag_write_word(fp, id, val)
FILE *fp;
int id;
unsigned short val;
{
if (EOF == tiff_put_word(fp, id))
return EOF;
if (EOF == tiff_put_word(fp, 3))
return EOF;
if (EOF == tiff_put_dword(fp, 1))
return EOF;
if (EOF == tiff_put_word(fp, val))
return EOF;
return tiff_put_word(fp, 0)... | tifftag_write_word | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int tifftag_write_words(FILE *fp, int id, unsigned char *buf, int *bp_0,
int base, int count, const unsigned short *val) {
unsigned char v8;
int v9;
unsigned short v10;
int v11;
if (tiff_put_word(fp, id) == -1)
return -1;
if (tiff_put_word(fp, 3u) == -1)
return -1;
if (tif... | static int tifftag_write_words(fp, id, buf, bp, base, count, val)
FILE *fp;
int id;
unsigned char *buf;
int *bp;
int base;
int count;
const unsigned short *val;
{
if (EOF == tiff_put_word(fp, id))
return EOF;
if (EOF == tiff_put_word(fp, 3))
return EOF;
if (EOF == tiff_put_dword(fp, count))
return EOF... | tifftag_write_words | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
void unset_error_message() {
variable_alist = salist_set(variable_alist, "_error", 0);
variable_alist = salist_set(variable_alist, "_eb_error", 0);
} | void unset_error_message() {
variable_set("_error", NULL);
variable_set("_eb_error", NULL);
} | unset_error_message | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
char *xfgets(char *str, int size, FILE *fp) {
int sizea;
char *stra;
int size0;
char *ibuf;
size_t ilen;
char *str0;
char *ibuf0;
size_t status;
unsigned long v13;
stra = str;
sizea = size;
v13 = __readfsqword(0x28u);
str0 = str;
size0 = size;
ilen = 4 * size;
ibuf = (char *)malloc(ilen... | char *xfgets(str, size, fp)
char *str;
int size;
FILE *fp;
{
char *ibuf, *ibuf0;
size_t ilen;
size_t status;
char *str0;
int size0;
str0 = str;
size0 = size;
ilen = size * 4;
#ifdef HAVE_ALLOCA
ibuf0 = ibuf = alloca(ilen + 1);
#else
ibuf0 = ibuf = malloc(ilen + 1);
#endif
if (ibuf == NULL)
r... | xfgets | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int xfputs(const char *str, FILE *fp) {
int v2;
v2 = strlen(str);
return xputs2(str, v2, fp);
} | int xfputs(str, fp) const char *str;
FILE *fp;
{
return xputs2(str, strlen(str), fp);
} | xfputs | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int xputs(const char *str) {
int len;
len = xfputs(str, stdout);
if (len < 0)
return -1;
putchar(10);
return len + 1;
} | int xputs(str) const char *str;
{
int len;
len = xfputs(str, stdout);
if (len < 0)
return EOF;
putchar('\n');
return len + 1;
} | xputs | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int xputs2(const char *str, int len, FILE *fp) {
int ret_code;
char *buf1p;
char *buf2p;
size_t len1;
size_t len2;
char *buf2p0;
size_t outlen;
size_t status;
char *buf1p0;
unsigned long v14;
v14 = __readfsqword(0x28u);
outlen = 4 * len;
len1 = len;
len2 = outlen;
buf1p0 = (char *)malloc(... | static int xputs2(str, len, fp) const char *str;
int len;
FILE *fp;
{
char *buf1p, *buf1p0;
char *buf2p, *buf2p0;
size_t len1, len2;
size_t outlen;
int ret_code;
size_t status;
outlen = len * 4;
len1 = len;
len2 = outlen;
#ifdef HAVE_ALLOCA
buf1p = buf1p0 = alloca(len1);
#else
buf1p = buf1p0 = m... | xputs2 | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
int xputs_raw(const char *str, int len, FILE *fp) {
int outlen;
int len1;
int wlen;
outlen = 0;
len1 = len;
while (outlen < len) {
wlen = fwrite(str, 1u, len1, fp);
if (!wlen)
break;
outlen += wlen;
len1 -= wlen;
str += wlen;
}
return outlen;
} | static int xputs_raw(str, len, fp) const char *str;
int len;
FILE *fp;
{
int outlen = 0;
int len1 = len;
int wlen;
while (outlen < len) {
wlen = fwrite(str, 1, len1, fp);
if (wlen == 0)
break;
outlen += wlen;
len1 -= wlen;
str += wlen;
}
return outlen;
} | xputs_raw | eblook-1.6.1 | app-dicts | O0/app-dicts/eblook-1.6.1/eblook | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.