Merge pull request #4448 from akallabeth/nightly_manpage_fix
Nightly manpage fix
This commit is contained in:
commit
c27600528e
@ -90,10 +90,12 @@ if(WITH_MANPAGES)
|
||||
|
||||
configure_file(xfreerdp.1.xml.in xfreerdp.1.xml @ONLY IMMEDIATE)
|
||||
|
||||
# the manpage generator helper tool is called by cmake.
|
||||
# this does not work if we compile with any of the sanitizer options,
|
||||
# therefore remove these from the CFLAGS for this specific target.
|
||||
string(REGEX REPLACE "-fsanitize=[a-z]* " "" CUSTOM_C_FLAGS ${CMAKE_C_FLAGS})
|
||||
add_executable(generate_argument_docbook generate_argument_docbook.c)
|
||||
|
||||
target_link_libraries(generate_argument_docbook winpr)
|
||||
|
||||
set_property(TARGET generate_argument_docbook PROPERTY CMAKE_C_FLAGS ${CUSTOM_C_FLAGS})
|
||||
add_custom_command(OUTPUT xfreerdp.1
|
||||
COMMAND generate_argument_docbook
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../common/cmdline.h"
|
||||
#include <freerdp/log.h>
|
||||
|
||||
#define TAG FREERDP_TAG("generate_argument_docbook")
|
||||
LPSTR tr_esc_str(LPCSTR arg, bool format)
|
||||
@ -23,7 +23,7 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
|
||||
tmp = (LPSTR)realloc(tmp, ds * sizeof(CHAR));
|
||||
if(NULL == tmp)
|
||||
{
|
||||
WLog_ERR(TAG, "Could not allocate string buffer.");
|
||||
fprintf(stderr, "Could not allocate string buffer.\n");
|
||||
exit(-2);
|
||||
}
|
||||
/* Copy character for character and check, if it is necessary to escape. */
|
||||
@ -38,7 +38,7 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
|
||||
tmp = (LPSTR)realloc(tmp, ds * sizeof(CHAR));
|
||||
if(NULL == tmp)
|
||||
{
|
||||
WLog_ERR(TAG, "Could not reallocate string buffer.");
|
||||
fprintf(stderr, "Could not reallocate string buffer.\n");
|
||||
exit(-3);
|
||||
}
|
||||
if (format)
|
||||
@ -53,7 +53,7 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
|
||||
tmp = (LPSTR)realloc(tmp, ds * sizeof(CHAR));
|
||||
if(NULL == tmp)
|
||||
{
|
||||
WLog_ERR(TAG, "Could not reallocate string buffer.");
|
||||
fprintf(stderr, "Could not reallocate string buffer.\n");
|
||||
exit(-4);
|
||||
}
|
||||
if (format)
|
||||
@ -67,7 +67,7 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
|
||||
tmp = (LPSTR)realloc(tmp, ds * sizeof(CHAR));
|
||||
if(NULL == tmp)
|
||||
{
|
||||
WLog_ERR(TAG, "Could not reallocate string buffer.");
|
||||
fprintf(stderr, "Could not reallocate string buffer.\n");
|
||||
exit(-5);
|
||||
}
|
||||
tmp[cs++] = '&';
|
||||
@ -82,7 +82,7 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
|
||||
tmp = (LPSTR)realloc(tmp, ds * sizeof(CHAR));
|
||||
if(NULL == tmp)
|
||||
{
|
||||
WLog_ERR(TAG, "Could not reallocate string buffer.");
|
||||
fprintf(stderr, "Could not reallocate string buffer.\n");
|
||||
exit(-6);
|
||||
}
|
||||
tmp[cs++] = '&';
|
||||
@ -97,7 +97,7 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
|
||||
tmp = (LPSTR)realloc(tmp, ds * sizeof(CHAR));
|
||||
if(NULL == tmp)
|
||||
{
|
||||
WLog_ERR(TAG, "Could not reallocate string buffer.");
|
||||
fprintf(stderr, "Could not reallocate string buffer.\n");
|
||||
exit(-7);
|
||||
}
|
||||
tmp[cs++] = '&';
|
||||
@ -126,8 +126,8 @@ int main(int argc, char *argv[])
|
||||
fp = fopen(fname, "w");
|
||||
if(NULL == fp)
|
||||
{
|
||||
WLog_ERR(TAG, "Could not open '%s' for writing.", fname);
|
||||
return winpr_exit(-1);
|
||||
fprintf(stderr, "Could not open '%s' for writing.\n", fname);
|
||||
return -1;
|
||||
}
|
||||
/* The tag used as header in the manpage */
|
||||
fprintf(fp, "<refsect1>\n");
|
||||
@ -137,7 +137,7 @@ int main(int argc, char *argv[])
|
||||
* compatible XML */
|
||||
if(elements < 2)
|
||||
{
|
||||
WLog_ERR(TAG, "The argument array 'args' is empty, writing an empty file.");
|
||||
fprintf(stderr, "The argument array 'args' is empty, writing an empty file.\n");
|
||||
elements = 1;
|
||||
}
|
||||
for(x=0; x<elements - 1; x++)
|
||||
@ -206,6 +206,6 @@ int main(int argc, char *argv[])
|
||||
fprintf(fp, "\t\t</variablelist>\n");
|
||||
fprintf(fp, "\t</refsect1>\n");
|
||||
fclose(fp);
|
||||
return winpr_exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -4,12 +4,7 @@ NULL =
|
||||
|
||||
DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
|
||||
ifeq ($(DEB_HOST_ARCH), i386)
|
||||
SANATIZE_ADDRESS = -DWITH_SANITIZE_ADDRESS=OFF
|
||||
else
|
||||
SANATIZE_ADDRESS = -DWITH_SANITIZE_ADDRESS=ON
|
||||
endif
|
||||
|
||||
|
||||
DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_SKIP_RPATH=FALSE \
|
||||
-DCMAKE_SKIP_INSTALL_RPATH=FALSE \
|
||||
|
Loading…
x
Reference in New Issue
Block a user