Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P22
3 way merge
Active
Public
Actions
Authored by
bapt
on Oct 2 2014, 5:48 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F31782: 3_way_merge
Oct 2 2014, 5:48 PM
2014-10-02 17:48:17 (UTC+0)
Subscribers
None
char
buf
[]
=
"test
\n
test1"
;
char
buf1
[]
=
"test
\n
#test1"
;
char
buf2
[]
=
"test
\n
test1
\n
test2"
;
struct
sbuf
*
b
=
sbuf_new_auto
();
merge_3way
(
buf
,
buf1
,
buf2
,
b
);
sbuf_finish
(
b
);
printf
(
"Vanilla:
\n
---
\n
%s
\n
---
\n
"
,
buf
);
printf
(
"Modified:
\n
---
\n
%s
\n
---
\n
"
,
buf1
);
printf
(
"New:
\n
---
\n
%s
\n
---
\n
"
,
buf2
);
printf
(
"Result:
\n
---
\n
%s
\n
---
\n
"
,
sbuf_data
(
b
));
Event Timeline
bapt
edited the content of this paste.
(Show Details)
Oct 2 2014, 5:48 PM
2014-10-02 17:48:17 (UTC+0)
bapt
changed the title of this paste from untitled to
3 way merge
.
bapt
updated the paste's language from
autodetect
to
c
.
Log In to Comment