Changeset 5599d6e in rtems
- Timestamp:
- 02/06/98 13:48:44 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 1e524995
- Parents:
- f02ffca
- Location:
- doc/tools/pdl2texi
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/tools/pdl2texi/Makefile
rf02ffca r5599d6e 74 74 ./$(PROG) -v -p "Magic Subsystem" \ 75 75 -u "Magic Subsystem" test_cases/avdas.d 76 ./$(PROG) -w -v -p "Magic Subsystem" \ 77 -u "Magic Subsystem" test_cases/avdas.d 76 78 77 79 clean: -
doc/tools/pdl2texi/main.c
rf02ffca r5599d6e 172 172 PDL, 173 173 SYNCHRONIZATION, 174 TIMING 174 TIMING, 175 176 RAW_EXAMPLE, /* our own */ 177 175 178 } Keyword_indices_t; 176 179 … … 198 201 199 202 typedef enum { 203 RT_NO_CHECK, /* don't do this at all */ 200 204 RT_FORBIDDEN, /* no text to right allowed */ 201 205 RT_OPTIONAL, /* text to right optional -- none below */ … … 317 321 HEADING, RT_MAYBE_BELOW, BL_RAW, Validate_synchronization }, 318 322 { "TIMING:", 319 HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL } 323 HEADING, RT_REQUIRED, BL_FORBIDDEN, NULL }, 324 { "", 325 TEXT, RT_NO_CHECK, BL_RAW, NULL } 320 326 }; 321 327 … … 812 818 boolean is_bullet; 813 819 int length; 820 int i; 814 821 815 822 length = 0; … … 827 834 828 835 for ( ; *src && isspace( *src ) ; src++ ); /* skip leading spaces */ 836 837 if ( !strncmp( src, "@table", 6 ) ) { 838 839 to_add = DeleteLine( to_add ); 840 src = to_add->Contents; 841 for ( i=4 ; *src && isspace( *src ) && i-- ; src++ ); 842 /* skip leading spaces */ 843 844 for ( ; ; ) { 845 if ( _Chain_Is_last( &to_add->Node ) ) { 846 fprintf( 847 stderr, 848 "Missing end table for table starting at line %d\n", 849 starting_line 850 ); 851 exit_application( 1 ); 852 } 853 if ( !strncmp( src, "@end table", 10 ) ) { 854 to_add = DeleteLine( to_add ); 855 return to_add; 856 } 857 strcpy( Paragraph, src ); 858 strcpy( to_add->Contents, Paragraph ); 859 SetLineFormat( to_add, PARAGRAPH_OUTPUT ); 860 to_add->keyword = RAW_EXAMPLE; 861 to_add = (Line_Control *) to_add->Node.next; 862 863 src = to_add->Contents; 864 for ( i=4 ; *src && isspace( *src ) && i-- ; src++ ); 865 /* skip leading spaces */ 866 867 } 868 } 829 869 830 870 if ( *src == '+' ) { … … 1521 1561 char *Format_Errors[] = { 1522 1562 /* unused */ "no formatting error", 1563 /* RT_NO_CHECK */ "why am I here", 1523 1564 /* RT_FORBIDDEN */ "no text allowed to right or below", 1524 1565 /* RT_OPTIONAL */ "text to right optional -- none below", … … 1566 1607 key = &Keywords[ line->keyword ]; 1567 1608 1568 if ( !line->keyword ) {1609 if ( !line->keyword || key->text_mode == RT_NO_CHECK ) { 1569 1610 line = (Line_Control *) line->Node.next; 1570 1611 continue; … … 1598 1639 1599 1640 switch ( key->text_mode ) { 1641 case RT_NO_CHECK: /* no requirements */ 1642 break; 1643 1600 1644 case RT_FORBIDDEN: /* no text to right or below allowed */ 1601 1645 if ( is_text_to_right || is_text_below ) { … … 2737 2781 /* at this point line points to the next keyword */ 2738 2782 break; 2783 2784 case RAW_EXAMPLE: 2785 2786 /* now take care of the raw text which is here */ 2787 2788 new_line = AllocateLine(); 2789 strcpy( new_line->Contents, "@example" ); 2790 _Chain_Insert( line->Node.previous, &new_line->Node ); 2791 2792 while ( line->keyword == RAW_EXAMPLE ) { 2793 line = (Line_Control *) line->Node.next; 2794 } 2795 2796 new_line = AllocateLine(); 2797 strcpy( new_line->Contents, "@end example" ); 2798 _Chain_Insert( line->Node.previous, &new_line->Node ); 2799 2800 /* at this point line points to the next keyword */ 2801 break; 2802 2739 2803 } 2740 2804 } … … 2967 3031 /* at this point line points to the next keyword */ 2968 3032 break; 3033 3034 case RAW_EXAMPLE: 3035 3036 /* now take care of the raw text which is here */ 3037 3038 new_line = AllocateLine(); 3039 _Chain_Insert( line->Node.previous, &new_line->Node ); 3040 strcpy( new_line->Contents, "@Example = " ); 3041 3042 3043 while ( line->keyword == RAW_EXAMPLE ) { 3044 if ( strlen( line->Contents ) ) { 3045 new_line->keyword = line->keyword; 3046 new_line->format = line->format; 3047 length = strlen(new_line->Contents); 3048 if ( (length + strlen(line->Contents) + 12) > PARAGRAPH_SIZE ) { 3049 fprintf( stderr, "Output line too long at %d\n", line->number ); 3050 exit_application( 1 ); 3051 } 3052 3053 strcat( new_line->Contents, line->Contents ); 3054 strcat( new_line->Contents, "<@ManualCR>" ); 3055 line = DeleteLine( line ); 3056 } else { 3057 line = (Line_Control *) line->Node.next; 3058 new_line = AllocateLine(); 3059 _Chain_Insert( line->Node.previous, &new_line->Node ); 3060 strcpy( new_line->Contents, "@Example = " ); 3061 } 3062 } 3063 3064 /* at this point line points to the next keyword */ 3065 break; 3066 2969 3067 } 2970 3068 }
Note: See TracChangeset
for help on using the changeset viewer.