improved parser, fixed convertation
This commit is contained in:
@@ -80,6 +80,7 @@ extern void BufferAllocate();
|
||||
int out_free_form;
|
||||
int out_upper_case;
|
||||
int out_line_unlimit;
|
||||
int out_line_length; // out_line_length = 132 for -ffo mode; out_line_length = 72 for -uniForm mode
|
||||
PTR_SYMB last_file_symbol;
|
||||
|
||||
static int CountNullBifNext = 0; /* for internal debugging */
|
||||
@@ -1305,14 +1306,14 @@ char* filter(char *s)
|
||||
{
|
||||
char c;
|
||||
int i = 1, quote = 0;
|
||||
|
||||
|
||||
// 14.10.2016 Kolganov. Switch constant buffer to dynamic
|
||||
int temp_size = 4096;
|
||||
char *temp = (char*)malloc(sizeof(char) * temp_size);
|
||||
#ifdef __SPF
|
||||
addToCollection(__LINE__, __FILE__,temp, 0);
|
||||
#endif
|
||||
|
||||
// out_line_length = 132 if -ffo option is used or out_line_length = 72 if -uniForm option is used
|
||||
int temp_i = 0;
|
||||
int buf_i = 0;
|
||||
int commentline = 0;
|
||||
@@ -1442,7 +1443,7 @@ char* filter(char *s)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((!out_free_form && temp_i == 71) || (out_free_form && !out_line_unlimit && temp_i == 131)) && !commentline && (s[i + 1] != '\n'))
|
||||
if (((!out_free_form && temp_i == 71) || (out_free_form && !out_line_unlimit && temp_i == out_line_length - 1)) && !commentline && (s[i + 1] != '\n'))
|
||||
{
|
||||
if (buf_i + 1 > temp_size)
|
||||
{
|
||||
@@ -1479,7 +1480,7 @@ char* filter(char *s)
|
||||
buf_i = -1;
|
||||
}
|
||||
|
||||
if (((!out_free_form && temp_i == 71) || (out_free_form && !out_line_unlimit && temp_i == 131)) && commentline && (s[i + 1] != '\n') && ((OMP == 1) || (OMP == 2) || (DVM == 1) || (SPF == 1))) /*07.08.17*/
|
||||
if (((!out_free_form && temp_i == 71) || (out_free_form && !out_line_unlimit && temp_i == out_line_length - 1)) && commentline && (s[i + 1] != '\n') && ((OMP == 1) || (OMP == 2) || (DVM == 1) || (SPF == 1))) /*07.08.17*/
|
||||
{
|
||||
if (buf_i + 1 > temp_size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user