summaryrefslogtreecommitdiffstats
path: root/doc/tools
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-30 19:17:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-30 19:17:25 +0000
commitb4767da586e1fd09b0aabb694dd58dd3bba20694 (patch)
tree29b2a672620462bee91859c851614710214cc4e7 /doc/tools
parentChange to remove warning on glibc2 systems per Ralf Corsepius's (diff)
downloadrtems-b4767da586e1fd09b0aabb694dd58dd3bba20694.tar.bz2
Modified output of @Example style in MsWord output routine so it would
be one paragraph with manual line breaks rather than multiple paragraphs..
Diffstat (limited to 'doc/tools')
-rw-r--r--doc/tools/pdl2texi/base.h4
-rw-r--r--doc/tools/pdl2texi/main.c36
2 files changed, 36 insertions, 4 deletions
diff --git a/doc/tools/pdl2texi/base.h b/doc/tools/pdl2texi/base.h
index 725342950f..12d481b3c7 100644
--- a/doc/tools/pdl2texi/base.h
+++ b/doc/tools/pdl2texi/base.h
@@ -22,8 +22,8 @@
* the program increase significantly.
*/
-#define BUFFER_SIZE (2 * 1024)
-#define PARAGRAPH_SIZE (2 * 1024)
+#define BUFFER_SIZE (10 * 1024)
+#define PARAGRAPH_SIZE (8 * 1024)
#define NUMBER_ELEMENTS( _x ) (sizeof(_x) / sizeof _x[0])
diff --git a/doc/tools/pdl2texi/main.c b/doc/tools/pdl2texi/main.c
index 41c161c7df..16ef41197e 100644
--- a/doc/tools/pdl2texi/main.c
+++ b/doc/tools/pdl2texi/main.c
@@ -564,7 +564,7 @@ void exit_application(
fprintf( stderr, "*** Error encountered on line %d ***\n", CurrentLine );
*/
fclose( OutFile );
- exit( status );
+ exit( 1 );
}
/*************************************************************************
@@ -2778,6 +2778,7 @@ void FormatToWord( void )
Line_Control *new_line;
char Buffer[ PARAGRAPH_SIZE ];
int i;
+ int length;
char ChapterTitle[ PARAGRAPH_SIZE ];
char InfoFile[ PARAGRAPH_SIZE ];
char *p;
@@ -2919,10 +2920,11 @@ void FormatToWord( void )
case SYNCHRONIZATION:
sprintf( Buffer, "@Subheading = %s\n", line->Contents );
strcpy( line->Contents, Buffer );
+ line = (Line_Control *) line->Node.next;
/* now take care of the raw text which is here */
- line = (Line_Control *) line->Node.next;
+#if 0
while ( !line->keyword ) {
sprintf( Buffer, "@Example = %s\n", line->Contents );
strcpy( line->Contents, Buffer );
@@ -2930,6 +2932,36 @@ void FormatToWord( void )
}
/* at this point line points to the next keyword */
+#endif
+
+ /* now take care of the raw text which is here */
+
+ new_line = AllocateLine();
+ _Chain_Insert( line->Node.previous, &new_line->Node );
+ strcpy( new_line->Contents, "@Example = " );
+
+ do {
+ if ( strlen( line->Contents ) ) {
+ new_line->keyword = line->keyword;
+ new_line->format = line->format;
+ length = strlen(new_line->Contents);
+ if ( (length + strlen(line->Contents) + 12) > PARAGRAPH_SIZE ) {
+ fprintf( stderr, "Output line too long at %d\n", line->number );
+ exit_application( 1 );
+ }
+
+ strcat( new_line->Contents, line->Contents );
+ strcat( new_line->Contents, "<@ManualCR>" );
+ line = DeleteLine( line );
+ } else {
+ line = (Line_Control *) line->Node.next;
+ new_line = AllocateLine();
+ _Chain_Insert( line->Node.previous, &new_line->Node );
+ strcpy( new_line->Contents, "@Example = " );
+ }
+ } while ( !line->keyword );
+
+ /* at this point line points to the next keyword */
break;
}
}