提交 ab63f58f 编写于 作者: A Arnaud Lacombe

kconfig/conf: mark xfgets() private

This function has not much reason to be public. In the mean time, convert
declaration from K&R C to ISO C.
Signed-off-by: NArnaud Lacombe <lacombar@gmail.com>
上级 131c60a9
......@@ -18,6 +18,7 @@
static void conf(struct menu *menu);
static void check_conf(struct menu *menu);
static void xfgets(char *str, int size, FILE *in);
enum input_mode {
oldaskconfig,
......@@ -672,13 +673,11 @@ int main(int ac, char **av)
}
return 0;
}
/*
* Helper function to facilitate fgets() by Jean Sacren.
*/
void xfgets(str, size, in)
char *str;
int size;
FILE *in;
void xfgets(char *str, int size, FILE *in)
{
if (fgets(str, size, in) == NULL)
fprintf(stderr, "\nError in reading or end of file.\n");
......
......@@ -76,9 +76,6 @@ void zconf_nextfile(const char *name);
int zconf_lineno(void);
const char *zconf_curname(void);
/* conf.c */
void xfgets(char *str, int size, FILE *in);
/* confdata.c */
const char *conf_get_configname(void);
const char *conf_get_autoconfig_name(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册