194 lines
6.6 KiB
Diff
194 lines
6.6 KiB
Diff
diff -Naurp robodoc-4.99.43.orig/Source/analyser.c robodoc-4.99.43.new/Source/analyser.c
|
|
--- robodoc-4.99.43.orig/Source/analyser.c 2015-04-11 19:28:57.000000000 +0200
|
|
+++ robodoc-4.99.43.new/Source/analyser.c 2018-03-07 15:08:37.115748466 +0100
|
|
@@ -621,8 +621,6 @@ static void Preformat_All(
|
|
*/
|
|
{
|
|
int i;
|
|
- int preformatted = FALSE;
|
|
- char *line = NULL;
|
|
|
|
if ( arg_item->no_lines > 0 )
|
|
{
|
|
@@ -635,13 +633,11 @@ static void Preformat_All(
|
|
/* Empty */
|
|
}
|
|
|
|
- line = arg_item->lines[i]->line;
|
|
if ( ( arg_item->lines[i]->kind == ITEM_LINE_RAW ) ||
|
|
( arg_item->lines[i]->kind == ITEM_LINE_PLAIN ) )
|
|
{
|
|
arg_item->lines[i]->format |=
|
|
RBILA_BEGIN_PRE | ( source ? RBILA_BEGIN_SOURCE : 0 );
|
|
- preformatted = TRUE;
|
|
|
|
for ( ++i; i < arg_item->no_lines; i++ )
|
|
{
|
|
diff -Naurp robodoc-4.99.43.orig/Source/generator.c robodoc-4.99.43.new/Source/generator.c
|
|
--- robodoc-4.99.43.orig/Source/generator.c 2015-04-11 19:28:57.000000000 +0200
|
|
+++ robodoc-4.99.43.new/Source/generator.c 2018-03-07 15:20:58.374982012 +0100
|
|
@@ -2045,7 +2045,7 @@ static void Generate_Item(
|
|
RB_Change_To_Docdir( docname );
|
|
|
|
/* Execute line */
|
|
- system( line );
|
|
+ IGNORE(system(line));
|
|
|
|
/* Get back to working dir */
|
|
RB_Change_Back_To_CWD( );
|
|
@@ -2056,7 +2056,7 @@ static void Generate_Item(
|
|
{
|
|
Format_Line( f, item_line->format );
|
|
|
|
- FILE *in = NULL, *dot_pipe = NULL;
|
|
+ FILE *in = NULL;
|
|
char str[TEMP_BUF_SIZE];
|
|
|
|
/* Change to docdir */
|
|
diff -Naurp robodoc-4.99.43.orig/Source/robodoc.c robodoc-4.99.43.new/Source/robodoc.c
|
|
--- robodoc-4.99.43.orig/Source/robodoc.c 2015-04-11 19:28:57.000000000 +0200
|
|
+++ robodoc-4.99.43.new/Source/robodoc.c 2018-03-07 15:08:37.116748476 +0100
|
|
@@ -387,7 +387,9 @@ int main(
|
|
struct RB_Directory *srctree = NULL;
|
|
char *optstr = NULL;
|
|
char *used_rc_file = NULL;
|
|
+#ifdef __APPLE__
|
|
long debug = 0;
|
|
+#endif
|
|
|
|
/*
|
|
TODO, make setlocale work.
|
|
@@ -462,7 +464,10 @@ int main(
|
|
document = RB_Get_RB_Document( );
|
|
document->doctype = output_mode;
|
|
document->actions = Find_Actions( );
|
|
- debug = document->debugmode = Find_DebugMode( );
|
|
+#ifdef __APPLE__
|
|
+ debug =
|
|
+#endif
|
|
+ document->debugmode = Find_DebugMode( );
|
|
document->charset = Find_Parameterized_Option( "--charset" );
|
|
document->extension = Find_Parameterized_Option( "--ext" );
|
|
document->css = Find_Parameterized_Option( "--css" );
|
|
diff -Naurp robodoc-4.99.43.orig/Source/robodoc.h robodoc-4.99.43.new/Source/robodoc.h
|
|
--- robodoc-4.99.43.orig/Source/robodoc.h 2015-04-11 23:09:23.000000000 +0200
|
|
+++ robodoc-4.99.43.new/Source/robodoc.h 2018-03-07 15:08:37.117748486 +0100
|
|
@@ -31,6 +31,9 @@ along with this program. If not, see <h
|
|
#define VERSION "4.99.43"
|
|
#endif
|
|
|
|
+/* Macro to silent unused-result warnings. */
|
|
+#define IGNORE(v) { if (v) ; }
|
|
+
|
|
#define COMMENT_ROBODOC \
|
|
"Generated with ROBODoc Version " VERSION " (" __DATE__ ")\n"
|
|
#define COMMENT_COPYRIGHT\
|
|
diff -Naurp robodoc-4.99.43.orig/Source/robohdrs.c robodoc-4.99.43.new/Source/robohdrs.c
|
|
--- robodoc-4.99.43.orig/Source/robohdrs.c 2015-04-11 19:28:57.000000000 +0200
|
|
+++ robodoc-4.99.43.new/Source/robohdrs.c 2018-03-07 15:22:53.591106966 +0100
|
|
@@ -65,6 +65,8 @@ along with this program. If not, see <h
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
+#include "robodoc.h"
|
|
+
|
|
|
|
|
|
#ifndef HAVE_FORK
|
|
@@ -743,8 +745,8 @@ insertHeaders( ctags_t * e, char *projec
|
|
return;
|
|
}
|
|
|
|
- assert( ofp = fopen( dstpath, "w" ) );
|
|
- assert( ifp = fopen( srcpath, "r" ) );
|
|
+ assert((ofp = fopen( dstpath, "w")));
|
|
+ assert((ifp = fopen( srcpath, "r")));
|
|
|
|
/* include file header only if project name is defined */
|
|
if ( project )
|
|
@@ -825,7 +827,7 @@ doCtagsExec( char *fname )
|
|
if ( ( pid = fork( ) ) == 0 )
|
|
{
|
|
close( 1 );
|
|
- dup( fd[1] );
|
|
+ IGNORE(dup(fd[1]));
|
|
close( fd[0] );
|
|
if ( execlp( mybin, mybin, "-x", fname, NULL ) == -1 )
|
|
{
|
|
@@ -841,7 +843,7 @@ doCtagsExec( char *fname )
|
|
else
|
|
{
|
|
close( 0 );
|
|
- dup( fd[0] );
|
|
+ IGNORE(dup(fd[0]));
|
|
close( fd[1] );
|
|
|
|
if ( ( incoming = fdopen( 0, "r" ) ) == NULL )
|
|
@@ -869,7 +871,7 @@ doFile( char *proj, char *fname )
|
|
|
|
/* backup */
|
|
sprintf( buf, "/bin/cp -p %s %s~", fname, fname );
|
|
- system( buf );
|
|
+ IGNORE(system(buf));
|
|
|
|
if ( parseCtagsX( doCtagsExec( fname ) ) < 1 )
|
|
{
|
|
diff -Naurp robodoc-4.99.43.orig/Source/troff_generator.c robodoc-4.99.43.new/Source/troff_generator.c
|
|
--- robodoc-4.99.43.orig/Source/troff_generator.c 2015-04-11 19:28:57.000000000 +0200
|
|
+++ robodoc-4.99.43.new/Source/troff_generator.c 2018-03-07 15:08:37.117748486 +0100
|
|
@@ -223,7 +223,7 @@ FILE *RB_TROFF_Generate_He
|
|
memcpy( buf, file, len );
|
|
sprintf( buf + len, "%s.%s%s", base, section, compress_ext );
|
|
unlink( buf );
|
|
- symlink( basename( manpage ), buf );
|
|
+ IGNORE(symlink(basename(manpage), buf));
|
|
RB_Say( "+ Linked with \"%s\"\n", SAY_INFO, buf );
|
|
}
|
|
#else
|
|
@@ -560,6 +560,6 @@ void RB_TROFF_Generate_Item_Line_Number(
|
|
* SOURCE
|
|
*/
|
|
{
|
|
- fprintf( dest_doc, line_number_string );
|
|
+ fputs(line_number_string, dest_doc);
|
|
}
|
|
/******/
|
|
diff -Naurp robodoc-4.99.43.orig/Source/util.c robodoc-4.99.43.new/Source/util.c
|
|
--- robodoc-4.99.43.orig/Source/util.c 2015-04-11 19:28:57.000000000 +0200
|
|
+++ robodoc-4.99.43.new/Source/util.c 2018-03-07 15:08:37.118748496 +0100
|
|
@@ -1033,7 +1033,7 @@ char *RB_ReadWholeLine(
|
|
{
|
|
*buf = '\0';
|
|
/* read next chunk */
|
|
- fgets( buf, MAX_LINE_LEN, file );
|
|
+ IGNORE(fgets(buf, MAX_LINE_LEN, file));
|
|
if ( ferror( file ) )
|
|
{
|
|
/* an error occurred */
|
|
@@ -1195,7 +1195,7 @@ void RB_Change_Back_To_CWD(
|
|
{
|
|
if ( cwd != NULL )
|
|
{
|
|
- chdir( cwd );
|
|
+ IGNORE(chdir(cwd));
|
|
free( cwd );
|
|
cwd = NULL;
|
|
}
|
|
@@ -1223,14 +1223,14 @@ void RB_Change_To_Docdir(
|
|
RB_Change_Back_To_CWD( );
|
|
|
|
/* Save CWD */
|
|
- getcwd( tmp, sizeof( tmp ) );
|
|
+ IGNORE(getcwd(tmp, sizeof(tmp)));
|
|
cwd = RB_StrDup( tmp );
|
|
|
|
/* Get the name of doc directory and change into it */
|
|
len = namestart - docname;
|
|
strncpy( tmp, docname, len );
|
|
tmp[len] = 0;
|
|
- chdir( tmp );
|
|
+ IGNORE(chdir(tmp));
|
|
}
|
|
|
|
/*******/
|