repo.or.cz
/
linux_from_scratch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
5.0-pre2 release
[linux_from_scratch.git]
/
lfscmd
/
src
/
file.c
blob
e9327c3bab38bb7d5049b4b96c9d047055ad42f5
1
/*
2
* Copyright (C) 2003 Timothy Bauscher <timothy@linuxfromscratch.org>
3
*/
4
5
#include <stdio.h>
6
7
#include
"string.h"
8
#include
"file.h"
9
10
FILE
*
write_file
(
const char
*
fname
,
const char
*
mode
) {
11
FILE
*
file
=
NULL
;
12
13
if
((
file
=
fopen
(
fname
,
mode
)) ==
NULL
)
14
error
(
"Cannot access file: %s"
,
fname
);
15
16
return
(
file
);
17
}