diff options
author | Arnaud VERSINI <arnaud.versini@libreoffice.org> | 2023-03-19 17:20:44 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-14 15:01:16 +0200 |
commit | 7c5188cbd483c1aab8c7bb55a29efcd935196fa1 (patch) | |
tree | fa62eac4d93ce1a875afc94d90fc099dee31978f /cpputools | |
parent | fcf6f5550cc7949e94dc74cbcd10a700a225e574 (diff) |
sp2bv : no need to use fprintf without any formating
Change-Id: Ieb276dcbd91873bd5121ae7534f0e120c88a88d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149114
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cpputools')
-rw-r--r-- | cpputools/source/sp2bv/sp2bv.cxx | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/cpputools/source/sp2bv/sp2bv.cxx b/cpputools/source/sp2bv/sp2bv.cxx index 9998e7cdb7c4..7e525f7fefcd 100644 --- a/cpputools/source/sp2bv/sp2bv.cxx +++ b/cpputools/source/sp2bv/sp2bv.cxx @@ -24,35 +24,34 @@ static bool hasOption(char const * szOption, int argc, char** argv); - -#define HELP_TEXT \ -"SYNOPSIS \n\n" \ -"\tsp2bv [-h] [-?] string \n\n" \ -"DESCRIPTION\n\n" \ -"\tsp2bv stands for \"system path to bootstrap variable\"." \ -" First the system path is converted into a file URL. Then all " \ -"characters which have a special meaning in bootstrap variables, " \ -"such as \'$\' are escaped. The resulting string is written to " \ -"stdout and can be assigned to a bootstrap variable.\n" \ -"\n\n" \ -"OPTIONS \n\n" \ -"\tThe following options are supported: \n" \ -"-?\n " \ -"--help" \ -" Display help information.\n" +const char* HELP_TEXT = + "SYNOPSIS \n\n" + "\tsp2bv [-h] [-?] string \n\n" + "DESCRIPTION\n\n" + "\tsp2bv stands for \"system path to bootstrap variable\"." + " First the system path is converted into a file URL. Then all " + "characters which have a special meaning in bootstrap variables, " + "such as \'$\' are escaped. The resulting string is written to " + "stdout and can be assigned to a bootstrap variable.\n" + "\n\n" + "OPTIONS \n\n" + "\tThe following options are supported: \n" + "-?\n " + "--help" + " Display help information.\n"; int main(int argc, char **argv) { if( hasOption("--help",argc, argv) || hasOption("-h", argc, argv)) { - fprintf(stdout, HELP_TEXT);// default + fputs(HELP_TEXT, stdout);// default return 0; } if (argc != 2) { - fprintf(stdout, HELP_TEXT); + fputs(HELP_TEXT, stdout); return -1; } |