Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
38adb1ba
Commit
38adb1ba
authored
19 years ago
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Portability fixes for warnings reported on IA-64 Windows
parent
473f2f94
No related merge requests found
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
51 additions
and
46 deletions
+51
-46
innobase/buf/buf0lru.c
innobase/buf/buf0lru.c
+3
-3
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+3
-2
innobase/eval/eval0proc.c
innobase/eval/eval0proc.c
+1
-1
innobase/include/mem0mem.ic
innobase/include/mem0mem.ic
+1
-1
innobase/include/page0page.ic
innobase/include/page0page.ic
+4
-4
innobase/include/pars0pars.h
innobase/include/pars0pars.h
+1
-1
innobase/include/pars0sym.h
innobase/include/pars0sym.h
+1
-1
innobase/mem/mem0dbg.c
innobase/mem/mem0dbg.c
+1
-1
innobase/os/os0file.c
innobase/os/os0file.c
+11
-11
innobase/os/os0sync.c
innobase/os/os0sync.c
+2
-2
innobase/os/os0thread.c
innobase/os/os0thread.c
+2
-2
innobase/rem/rem0cmp.c
innobase/rem/rem0cmp.c
+8
-5
innobase/row/row0mysql.c
innobase/row/row0mysql.c
+6
-6
innobase/row/row0sel.c
innobase/row/row0sel.c
+4
-4
innobase/trx/trx0sys.c
innobase/trx/trx0sys.c
+2
-1
innobase/ut/ut0ut.c
innobase/ut/ut0ut.c
+1
-1
No files found.
innobase/buf/buf0lru.c
View file @
38adb1ba
...
@@ -877,11 +877,11 @@ buf_LRU_block_remove_hashed_page(
...
@@ -877,11 +877,11 @@ buf_LRU_block_remove_hashed_page(
(
ulong
)
block
->
offset
);
(
ulong
)
block
->
offset
);
if
(
buf_page_hash_get
(
block
->
space
,
block
->
offset
))
{
if
(
buf_page_hash_get
(
block
->
space
,
block
->
offset
))
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: From hash table we find block %
lx of %lu %lu which is not %lx
\n
"
,
"InnoDB: From hash table we find block %
p of %lu %lu which is not %p
\n
"
,
(
ulong
)
buf_page_hash_get
(
block
->
space
,
block
->
offset
),
buf_page_hash_get
(
block
->
space
,
block
->
offset
),
(
ulong
)
buf_page_hash_get
(
block
->
space
,
block
->
offset
)
->
space
,
(
ulong
)
buf_page_hash_get
(
block
->
space
,
block
->
offset
)
->
space
,
(
ulong
)
buf_page_hash_get
(
block
->
space
,
block
->
offset
)
->
offset
,
(
ulong
)
buf_page_hash_get
(
block
->
space
,
block
->
offset
)
->
offset
,
(
ulong
)
block
);
block
);
}
}
#ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
...
...
This diff is collapsed.
Click to expand it.
innobase/dict/dict0dict.c
View file @
38adb1ba
...
@@ -2292,8 +2292,9 @@ dict_scan_to(
...
@@ -2292,8 +2292,9 @@ dict_scan_to(
/* Outside quotes: look for the keyword. */
/* Outside quotes: look for the keyword. */
ulint
i
;
ulint
i
;
for
(
i
=
0
;
string
[
i
];
i
++
)
{
for
(
i
=
0
;
string
[
i
];
i
++
)
{
if
(
toupper
((
ulint
)(
ptr
[
i
]))
if
(
toupper
((
int
)(
unsigned
char
)(
ptr
[
i
]))
!=
toupper
((
ulint
)(
string
[
i
])))
{
!=
toupper
((
int
)(
unsigned
char
)
(
string
[
i
])))
{
goto
nomatch
;
goto
nomatch
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
innobase/eval/eval0proc.c
View file @
38adb1ba
...
@@ -161,7 +161,7 @@ for_step(
...
@@ -161,7 +161,7 @@ for_step(
{
{
for_node_t
*
node
;
for_node_t
*
node
;
que_node_t
*
parent
;
que_node_t
*
parent
;
int
loop_var_value
;
l
int
loop_var_value
;
ut_ad
(
thr
);
ut_ad
(
thr
);
...
...
This diff is collapsed.
Click to expand it.
innobase/include/mem0mem.ic
View file @
38adb1ba
...
@@ -606,7 +606,7 @@ mem_strdupq(
...
@@ -606,7 +606,7 @@ mem_strdupq(
char* dst;
char* dst;
char* d;
char* d;
const char* s = str;
const char* s = str;
in
t len = strlen(str) + 3;
size_
t len = strlen(str) + 3;
/* calculate the number of quote characters in the string */
/* calculate the number of quote characters in the string */
while((s = strchr(s, q)) != NULL) {
while((s = strchr(s, q)) != NULL) {
s++;
s++;
...
...
This diff is collapsed.
Click to expand it.
innobase/include/page0page.ic
View file @
38adb1ba
...
@@ -484,10 +484,10 @@ page_rec_get_next(
...
@@ -484,10 +484,10 @@ page_rec_get_next(
"InnoDB: Next record offset is nonsensical %lu in record at offset %lu\n",
"InnoDB: Next record offset is nonsensical %lu in record at offset %lu\n",
(ulong)offs, (ulong)(rec - page));
(ulong)offs, (ulong)(rec - page));
fprintf(stderr,
fprintf(stderr,
"\nInnoDB: rec address %
lx, first buffer frame %lx
\n"
"\nInnoDB: rec address %
p, first buffer frame %p
\n"
"InnoDB: buffer pool high end %
lx
, buf fix count %lu\n",
"InnoDB: buffer pool high end %
p
, buf fix count %lu\n",
(ulong)rec, (ulong)
buf_pool->frame_zero,
rec,
buf_pool->frame_zero,
(ulong)
buf_pool->high_end,
buf_pool->high_end,
(ulong)buf_block_align(rec)->buf_fix_count);
(ulong)buf_block_align(rec)->buf_fix_count);
buf_page_print(page);
buf_page_print(page);
...
...
This diff is collapsed.
Click to expand it.
innobase/include/pars0pars.h
View file @
38adb1ba
...
@@ -414,7 +414,7 @@ pars_complete_graph_for_exec(
...
@@ -414,7 +414,7 @@ pars_complete_graph_for_exec(
/* Struct used to denote a reserved word in a parsing tree */
/* Struct used to denote a reserved word in a parsing tree */
struct
pars_res_word_struct
{
struct
pars_res_word_struct
{
ul
int
code
;
/* the token code for the reserved word from
int
code
;
/* the token code for the reserved word from
pars0grm.h */
pars0grm.h */
};
};
...
...
This diff is collapsed.
Click to expand it.
innobase/include/pars0sym.h
View file @
38adb1ba
...
@@ -152,7 +152,7 @@ struct sym_tab_struct{
...
@@ -152,7 +152,7 @@ struct sym_tab_struct{
parser */
parser */
const
char
*
sql_string
;
const
char
*
sql_string
;
/* SQL string to parse */
/* SQL string to parse */
in
t
string_len
;
size_
t
string_len
;
/* SQL string length */
/* SQL string length */
int
next_char_pos
;
int
next_char_pos
;
/* position of the next character in
/* position of the next character in
...
...
This diff is collapsed.
Click to expand it.
innobase/mem/mem0dbg.c
View file @
38adb1ba
...
@@ -445,7 +445,7 @@ mem_heap_validate_or_print(
...
@@ -445,7 +445,7 @@ mem_heap_validate_or_print(
&&
(
mem_block_get_len
(
block
)
>
UNIV_PAGE_SIZE
))
{
&&
(
mem_block_get_len
(
block
)
>
UNIV_PAGE_SIZE
))
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: Error: mem block %
lx length %lu > UNIV_PAGE_SIZE
\n
"
,
(
ulong
)
block
,
"InnoDB: Error: mem block %
p length %lu > UNIV_PAGE_SIZE
\n
"
,
block
,
(
ulong
)
mem_block_get_len
(
block
));
(
ulong
)
mem_block_get_len
(
block
));
/* error */
/* error */
...
...
This diff is collapsed.
Click to expand it.
innobase/os/os0file.c
View file @
38adb1ba
...
@@ -2042,8 +2042,8 @@ try_again:
...
@@ -2042,8 +2042,8 @@ try_again:
ut_ad
(
buf
);
ut_ad
(
buf
);
ut_ad
(
n
>
0
);
ut_ad
(
n
>
0
);
low
=
offset
;
low
=
(
DWORD
)
offset
;
high
=
offset_high
;
high
=
(
DWORD
)
offset_high
;
/* Protect the seek / read operation with a mutex */
/* Protect the seek / read operation with a mutex */
i
=
((
ulint
)
file
)
%
OS_FILE_N_SEEK_MUTEXES
;
i
=
((
ulint
)
file
)
%
OS_FILE_N_SEEK_MUTEXES
;
...
@@ -2059,7 +2059,7 @@ try_again:
...
@@ -2059,7 +2059,7 @@ try_again:
goto
error_handling
;
goto
error_handling
;
}
}
ret
=
ReadFile
(
file
,
buf
,
n
,
&
len
,
NULL
);
ret
=
ReadFile
(
file
,
buf
,
(
DWORD
)
n
,
&
len
,
NULL
);
os_mutex_exit
(
os_file_seek_mutexes
[
i
]);
os_mutex_exit
(
os_file_seek_mutexes
[
i
]);
...
@@ -2145,8 +2145,8 @@ try_again:
...
@@ -2145,8 +2145,8 @@ try_again:
ut_ad
(
buf
);
ut_ad
(
buf
);
ut_ad
(
n
>
0
);
ut_ad
(
n
>
0
);
low
=
offset
;
low
=
(
DWORD
)
offset
;
high
=
offset_high
;
high
=
(
DWORD
)
offset_high
;
/* Protect the seek / read operation with a mutex */
/* Protect the seek / read operation with a mutex */
i
=
((
ulint
)
file
)
%
OS_FILE_N_SEEK_MUTEXES
;
i
=
((
ulint
)
file
)
%
OS_FILE_N_SEEK_MUTEXES
;
...
@@ -2162,7 +2162,7 @@ try_again:
...
@@ -2162,7 +2162,7 @@ try_again:
goto
error_handling
;
goto
error_handling
;
}
}
ret
=
ReadFile
(
file
,
buf
,
n
,
&
len
,
NULL
);
ret
=
ReadFile
(
file
,
buf
,
(
DWORD
)
n
,
&
len
,
NULL
);
os_mutex_exit
(
os_file_seek_mutexes
[
i
]);
os_mutex_exit
(
os_file_seek_mutexes
[
i
]);
...
@@ -2231,8 +2231,8 @@ os_file_write(
...
@@ -2231,8 +2231,8 @@ os_file_write(
ut_ad
(
buf
);
ut_ad
(
buf
);
ut_ad
(
n
>
0
);
ut_ad
(
n
>
0
);
retry:
retry:
low
=
offset
;
low
=
(
DWORD
)
offset
;
high
=
offset_high
;
high
=
(
DWORD
)
offset_high
;
/* Protect the seek / write operation with a mutex */
/* Protect the seek / write operation with a mutex */
i
=
((
ulint
)
file
)
%
OS_FILE_N_SEEK_MUTEXES
;
i
=
((
ulint
)
file
)
%
OS_FILE_N_SEEK_MUTEXES
;
...
@@ -2259,7 +2259,7 @@ retry:
...
@@ -2259,7 +2259,7 @@ retry:
return
(
FALSE
);
return
(
FALSE
);
}
}
ret
=
WriteFile
(
file
,
buf
,
n
,
&
len
,
NULL
);
ret
=
WriteFile
(
file
,
buf
,
(
DWORD
)
n
,
&
len
,
NULL
);
/* Always do fsync to reduce the probability that when the OS crashes,
/* Always do fsync to reduce the probability that when the OS crashes,
a database page is only partially physically written to disk. */
a database page is only partially physically written to disk. */
...
@@ -3244,7 +3244,7 @@ os_aio(
...
@@ -3244,7 +3244,7 @@ os_aio(
#ifdef WIN_ASYNC_IO
#ifdef WIN_ASYNC_IO
ibool
retval
;
ibool
retval
;
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
DWORD
len
=
n
;
DWORD
len
=
(
DWORD
)
n
;
void
*
dummy_mess1
;
void
*
dummy_mess1
;
void
*
dummy_mess2
;
void
*
dummy_mess2
;
ulint
dummy_type
;
ulint
dummy_type
;
...
@@ -4091,7 +4091,7 @@ loop:
...
@@ -4091,7 +4091,7 @@ loop:
if
(
os_n_file_reads
==
os_n_file_reads_old
)
{
if
(
os_n_file_reads
==
os_n_file_reads_old
)
{
avg_bytes_read
=
0
.
0
;
avg_bytes_read
=
0
.
0
;
}
else
{
}
else
{
avg_bytes_read
=
os_bytes_read_since_printout
/
avg_bytes_read
=
(
double
)
os_bytes_read_since_printout
/
(
os_n_file_reads
-
os_n_file_reads_old
);
(
os_n_file_reads
-
os_n_file_reads_old
);
}
}
...
...
This diff is collapsed.
Click to expand it.
innobase/os/os0sync.c
View file @
38adb1ba
...
@@ -361,7 +361,7 @@ os_event_wait_time(
...
@@ -361,7 +361,7 @@ os_event_wait_time(
ut_a
(
event
);
ut_a
(
event
);
if
(
time
!=
OS_SYNC_INFINITE_TIME
)
{
if
(
time
!=
OS_SYNC_INFINITE_TIME
)
{
err
=
WaitForSingleObject
(
event
->
handle
,
time
/
1000
);
err
=
WaitForSingleObject
(
event
->
handle
,
(
DWORD
)
time
/
1000
);
}
else
{
}
else
{
err
=
WaitForSingleObject
(
event
->
handle
,
INFINITE
);
err
=
WaitForSingleObject
(
event
->
handle
,
INFINITE
);
}
}
...
@@ -408,7 +408,7 @@ os_event_wait_multiple(
...
@@ -408,7 +408,7 @@ os_event_wait_multiple(
ut_a
(
native_event_array
);
ut_a
(
native_event_array
);
ut_a
(
n
>
0
);
ut_a
(
n
>
0
);
index
=
WaitForMultipleObjects
(
n
,
native_event_array
,
index
=
WaitForMultipleObjects
(
(
DWORD
)
n
,
native_event_array
,
FALSE
,
/* Wait for any 1 event */
FALSE
,
/* Wait for any 1 event */
INFINITE
);
/* Infinite wait time
INFINITE
);
/* Infinite wait time
limit */
limit */
...
...
This diff is collapsed.
Click to expand it.
innobase/os/os0thread.c
View file @
38adb1ba
...
@@ -100,7 +100,7 @@ os_thread_create(
...
@@ -100,7 +100,7 @@ os_thread_create(
{
{
#ifdef __WIN__
#ifdef __WIN__
os_thread_t
thread
;
os_thread_t
thread
;
ulint
win_thread_id
;
DWORD
win_thread_id
;
os_mutex_enter
(
os_sync_mutex
);
os_mutex_enter
(
os_sync_mutex
);
os_thread_count
++
;
os_thread_count
++
;
...
@@ -253,7 +253,7 @@ os_thread_sleep(
...
@@ -253,7 +253,7 @@ os_thread_sleep(
ulint
tm
)
/* in: time in microseconds */
ulint
tm
)
/* in: time in microseconds */
{
{
#ifdef __WIN__
#ifdef __WIN__
Sleep
(
tm
/
1000
);
Sleep
(
(
DWORD
)
tm
/
1000
);
#elif defined(__NETWARE__)
#elif defined(__NETWARE__)
delay
(
tm
/
1000
);
delay
(
tm
/
1000
);
#else
#else
...
...
This diff is collapsed.
Click to expand it.
innobase/rem/rem0cmp.c
View file @
38adb1ba
...
@@ -321,7 +321,9 @@ cmp_data_data_slow(
...
@@ -321,7 +321,9 @@ cmp_data_data_slow(
&&
dtype_get_charset_coll
(
cur_type
->
prtype
)
!=
&&
dtype_get_charset_coll
(
cur_type
->
prtype
)
!=
data_mysql_latin1_swedish_charset_coll
))
{
data_mysql_latin1_swedish_charset_coll
))
{
return
(
cmp_whole_field
(
cur_type
,
data1
,
len1
,
data2
,
len2
));
return
(
cmp_whole_field
(
cur_type
,
data1
,
(
unsigned
)
len1
,
data2
,
(
unsigned
)
len2
));
}
}
/* Compare then the fields */
/* Compare then the fields */
...
@@ -527,8 +529,9 @@ cmp_dtuple_rec_with_match(
...
@@ -527,8 +529,9 @@ cmp_dtuple_rec_with_match(
ret
=
cmp_whole_field
(
ret
=
cmp_whole_field
(
cur_type
,
cur_type
,
dfield_get_data
(
dtuple_field
),
dtuple_f_len
,
dfield_get_data
(
dtuple_field
),
rec_b_ptr
,
rec_f_len
);
(
unsigned
)
dtuple_f_len
,
rec_b_ptr
,
(
unsigned
)
rec_f_len
);
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
cur_bytes
=
0
;
cur_bytes
=
0
;
...
@@ -851,8 +854,8 @@ cmp_rec_rec_with_match(
...
@@ -851,8 +854,8 @@ cmp_rec_rec_with_match(
data_mysql_latin1_swedish_charset_coll
))
{
data_mysql_latin1_swedish_charset_coll
))
{
ret
=
cmp_whole_field
(
cur_type
,
ret
=
cmp_whole_field
(
cur_type
,
rec1_b_ptr
,
rec1_f_len
,
rec1_b_ptr
,
(
unsigned
)
rec1_f_len
,
rec2_b_ptr
,
rec2_f_len
);
rec2_b_ptr
,
(
unsigned
)
rec2_f_len
);
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
cur_bytes
=
0
;
cur_bytes
=
0
;
...
...
This diff is collapsed.
Click to expand it.
innobase/row/row0mysql.c
View file @
38adb1ba
...
@@ -745,7 +745,7 @@ run_again:
...
@@ -745,7 +745,7 @@ run_again:
trx
->
op_info
=
""
;
trx
->
op_info
=
""
;
return
(
err
);
return
(
(
int
)
err
);
}
}
que_thr_stop_for_mysql_no_error
(
thr
,
trx
);
que_thr_stop_for_mysql_no_error
(
thr
,
trx
);
...
@@ -839,7 +839,7 @@ run_again:
...
@@ -839,7 +839,7 @@ run_again:
trx
->
op_info
=
""
;
trx
->
op_info
=
""
;
return
(
err
);
return
(
(
int
)
err
);
}
}
que_thr_stop_for_mysql_no_error
(
thr
,
trx
);
que_thr_stop_for_mysql_no_error
(
thr
,
trx
);
...
@@ -954,7 +954,7 @@ run_again:
...
@@ -954,7 +954,7 @@ run_again:
trx
->
op_info
=
""
;
trx
->
op_info
=
""
;
return
(
err
);
return
(
(
int
)
err
);
}
}
que_thr_stop_for_mysql_no_error
(
thr
,
trx
);
que_thr_stop_for_mysql_no_error
(
thr
,
trx
);
...
@@ -1202,7 +1202,7 @@ run_again:
...
@@ -1202,7 +1202,7 @@ run_again:
trx
->
op_info
=
""
;
trx
->
op_info
=
""
;
return
(
err
);
return
(
(
int
)
err
);
}
}
que_thr_stop_for_mysql_no_error
(
thr
,
trx
);
que_thr_stop_for_mysql_no_error
(
thr
,
trx
);
...
@@ -1367,7 +1367,7 @@ row_mysql_recover_tmp_table(
...
@@ -1367,7 +1367,7 @@ row_mysql_recover_tmp_table(
}
}
else
{
else
{
int
status
;
int
status
;
int
namelen
=
strlen
(
table
->
name
);
int
namelen
=
(
int
)
strlen
(
table
->
name
);
char
*
old_name
=
mem_strdupl
(
table
->
name
,
namelen
);
char
*
old_name
=
mem_strdupl
(
table
->
name
,
namelen
);
/* replace "rsql" with "#sql" */
/* replace "rsql" with "#sql" */
old_name
[
ptr
-
table
->
name
+
1
]
=
'#'
;
old_name
[
ptr
-
table
->
name
+
1
]
=
'#'
;
...
@@ -1857,7 +1857,7 @@ row_drop_table_for_mysql_in_background(
...
@@ -1857,7 +1857,7 @@ row_drop_table_for_mysql_in_background(
trx_free_for_background
(
trx
);
trx_free_for_background
(
trx
);
return
(
error
);
return
(
(
int
)
error
);
}
}
/*************************************************************************
/*************************************************************************
...
...
This diff is collapsed.
Click to expand it.
innobase/row/row0sel.c
View file @
38adb1ba
...
@@ -3326,10 +3326,10 @@ rec_loop:
...
@@ -3326,10 +3326,10 @@ rec_loop:
ut_print_timestamp
(
stderr
);
ut_print_timestamp
(
stderr
);
buf_page_print
(
buf_frame_align
(
rec
));
buf_page_print
(
buf_frame_align
(
rec
));
fprintf
(
stderr
,
fprintf
(
stderr
,
"
\n
InnoDB: rec address %
lx, first buffer frame %lx
\n
"
"
\n
InnoDB: rec address %
p, first buffer frame %p
\n
"
"InnoDB: buffer pool high end %
lx
, buf block fix count %lu
\n
"
,
"InnoDB: buffer pool high end %
p
, buf block fix count %lu
\n
"
,
(
ulong
)
rec
,
(
ulong
)
buf_pool
->
frame_zero
,
rec
,
buf_pool
->
frame_zero
,
(
ulong
)
buf_pool
->
high_end
,
buf_pool
->
high_end
,
(
ulong
)
buf_block_align
(
rec
)
->
buf_fix_count
);
(
ulong
)
buf_block_align
(
rec
)
->
buf_fix_count
);
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: Index corruption: rec offs %lu next offs %lu, page no %lu,
\n
"
"InnoDB: Index corruption: rec offs %lu next offs %lu, page no %lu,
\n
"
...
...
This diff is collapsed.
Click to expand it.
innobase/trx/trx0sys.c
View file @
38adb1ba
...
@@ -666,7 +666,8 @@ trx_sys_print_mysql_binlog_offset(void)
...
@@ -666,7 +666,8 @@ trx_sys_print_mysql_binlog_offset(void)
{
{
trx_sysf_t
*
sys_header
;
trx_sysf_t
*
sys_header
;
mtr_t
mtr
;
mtr_t
mtr
;
ulong
trx_sys_mysql_bin_log_pos_high
,
trx_sys_mysql_bin_log_pos_low
;
ulint
trx_sys_mysql_bin_log_pos_high
;
ulint
trx_sys_mysql_bin_log_pos_low
;
mtr_start
(
&
mtr
);
mtr_start
(
&
mtr
);
...
...
This diff is collapsed.
Click to expand it.
innobase/ut/ut0ut.c
View file @
38adb1ba
...
@@ -428,7 +428,7 @@ ut_copy_file(
...
@@ -428,7 +428,7 @@ ut_copy_file(
len
<
(
long
)
sizeof
buf
?
(
size_t
)
len
:
sizeof
buf
;
len
<
(
long
)
sizeof
buf
?
(
size_t
)
len
:
sizeof
buf
;
size_t
size
=
fread
(
buf
,
1
,
maxs
,
src
);
size_t
size
=
fread
(
buf
,
1
,
maxs
,
src
);
fwrite
(
buf
,
1
,
size
,
dest
);
fwrite
(
buf
,
1
,
size
,
dest
);
len
-=
size
;
len
-=
(
long
)
size
;
if
(
size
<
maxs
)
{
if
(
size
<
maxs
)
{
break
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment