@@ -3707,6 +3707,9 @@ static void check_directive(char *buff, int *line_size) {
37073707 cb_source_format1 = 1 ;
37083708 return ;
37093709 }
3710+ if (!strcasecmp (sbuff [2 ], "VARIABLE" )) {
3711+ cb_source_format = CB_FORMAT_VARIABLE ;
3712+ }
37103713 break ;
37113714 default :
37123715 if (strcasecmp (sbuff [1 ], "FORMAT" )) {
@@ -3728,6 +3731,9 @@ static void check_directive(char *buff, int *line_size) {
37283731 cb_source_format1 = 1 ;
37293732 return ;
37303733 }
3734+ if (!strcasecmp (sbuff [3 ], "VARIABLE" )) {
3735+ cb_source_format = CB_FORMAT_VARIABLE ;
3736+ }
37313737 break ;
37323738 }
37333739 cb_warning (_ ("Invalid directive - ignored" ));
@@ -3905,6 +3911,8 @@ static void check_dollar_directive(char *buff, int *line_size) {
39053911 cb_source_format = CB_FORMAT_FREE_1COL_ASTER ;
39063912 cb_source_format1 = 1 ;
39073913 return ;
3914+ } else if (strcasecmp (sbuff [1 ], "SOURCEFORMAT(VARIABLE)" ) == 0 ) {
3915+ cb_source_format = CB_FORMAT_VARIABLE ;
39083916 } else {
39093917 cb_compile_status = CB_COMPILE_STATUS_ERROR ;
39103918 cb_error (_ ("Invalid $SET" ));
@@ -3968,7 +3976,7 @@ static int ppinput(char *buff, int max_size) {
39683976 return strlen (buff );
39693977 }
39703978 if (n == 0 && cb_source_format != CB_FORMAT_FIXED &&
3971- cb_source_format1 != 1 ) {
3979+ cb_source_format1 != 1 && cb_source_format != CB_FORMAT_VARIABLE ) {
39723980 if (ipchar != ' ' && ipchar != '\n' ) {
39733981 buff [n ++ ] = ' ' ;
39743982 }
@@ -4029,7 +4037,8 @@ static int ppinput(char *buff, int max_size) {
40294037 }
40304038
40314039 /* nothing more to do with free format */
4032- if (cb_source_format != CB_FORMAT_FIXED ) {
4040+ if (cb_source_format != CB_FORMAT_FIXED &&
4041+ cb_source_format != CB_FORMAT_VARIABLE ) {
40334042 return n ;
40344043 }
40354044
@@ -4117,7 +4126,7 @@ static int ppinput(char *buff, int max_size) {
41174126 }
41184127
41194128 /* check the text that is longer than cb_text_column */
4120- if (n > cb_text_column + 1 ) {
4129+ if (n > cb_text_column + 1 && cb_source_format != CB_FORMAT_VARIABLE ) {
41214130
41224131 /* show warning if it is not whitespaces */
41234132 if (cb_warn_column_overflow && last_line_2 < cb_source_line - 1 ) {
0 commit comments