J
_JusSx_
Hi,
I don't know if the question is in newsgroup FAQ because I haven't found
it yet and so I haven't read it yet.
I would like to know what differences are between these two
C functions: *fputs* and *fprintf*.
fputs C function has been used much in coreutils C source code while fprintf
has been used to printf help or error.
$ grep fputs *.c
#v+
base64.c: fputs (_("\
base64.c: fputs (_("\
base64.c: fputs (_("\
base64.c: fputs (_("\
base64.c: if (fputs ("\n", out) < 0)
base64.c: if (wrap_column && current_column > 0 && fputs ("\n", out) < 0)
basename.c: fputs (_("\
basename.c: fputs (HELP_OPTION_DESCRIPTION, stdout);
basename.c: fputs (VERSION_OPTION_DESCRIPTION, stdout);
cat.c: fputs (_("\
cat.c: fputs (_("\
cat.c: fputs (HELP_OPTION_DESCRIPTION, stdout);
cat.c: fputs (VERSION_OPTION_DESCRIPTION, stdout);
cat.c: fputs (_("\
chcon.c: fputs (_("\
....
#v-
#v+
$ grep fprintf *.c
base64.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
basename.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
cat.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
chcon.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
chgrp.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
....
#v-
Does using one function depend on only programmer's taste?
Thanks in advance
-JusSx-
I don't know if the question is in newsgroup FAQ because I haven't found
it yet and so I haven't read it yet.
I would like to know what differences are between these two
C functions: *fputs* and *fprintf*.
fputs C function has been used much in coreutils C source code while fprintf
has been used to printf help or error.
$ grep fputs *.c
#v+
base64.c: fputs (_("\
base64.c: fputs (_("\
base64.c: fputs (_("\
base64.c: fputs (_("\
base64.c: if (fputs ("\n", out) < 0)
base64.c: if (wrap_column && current_column > 0 && fputs ("\n", out) < 0)
basename.c: fputs (_("\
basename.c: fputs (HELP_OPTION_DESCRIPTION, stdout);
basename.c: fputs (VERSION_OPTION_DESCRIPTION, stdout);
cat.c: fputs (_("\
cat.c: fputs (_("\
cat.c: fputs (HELP_OPTION_DESCRIPTION, stdout);
cat.c: fputs (VERSION_OPTION_DESCRIPTION, stdout);
cat.c: fputs (_("\
chcon.c: fputs (_("\
....
#v-
#v+
$ grep fprintf *.c
base64.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
basename.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
cat.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
chcon.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
chgrp.c: fprintf (stderr, _("Try `%s --help' for more information.\n"),
....
#v-
Does using one function depend on only programmer's taste?
Thanks in advance
-JusSx-